diff --git a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryConstructor.java b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryConstructor.java index df237b4c9..ca0352ec6 100644 --- a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryConstructor.java +++ b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryConstructor.java @@ -5,7 +5,9 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.fhirpath.IFhirPath; +import java.util.Arrays; import java.util.List; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.opencds.cqf.fhir.cql.engine.parameters.CqlParameterDefinition; import org.opencds.cqf.fhir.utility.FhirPathCache; @@ -28,14 +30,31 @@ public LibraryConstructor(FhirContext fhirContext) { public String constructCqlLibrary( String expression, List> libraries, List parameters) { logger.debug("Constructing expression for local evaluation"); + return constructCqlLibrary( + "expression", + "1.0.0", + Arrays.asList(String.format("%ndefine \"return\":%n %s", expression)), + libraries, + parameters); + } + + public String constructCqlLibrary( + String name, + String version, + List expressions, + List> libraries, + List parameters) { StringBuilder sb = new StringBuilder(); - constructHeader(sb); + constructHeader(sb, name, version); constructUsings(sb); constructIncludes(sb, libraries); constructParameters(sb, parameters); - constructExpression(sb, expression); + constructContext(sb, null); + for (var expression : expressions) { + sb.append(String.format("%s%n%n", expression)); + } String cql = sb.toString(); @@ -43,10 +62,6 @@ public String constructCqlLibrary( return cql; } - private void constructExpression(StringBuilder sb, String expression) { - sb.append(String.format("%ndefine \"return\":%n %s", expression)); - } - private String getFhirVersionString(FhirVersionEnum fhirVersion) { // The version of the DSTU3 enum is 3.0.2 which the CQL Engine does not support. return fhirVersion == FhirVersionEnum.DSTU3 ? "3.0.1" : fhirVersion.getFhirVersionString(); @@ -70,6 +85,7 @@ private void constructIncludes(StringBuilder sb, List> libr sb.append("\n"); } } + sb.append("\n"); } private void constructParameters(StringBuilder sb, List parameters) { @@ -98,11 +114,16 @@ private String getTypeDeclaration(String type, Boolean isList) { private void constructUsings(StringBuilder sb) { sb.append(String.format( - "using FHIR version '%s'%n", + "using FHIR version '%s'%n%n", getFhirVersionString(fhirContext.getVersion().getVersion()))); } - private void constructHeader(StringBuilder sb) { - sb.append(String.format("library expression version '1.0.0'%n%n")); + private void constructHeader(StringBuilder sb, String name, String version) { + sb.append(String.format("library %s version '%s'%n%n", name, version)); + } + + private void constructContext(StringBuilder sb, String contextType) { + sb.append(String.format( + String.format("context %s%n%n", StringUtils.isBlank(contextType) ? "Patient" : contextType))); } } diff --git a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java index ac7508630..b914d8591 100644 --- a/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java +++ b/cqf-fhir-cql/src/main/java/org/opencds/cqf/fhir/cql/LibraryEngine.java @@ -56,6 +56,10 @@ public Repository getRepository() { return repository; } + public EvaluationSettings getSettings() { + return settings; + } + private Pair buildContextParameter(String patientId) { Pair contextParameter = null; if (patientId != null) { diff --git a/cqf-fhir-cql/src/test/java/org/opencds/cqf/fhir/cql/LibraryEngineTests.java b/cqf-fhir-cql/src/test/java/org/opencds/cqf/fhir/cql/LibraryEngineTests.java index f5c636894..57857a041 100644 --- a/cqf-fhir-cql/src/test/java/org/opencds/cqf/fhir/cql/LibraryEngineTests.java +++ b/cqf-fhir-cql/src/test/java/org/opencds/cqf/fhir/cql/LibraryEngineTests.java @@ -1,6 +1,7 @@ package org.opencds.cqf.fhir.cql; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.opencds.cqf.fhir.test.Resources.getResourcePath; import static org.opencds.cqf.fhir.utility.r4.Parameters.parameters; import static org.opencds.cqf.fhir.utility.r4.Parameters.part; @@ -16,9 +17,12 @@ import org.hl7.elm.r1.VersionedIdentifier; import org.hl7.fhir.r4.model.CodeableConcept; import org.hl7.fhir.r4.model.Coding; +import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Encounter.EncounterStatus; import org.hl7.fhir.r4.model.HumanName; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.Practitioner; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.Task; import org.junit.jupiter.api.BeforeEach; @@ -79,13 +83,35 @@ void fhirPathWithResource() { ((CodeableConcept) result.get(0)).getCodingFirstRep().getCode()); } + @Test + void fhirPathWithContextAndResource() { + var patientId = "Patient/Patient1"; + var patient = new Patient().addName(new HumanName().addGiven("Alice")).setId(patientId); + var encounter = new Encounter() + .setSubject(new Reference(patient.getIdElement())) + .setStatus(EncounterStatus.FINISHED); + var params = parameters(); + params.addParameter(part("%subject", patient)); + params.addParameter(part("%practitioner", new Practitioner().addName(new HumanName().addGiven("Michael")))); + var expression = new CqfExpression( + "text/fhirpath", + "'Encounter: ' + %context.status + ' ' + %resource.code.coding[0].system + ' ' + %resource.code.coding[0].code", + null); + + var task = new Task().setCode(new CodeableConcept(new Coding("test-system", "test-code", null))); + + var result = libraryEngine.resolveExpression(patientId, expression, params, null, encounter, task); + assertNotNull(result); + assertEquals("Encounter: finished test-system test-code", ((StringType) result.get(0)).getValueAsString()); + } + @Test void expressionWithLibraryReference() { var patientId = "Patient/Patient1"; var expression = new CqfExpression("text/cql", "TestLibrary.testExpression", "http://fhir.test/Library/TestLibrary"); var result = libraryEngine.resolveExpression(patientId, expression, null, null, null, null); - assertEquals(((StringType) result.get(0)).getValue(), "I am a test"); + assertEquals("I am a test", ((StringType) result.get(0)).getValue()); } String libraryCql = "library MyLibrary version '1.0.0'\n" diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessor.java index 27aed1d8b..b3ef24def 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessor.java @@ -34,8 +34,8 @@ public class ActivityDefinitionProcessor implements IActivityDefinitionProcessor protected final EvaluationSettings evaluationSettings; protected final FhirVersionEnum fhirVersion; protected final ResourceResolver resourceResolver; - protected final IApplyProcessor applyProcessor; - protected final IRequestResolverFactory requestResolverFactory; + protected IApplyProcessor applyProcessor; + protected IRequestResolverFactory requestResolverFactory; protected Repository repository; protected ExtensionResolver extensionResolver; @@ -57,12 +57,8 @@ public ActivityDefinitionProcessor( this.resourceResolver = new ResourceResolver("ActivityDefinition", this.repository); fhirVersion = repository.fhirContext().getVersion().getVersion(); modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); - this.requestResolverFactory = requestResolverFactory == null - ? IRequestResolverFactory.getDefault(fhirVersion) - : requestResolverFactory; - this.applyProcessor = applyProcessor != null - ? applyProcessor - : new ApplyProcessor(this.repository, this.requestResolverFactory); + this.requestResolverFactory = requestResolverFactory; + this.applyProcessor = applyProcessor; } @Override @@ -109,8 +105,8 @@ public , R extends IBaseResource> IBaseResource IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseResource dataEndpoint, IBaseResource contentEndpoint, IBaseResource terminologyEndpoint) { @@ -127,7 +123,7 @@ public , R extends IBaseResource> IBaseResource settingContext, parameters, useServerData, - bundle, + data, createRestRepository(repository.fhirContext(), dataEndpoint), createRestRepository(repository.fhirContext(), contentEndpoint), createRestRepository(repository.fhirContext(), terminologyEndpoint)); @@ -145,8 +141,8 @@ public , R extends IBaseResource> IBaseResource IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, Repository dataRepository, Repository contentRepository, Repository terminologyRepository) { @@ -164,7 +160,7 @@ public , R extends IBaseResource> IBaseResource settingContext, parameters, useServerData, - bundle, + data, new LibraryEngine(repository, evaluationSettings)); } @@ -180,8 +176,8 @@ public , R extends IBaseResource> IBaseResource IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, LibraryEngine libraryEngine) { if (StringUtils.isBlank(subjectId)) { throw new IllegalArgumentException("Missing required parameter: 'subject'"); @@ -203,12 +199,23 @@ public , R extends IBaseResource> IBaseResource settingContext, parameters, useServerData, - bundle, + data, libraryEngine, modelResolver); + initApplyProcessor(); return applyProcessor.apply(request); } + protected void initApplyProcessor() { + applyProcessor = applyProcessor != null + ? applyProcessor + : new ApplyProcessor( + repository, + requestResolverFactory != null + ? requestResolverFactory + : IRequestResolverFactory.getDefault(fhirVersion)); + } + protected , R extends IBaseResource> R resolveActivityDefinition( Either3 activityDefinition) { return resourceResolver.resolve(activityDefinition); diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/ApplyRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/ApplyRequest.java index 088327480..53092423a 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/ApplyRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/ApplyRequest.java @@ -13,6 +13,7 @@ import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.common.ICpgRequest; import org.opencds.cqf.fhir.cr.inputparameters.IInputParameterResolver; +import org.opencds.cqf.fhir.utility.adapter.QuestionnaireAdapter; public class ApplyRequest implements ICpgRequest { private final IBaseResource activityDefinition; @@ -27,7 +28,7 @@ public class ApplyRequest implements ICpgRequest { private final IBaseDatatype settingContext; private final IBaseParameters parameters; private final Boolean useServerData; - private final IBaseBundle bundle; + private final IBaseBundle data; private final LibraryEngine libraryEngine; private final ModelResolver modelResolver; private final FhirVersionEnum fhirVersion; @@ -47,11 +48,13 @@ public ApplyRequest( IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, LibraryEngine libraryEngine, ModelResolver modelResolver) { + checkNotNull(activityDefinition, "expected non-null value for activityDefinition"); checkNotNull(libraryEngine, "expected non-null value for libraryEngine"); + checkNotNull(modelResolver, "expected non-null value for modelResolver"); this.activityDefinition = activityDefinition; this.subjectId = subjectId; this.encounterId = encounterId; @@ -64,7 +67,7 @@ public ApplyRequest( this.settingContext = settingContext; this.parameters = parameters; this.useServerData = useServerData; - this.bundle = bundle; + this.data = data; this.libraryEngine = libraryEngine; this.modelResolver = modelResolver; fhirVersion = activityDefinition.getStructureFhirVersionEnum(); @@ -76,7 +79,7 @@ public ApplyRequest( this.practitionerId, this.parameters, this.useServerData, - this.bundle); + this.data); } public IBaseResource getActivityDefinition() { @@ -134,12 +137,12 @@ public IBaseDatatype getSettingContext() { } @Override - public IBaseBundle getBundle() { - return bundle; + public IBaseBundle getData() { + return data; } @Override - public Boolean getUseServerData() { + public boolean getUseServerData() { return useServerData; } @@ -210,4 +213,9 @@ protected final String resolveDefaultLibraryUrl() { public IBaseResource getQuestionnaire() { return null; } + + @Override + public QuestionnaireAdapter getQuestionnaireAdapter() { + return null; + } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/resolvers/dstu3/ReferralRequestResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/resolvers/dstu3/ReferralRequestResolver.java index f5af07e81..73ac953a9 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/resolvers/dstu3/ReferralRequestResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/activitydefinition/apply/resolvers/dstu3/ReferralRequestResolver.java @@ -32,7 +32,7 @@ public ReferralRequest resolve(ICpgRequest request) { if (request.hasPractitionerId()) { referralRequest.setRequester( new ReferralRequestRequesterComponent(new Reference(request.getPractitionerId()))); - } else if (request.hasOrganizationId() != null) { + } else if (request.hasOrganizationId()) { referralRequest.setRequester( new ReferralRequestRequesterComponent(new Reference(request.getOrganizationId()))); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/DataRequirementsProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/DataRequirementsProcessor.java new file mode 100644 index 000000000..4746d6543 --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/DataRequirementsProcessor.java @@ -0,0 +1,36 @@ +package org.opencds.cqf.fhir.cr.common; + +import static org.opencds.cqf.fhir.utility.Parameters.newParameters; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IDomainResource; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.EvaluationSettings; +import org.opencds.cqf.fhir.cr.visitor.DataRequirementsVisitor; +import org.opencds.cqf.fhir.utility.adapter.AdapterFactory; + +public class DataRequirementsProcessor implements IDataRequirementsProcessor { + protected final Repository repository; + protected final FhirVersionEnum fhirVersion; + protected final DataRequirementsVisitor dataRequirementsVisitor; + + public DataRequirementsProcessor(Repository repository) { + this(repository, EvaluationSettings.getDefault()); + } + + public DataRequirementsProcessor(Repository repository, EvaluationSettings evaluationSettings) { + this.repository = repository; + this.fhirVersion = this.repository.fhirContext().getVersion().getVersion(); + dataRequirementsVisitor = new DataRequirementsVisitor(evaluationSettings); + } + + @Override + public IBaseResource getDataRequirements(IBaseResource resource, IBaseParameters parameters) { + return (IBaseResource) dataRequirementsVisitor.visit( + AdapterFactory.forFhirVersion(fhirVersion).createKnowledgeArtifactAdapter((IDomainResource) resource), + repository, + parameters == null ? newParameters(repository.fhirContext()) : parameters); + } +} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessor.java index 8946dd678..c1bd309cb 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessor.java @@ -130,7 +130,7 @@ protected List getDynamicValueExpressionResult( request.getSubjectId().getIdPart(), cqfExpression, request.getParameters(), - request.getBundle(), + request.getData(), context, resource); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExpressionProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExpressionProcessor.java index ddb475552..75df43fa2 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExpressionProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExpressionProcessor.java @@ -1,6 +1,7 @@ package org.opencds.cqf.fhir.cr.common; import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -26,19 +27,15 @@ public class ExpressionProcessor { * @param expression CqfExpression to evaluate * @param itemLinkId link Id of the item * @return - * @throws ResolveExpressionException */ public List getExpressionResultForItem( - IOperationRequest request, CqfExpression expression, String itemLinkId) throws ResolveExpressionException { - if (expression == null) { - return new ArrayList<>(); - } + ICqlOperationRequest request, CqfExpression expression, String itemLinkId) { try { return getExpressionResult(request, expression); } catch (Exception ex) { final String message = String.format(EXCEPTION_MESSAGE_TEMPLATE, expression.getExpression(), itemLinkId, ex.getMessage()); - throw new ResolveExpressionException(message); + throw new UnprocessableEntityException(message); } } @@ -49,14 +46,18 @@ public List getExpressionResultForItem( * @param expression CqfExpression to evaluate * @return */ - public List getExpressionResult(IOperationRequest request, CqfExpression expression) { - return request - .getLibraryEngine() - .resolveExpression( - request.getSubjectId().getIdPart(), expression, request.getParameters(), request.getBundle()) - .stream() - .filter(Objects::nonNull) - .collect(Collectors.toList()); + public List getExpressionResult(ICqlOperationRequest request, CqfExpression expression) { + var result = expression == null + ? null + : request.getLibraryEngine() + .resolveExpression( + request.getSubjectId().getIdPart(), + expression, + request.getParameters(), + request.getData()); + return result == null + ? new ArrayList<>() + : result.stream().filter(Objects::nonNull).collect(Collectors.toList()); } /** @@ -68,10 +69,10 @@ public List getExpressionResult(IOperationRequest request, CqfExpression * @return */ public List getExpressionResult( - IOperationRequest request, CqfExpression expression, IBaseParameters parameters) { + ICqlOperationRequest request, CqfExpression expression, IBaseParameters parameters) { return request .getLibraryEngine() - .resolveExpression(request.getSubjectId().getIdPart(), expression, parameters, request.getBundle()) + .resolveExpression(request.getSubjectId().getIdPart(), expression, parameters, request.getData()) .stream() .filter(Objects::nonNull) .collect(Collectors.toList()); @@ -92,41 +93,6 @@ public List getExpressionResult( .findFirst() .orElse(null); return extension == null ? null : CqfExpression.of(extension, request.getDefaultLibraryUrl()); - // if (extension == null) { - // return null; - // } - // switch (request.getFhirVersion()) { - // case DSTU3: - // // var languageExtension = extensions.stream() - // var languageExtension = extension.getExtension().stream() - // .map(e -> (IBaseExtension) e) - // .filter(e -> e.getUrl().equals(Constants.CQF_EXPRESSION_LANGUAGE)) - // .findFirst() - // .orElse(null); - // // var libraryExtension = extensions.stream() - // var libraryExtension = extension.getExtension().stream() - // .map(e -> (IBaseExtension) e) - // .filter(e -> e.getUrl().equals(Constants.CQF_LIBRARY)) - // .findFirst() - // .orElse(null); - // return new CqfExpression( - // languageExtension == null - // ? null - // : languageExtension.getValue().toString(), - // extension.getValue().toString(), - // libraryExtension == null - // ? request.getDefaultLibraryUrl() - // : libraryExtension.getValue().toString()); - // case R4: - // return CqfExpression.of( - // (org.hl7.fhir.r4.model.Expression) extension.getValue(), request.getDefaultLibraryUrl()); - // case R5: - // return CqfExpression.of( - // (org.hl7.fhir.r5.model.Expression) extension.getValue(), request.getDefaultLibraryUrl()); - - // default: - // return null; - // } } /** diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionBuilders.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionBuilders.java index 1ca3606e4..722072267 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionBuilders.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionBuilders.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.context.FhirVersionEnum; import java.util.AbstractMap.SimpleEntry; +import java.util.Arrays; import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseReference; @@ -97,4 +98,59 @@ public static IBaseExtension buildBooleanExt(FhirVersionEnum fhirVersion, Simple return null; } } + + public static IBaseExtension buildSdcLaunchContextExt(FhirVersionEnum fhirVersion, String code) { + return buildSdcLaunchContextExt(fhirVersion, code, null); + } + + public static IBaseExtension buildSdcLaunchContextExt( + FhirVersionEnum fhirVersion, String code, String resourceType) { + var system = "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext"; + var display = ""; + switch (code) { + case "patient": + display = "Patient"; + resourceType = display; + break; + case "encounter": + display = "Encounter"; + resourceType = display; + break; + case "location": + display = "Location"; + resourceType = display; + break; + case "practitioner": + case "user": + display = "User"; + resourceType = resourceType == null ? "Practitioner" : resourceType; + break; + case "study": + display = "ResearchStudy"; + resourceType = display; + break; + + default: + throw new IllegalArgumentException(String.format("Unrecognized launch context code: %s", code)); + } + switch (fhirVersion) { + case R4: + return (IBaseExtension) new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding(system, code, display)), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType(resourceType)))); + case R5: + return (IBaseExtension) new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding(system, code, display)), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType(resourceType)))); + + default: + return null; + } + } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionProcessor.java index 2379e5dd9..0eef6f557 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ExtensionProcessor.java @@ -8,8 +8,6 @@ import org.opencds.cqf.fhir.cql.ExtensionResolver; public class ExtensionProcessor { - public ExtensionProcessor() {} - /** * This method gets extensions from the definition element, resolves any CQF Expression extensions found and copies the resolved extensions to the resource. * @param request The operation request containing data needed for evaluation @@ -18,34 +16,20 @@ public ExtensionProcessor() {} * @param excludedExtList A list of extension URL's to excluded from the definition */ public void processExtensions( - IOperationRequest request, IBase resource, IElement definition, List excludedExtList) { + ICqlOperationRequest request, IBase resource, IElement definition, List excludedExtList) { var extensions = request.getExtensions(definition).stream() .filter(e -> !excludedExtList.contains(e.getUrl())) .collect(Collectors.toList()); processExtensions(request, resource, extensions); } - /** - * This method gets extensions from the definition element, resolves any CQF Expression extensions found and copies the resolved extensions to the resource. - * @param request The operation request containing data needed for evaluation - * @param resource The resource to copy the resolved extensions to - * @param definition The element containing the extensions to be resolved - * @param extList A list of extension URL's to include from the definition - */ - public void processExtensionsInList( - IOperationRequest request, IBase resource, IElement definition, List extList) { - var extensions = request.getExtensions(definition).stream() - .filter(e -> extList.contains(e.getUrl())) - .collect(Collectors.toList()); - processExtensions(request, resource, extensions); - } - - private void processExtensions(IOperationRequest request, IBase resource, List> extensions) { + private void processExtensions( + ICqlOperationRequest request, IBase resource, List> extensions) { if (extensions.isEmpty()) { return; } var extensionResolver = new ExtensionResolver( - request.getSubjectId(), request.getParameters(), request.getBundle(), request.getLibraryEngine()); + request.getSubjectId(), request.getParameters(), request.getData(), request.getLibraryEngine()); extensionResolver.resolveExtensions(resource, extensions, request.getDefaultLibraryUrl()); request.getModelResolver().setValue(resource, "extension", extensions); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ICpgRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ICpgRequest.java index e79785d3a..507c07fba 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ICpgRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ICpgRequest.java @@ -9,19 +9,19 @@ public interface ICpgRequest extends IQuestionnaireRequest { IIdType getEncounterId(); - default Boolean hasEncounterId() { + default boolean hasEncounterId() { return getEncounterId() != null && !getEncounterId().isEmpty(); } IIdType getPractitionerId(); - default Boolean hasPractitionerId() { + default boolean hasPractitionerId() { return getPractitionerId() != null && !getPractitionerId().isEmpty(); } IIdType getOrganizationId(); - default Boolean hasOrganizationId() { + default boolean hasOrganizationId() { return getOrganizationId() != null && !getOrganizationId().isEmpty(); } @@ -35,8 +35,6 @@ default Boolean hasOrganizationId() { IBaseDatatype getSettingContext(); - Boolean getUseServerData(); - default List getDynamicValues(IElement element) { return resolvePathList(element, "dynamicValue", IBaseBackboneElement.class); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ICqlOperationRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ICqlOperationRequest.java new file mode 100644 index 000000000..0d69723be --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ICqlOperationRequest.java @@ -0,0 +1,24 @@ +package org.opencds.cqf.fhir.cr.common; + +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IIdType; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.LibraryEngine; + +public interface ICqlOperationRequest extends IOperationRequest { + IIdType getSubjectId(); + + IBaseParameters getParameters(); + + boolean getUseServerData(); + + IBaseBundle getData(); + + LibraryEngine getLibraryEngine(); + + @Override + default Repository getRepository() { + return getLibraryEngine().getRepository(); + } +} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IDataRequirementsProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IDataRequirementsProcessor.java new file mode 100644 index 000000000..0473f200b --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IDataRequirementsProcessor.java @@ -0,0 +1,8 @@ +package org.opencds.cqf.fhir.cr.common; + +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; + +public interface IDataRequirementsProcessor { + IBaseResource getDataRequirements(IBaseResource resource, IBaseParameters parameters); +} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IOperationRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IOperationRequest.java index d4ce0a87f..ce7036d42 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IOperationRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IOperationRequest.java @@ -5,43 +5,44 @@ import static org.opencds.cqf.fhir.utility.OperationOutcomes.addExceptionToOperationOutcome; import static org.opencds.cqf.fhir.utility.OperationOutcomes.newOperationOutcome; +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; -import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.opencds.cqf.cql.engine.model.ModelResolver; -import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.utility.adapter.AdapterFactory; public interface IOperationRequest { String getOperationName(); - IIdType getSubjectId(); - - IBaseBundle getBundle(); - - IBaseParameters getParameters(); - - LibraryEngine getLibraryEngine(); - ModelResolver getModelResolver(); FhirVersionEnum getFhirVersion(); + Repository getRepository(); + + default FhirContext getFhirContext() { + return getRepository().fhirContext(); + } + String getDefaultLibraryUrl(); IBaseOperationOutcome getOperationOutcome(); void setOperationOutcome(IBaseOperationOutcome operationOutcome); + default AdapterFactory getAdapterFactory() { + return AdapterFactory.forFhirVersion(getFhirVersion()); + } + default void logException(String exceptionMessage) { if (getOperationOutcome() == null) { setOperationOutcome(newOperationOutcome(getFhirVersion())); @@ -82,7 +83,7 @@ default void resolveOperationOutcome(IBaseResource resource) { return getExtensionsByUrl(base, url).stream().findFirst().orElse(null); } - default Boolean hasExtension(IBase base, String url) { + default boolean hasExtension(IBase base, String url) { return getExtensions(base).stream().anyMatch(e -> e.getUrl().equals(url)); } @@ -90,7 +91,7 @@ default List getContained(IBaseResource base) { return resolvePathList(base, "contained", IBaseResource.class); } - default Boolean hasContained(IBaseResource base) { + default boolean hasContained(IBaseResource base) { return !getContained(base).isEmpty(); } @@ -107,12 +108,19 @@ default List resolvePathList(IBase base, String path, Class @SuppressWarnings("unchecked") default String resolvePathString(IBase base, String path) { - var result = (IPrimitiveType) resolvePath(base, path); - return result == null ? null : result.getValue(); + var pathResult = resolvePath(base, path); + if (pathResult instanceof IPrimitiveType) { + return ((IPrimitiveType) pathResult).getValueAsString(); + } + return null; + } + + default Object resolveRawPath(Object base, String path) { + return this.getModelResolver().resolvePath(base, path); } default IBase resolvePath(IBase base, String path) { - return (IBase) this.getModelResolver().resolvePath(base, path); + return (IBase) resolveRawPath(base, path); } @SuppressWarnings("unchecked") diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IQuestionnaireRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IQuestionnaireRequest.java index 96d4fc8a0..9150e15c9 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IQuestionnaireRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/IQuestionnaireRequest.java @@ -1,23 +1,78 @@ package org.opencds.cqf.fhir.cr.common; +import static org.opencds.cqf.fhir.utility.VersionUtilities.canonicalTypeForVersion; + import java.util.Collections; import java.util.List; +import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IDomainResource; +import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.adapter.QuestionnaireAdapter; -public interface IQuestionnaireRequest extends IOperationRequest { +public interface IQuestionnaireRequest extends ICqlOperationRequest { IBaseResource getQuestionnaire(); + QuestionnaireAdapter getQuestionnaireAdapter(); + default void addQuestionnaireItem(IBaseBackboneElement item) { getModelResolver().setValue(getQuestionnaire(), "item", Collections.singletonList(item)); } + default void addLaunchContextExtensions(List> launchContextExts) { + if (launchContextExts != null && !launchContextExts.isEmpty()) { + launchContextExts.forEach(e -> { + var code = e.getExtension().stream() + .map(c -> (IBaseExtension) c) + .filter(c -> c.getUrl().equals("name")) + .map(c -> resolvePathString(c.getValue(), "code")) + .findFirst() + .orElse(null); + if (StringUtils.isNotBlank(code)) { + var exists = + getQuestionnaireAdapter() + .getExtensionsByUrl(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .stream() + .anyMatch(lc -> lc.getExtension().stream() + .map(c -> (IBaseExtension) c) + .anyMatch(c -> c.getUrl().equals("name") + && resolvePathString(c.getValue(), "code") + .equals(code))); + if (!exists) { + getQuestionnaireAdapter().addExtension(e); + } + } + }); + } + } + + default void addCqlLibraryExtension() { + addCqlLibraryExtension(null); + } + + @SuppressWarnings("unchecked") + default void addCqlLibraryExtension(String library) { + var libraryRef = StringUtils.isNotBlank(library) ? library : getDefaultLibraryUrl(); + if (StringUtils.isNotBlank(libraryRef) + && getExtensionsByUrl(getQuestionnaire(), Constants.CQF_LIBRARY).stream() + .noneMatch(e -> ((IPrimitiveType) e.getValue()) + .getValueAsString() + .equals(libraryRef))) { + var libraryExt = ((IDomainResource) getQuestionnaire()).addExtension(); + libraryExt.setUrl(Constants.CQF_LIBRARY); + libraryExt.setValue(canonicalTypeForVersion(getFhirVersion(), libraryRef)); + } + } + default List getItems(IBase base) { return resolvePathList(base, "item", IBaseBackboneElement.class); } - default Boolean hasItems(IBase base) { + default boolean hasItems(IBase base) { return !getItems(base).isEmpty(); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ResolveExpressionException.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ResolveExpressionException.java deleted file mode 100644 index 1f4493faa..000000000 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/common/ResolveExpressionException.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.opencds.cqf.fhir.cr.common; - -@SuppressWarnings("serial") -public class ResolveExpressionException extends Exception { - public ResolveExpressionException(String message) { - super(message); - } -} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/BaseInputParameterResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/BaseInputParameterResolver.java index 77583ec59..3953cf6aa 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/BaseInputParameterResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/BaseInputParameterResolver.java @@ -1,7 +1,10 @@ package org.opencds.cqf.fhir.cr.inputparameters; import ca.uhn.fhir.context.FhirContext; +import java.util.List; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -21,14 +24,14 @@ public BaseInputParameterResolver( IIdType encounterId, IIdType practitionerId, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle) { + boolean useServerData, + IBaseBundle data) { this.subjectId = subjectId; this.encounterId = encounterId; this.practitionerId = practitionerId; Repository bundleRepository = null; - if (bundle != null) { - bundleRepository = new InMemoryFhirRepository(repository.fhirContext(), bundle); + if (data != null) { + bundleRepository = new InMemoryFhirRepository(repository.fhirContext(), data); } this.repository = resolveRepository(useServerData, repository, bundleRepository); } @@ -50,11 +53,12 @@ protected FhirContext fhirContext() { protected R readRepository(Class resourceType, IIdType id) { try { - return repository.read(resourceType, id, null); + return repository.read(resourceType, id); } catch (Exception e) { return null; } } - protected abstract IBaseParameters resolveParameters(IBaseParameters parameters); + protected abstract IBaseParameters resolveParameters( + IBaseParameters parameters, List context, List> launchContext); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/IInputParameterResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/IInputParameterResolver.java index a06e87ce2..bca3c0bd6 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/IInputParameterResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/IInputParameterResolver.java @@ -3,7 +3,9 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.util.List; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.IIdType; @@ -14,6 +16,18 @@ public interface IInputParameterResolver { public IBaseParameters resolveInputParameters(List dataRequirement); + public static T createResolver( + Repository repository, + IIdType subjectId, + IIdType encounterId, + IIdType practitionerId, + IBaseParameters parameters, + boolean useServerData, + IBaseBundle data) { + return createResolver( + repository, subjectId, encounterId, practitionerId, parameters, useServerData, data, null, null); + } + @SuppressWarnings("unchecked") public static T createResolver( Repository repository, @@ -21,20 +35,46 @@ public static T createResolver( IIdType encounterId, IIdType practitionerId, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle) { + boolean useServerData, + IBaseBundle data, + List context, + List> launchContext) { checkNotNull(repository, "expected non-null value for repository"); var fhirVersion = repository.fhirContext().getVersion().getVersion(); switch (fhirVersion) { case DSTU3: return (T) new org.opencds.cqf.fhir.cr.inputparameters.dstu3.InputParameterResolver( - repository, subjectId, encounterId, practitionerId, parameters, useServerData, bundle); + repository, + subjectId, + encounterId, + practitionerId, + parameters, + useServerData, + data, + context, + launchContext); case R4: return (T) new org.opencds.cqf.fhir.cr.inputparameters.r4.InputParameterResolver( - repository, subjectId, encounterId, practitionerId, parameters, useServerData, bundle); + repository, + subjectId, + encounterId, + practitionerId, + parameters, + useServerData, + data, + context, + launchContext); case R5: return (T) new org.opencds.cqf.fhir.cr.inputparameters.r5.InputParameterResolver( - repository, subjectId, encounterId, practitionerId, parameters, useServerData, bundle); + repository, + subjectId, + encounterId, + practitionerId, + parameters, + useServerData, + data, + context, + launchContext); default: return null; } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/dstu3/InputParameterResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/dstu3/InputParameterResolver.java index f4b2e0f3d..9f54d7669 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/dstu3/InputParameterResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/dstu3/InputParameterResolver.java @@ -14,7 +14,9 @@ import org.hl7.fhir.dstu3.model.Practitioner; import org.hl7.fhir.dstu3.model.Resource; import org.hl7.fhir.dstu3.model.ValueSet; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.IIdType; @@ -39,14 +41,17 @@ public InputParameterResolver( IIdType encounterId, IIdType practitionerId, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle) { - super(repository, subjectId, encounterId, practitionerId, parameters, useServerData, bundle); - this.parameters = resolveParameters(parameters); + boolean useServerData, + IBaseBundle data, + List context, + List> launchContext) { + super(repository, subjectId, encounterId, practitionerId, parameters, useServerData, data); + this.parameters = resolveParameters(parameters, context, launchContext); } @Override - protected final Parameters resolveParameters(IBaseParameters baseParameters) { + protected final Parameters resolveParameters( + IBaseParameters baseParameters, List context, List> launchContext) { var params = parameters(); if (baseParameters != null) { params.getParameter().addAll(((Parameters) baseParameters).getParameter()); @@ -69,6 +74,7 @@ protected final Parameters resolveParameters(IBaseParameters baseParameters) { params.addParameter(part("%practitioner", practitioner)); } } + // Launch Context is not supported in Dstu3 due to the lack of an Expression type return params; } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r4/InputParameterResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r4/InputParameterResolver.java index c8769df17..b0f38e748 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r4/InputParameterResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r4/InputParameterResolver.java @@ -3,23 +3,35 @@ import static org.opencds.cqf.fhir.utility.r4.Parameters.parameters; import static org.opencds.cqf.fhir.utility.r4.Parameters.part; +import ca.uhn.fhir.context.FhirVersionEnum; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Bundle.BundleEntryComponent; import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.DataRequirement; import org.hl7.fhir.r4.model.Encounter; +import org.hl7.fhir.r4.model.Extension; import org.hl7.fhir.r4.model.Parameters; +import org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent; import org.hl7.fhir.r4.model.Practitioner; +import org.hl7.fhir.r4.model.Reference; import org.hl7.fhir.r4.model.Resource; +import org.hl7.fhir.r4.model.ResourceType; +import org.hl7.fhir.r4.model.StringType; import org.hl7.fhir.r4.model.ValueSet; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cr.inputparameters.BaseInputParameterResolver; +import org.opencds.cqf.fhir.utility.BundleHelper; +import org.opencds.cqf.fhir.utility.Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE; import org.opencds.cqf.fhir.utility.search.Searches; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,14 +51,17 @@ public InputParameterResolver( IIdType encounterId, IIdType practitionerId, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle) { - super(repository, subjectId, encounterId, practitionerId, parameters, useServerData, bundle); - this.parameters = resolveParameters(parameters); + boolean useServerData, + IBaseBundle data, + List context, + List> launchContext) { + super(repository, subjectId, encounterId, practitionerId, parameters, useServerData, data); + this.parameters = resolveParameters(parameters, context, launchContext); } @Override - protected final Parameters resolveParameters(IBaseParameters baseParameters) { + protected final Parameters resolveParameters( + IBaseParameters baseParameters, List context, List> launchContext) { var params = parameters(); if (baseParameters != null) { params.getParameter().addAll(((Parameters) baseParameters).getParameter()); @@ -69,9 +84,95 @@ protected final Parameters resolveParameters(IBaseParameters baseParameters) { params.addParameter(part("%practitioner", practitioner)); } } + if (launchContext != null && !launchContext.isEmpty()) { + resolveLaunchContext(params, context, launchContext); + } return params; } + protected boolean validateContext(SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE code, String type) { + switch (code) { + case PATIENT: + return type.equals(ResourceType.Patient.name()); + case ENCOUNTER: + return type.equals(ResourceType.Encounter.name()); + case LOCATION: + return type.equals(ResourceType.Location.name()); + case USER: + return type.equals(ResourceType.Patient.name()) + || type.equals(ResourceType.Practitioner.name()) + || type.equals(ResourceType.PractitionerRole.name()) + || type.equals(ResourceType.RelatedPerson.name()); + case STUDY: + return type.equals(ResourceType.ResearchStudy.name()); + + default: + return false; + } + } + + protected void resolveLaunchContext( + Parameters params, List contexts, List> launchContexts) { + launchContexts.stream().map(e -> (Extension) e).forEach(launchContext -> { + var name = ((Coding) launchContext.getExtensionByUrl("name").getValue()).getCode(); + var type = launchContext + .getExtensionByUrl("type") + .getValueAsPrimitive() + .getValueAsString(); + if (!validateContext(SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE.valueOf(name.toUpperCase()), type)) { + throw new IllegalArgumentException(String.format("Unsupported launch context for %s: %s", name, type)); + } + var content = getContent(contexts, name); + if (content == null || content.isEmpty()) { + throw new IllegalArgumentException(String.format("Missing content for context: %s", name)); + } + var value = getValue(type, content); + if (!value.isEmpty()) { + var resource = + (Resource) (value.size() == 1 ? value.get(0) : BundleHelper.newBundle(FhirVersionEnum.R4)); + if (value.size() > 1) { + value.forEach( + v -> ((Bundle) resource).addEntry(new BundleEntryComponent().setResource((Resource) v))); + } + params.addParameter(part("%" + name, resource)); + var cqlParameterName = name.substring(0, 1).toUpperCase().concat(name.substring(1)); + params.addParameter(part(cqlParameterName, resource)); + } else { + throw new IllegalArgumentException(String.format("Unable to retrieve resource for context: %s", name)); + } + }); + } + + protected List getContent(List contexts, String name) { + return contexts == null + ? null + : contexts.stream() + .map(c -> (ParametersParameterComponent) c) + .filter(c -> c.getPart().stream() + .filter(p -> p.getName().equals("name")) + .anyMatch(p -> ((StringType) p.getValue()) + .getValueAsString() + .equals(name))) + .flatMap(c -> + c.getPart().stream().filter(p -> p.getName().equals("content"))) + .collect(Collectors.toList()); + } + + protected List getValue(String type, List content) { + return content.stream() + .map(p -> { + if (p.getValue() instanceof Reference) { + return readRepository( + fhirContext().getResourceDefinition(type).getImplementingClass(), + ((Reference) p.getValue()).getReferenceElement()); + } else { + return (Resource) p.getResource(); + } + }) + .filter(p -> p != null) + .collect(Collectors.toList()); + } + @Override public Parameters getParameters() { return parameters; diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r5/InputParameterResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r5/InputParameterResolver.java index 7e1fa9776..1d5d64142 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r5/InputParameterResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/inputparameters/r5/InputParameterResolver.java @@ -3,23 +3,35 @@ import static org.opencds.cqf.fhir.utility.r5.Parameters.parameters; import static org.opencds.cqf.fhir.utility.r5.Parameters.part; +import ca.uhn.fhir.context.FhirVersionEnum; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.r5.model.Bundle; +import org.hl7.fhir.r5.model.Bundle.BundleEntryComponent; import org.hl7.fhir.r5.model.Coding; import org.hl7.fhir.r5.model.DataRequirement; import org.hl7.fhir.r5.model.Encounter; +import org.hl7.fhir.r5.model.Extension; import org.hl7.fhir.r5.model.Parameters; +import org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent; import org.hl7.fhir.r5.model.Practitioner; +import org.hl7.fhir.r5.model.Reference; import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.model.ResourceType; +import org.hl7.fhir.r5.model.StringType; import org.hl7.fhir.r5.model.ValueSet; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cr.inputparameters.BaseInputParameterResolver; +import org.opencds.cqf.fhir.utility.BundleHelper; +import org.opencds.cqf.fhir.utility.Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE; import org.opencds.cqf.fhir.utility.search.Searches; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,14 +51,17 @@ public InputParameterResolver( IIdType encounterId, IIdType practitionerId, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle) { - super(repository, subjectId, encounterId, practitionerId, parameters, useServerData, bundle); - this.parameters = resolveParameters(parameters); + boolean useServerData, + IBaseBundle data, + List context, + List> launchContext) { + super(repository, subjectId, encounterId, practitionerId, parameters, useServerData, data); + this.parameters = resolveParameters(parameters, context, launchContext); } @Override - protected final Parameters resolveParameters(IBaseParameters baseParameters) { + protected final Parameters resolveParameters( + IBaseParameters baseParameters, List context, List> launchContext) { var params = parameters(); if (baseParameters != null) { params.getParameter().addAll(((Parameters) baseParameters).getParameter()); @@ -69,9 +84,95 @@ protected final Parameters resolveParameters(IBaseParameters baseParameters) { params.addParameter(part("%practitioner", practitioner)); } } + if (launchContext != null && !launchContext.isEmpty()) { + resolveLaunchContext(params, context, launchContext); + } return params; } + protected boolean validateContext(SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE code, String type) { + switch (code) { + case PATIENT: + return type.equals(ResourceType.Patient.name()); + case ENCOUNTER: + return type.equals(ResourceType.Encounter.name()); + case LOCATION: + return type.equals(ResourceType.Location.name()); + case USER: + return type.equals(ResourceType.Patient.name()) + || type.equals(ResourceType.Practitioner.name()) + || type.equals(ResourceType.PractitionerRole.name()) + || type.equals(ResourceType.RelatedPerson.name()); + case STUDY: + return type.equals(ResourceType.ResearchStudy.name()); + + default: + return false; + } + } + + protected void resolveLaunchContext( + Parameters params, List contexts, List> launchContexts) { + launchContexts.stream().map(e -> (Extension) e).forEach(launchContext -> { + var name = ((Coding) launchContext.getExtensionByUrl("name").getValue()).getCode(); + var type = launchContext + .getExtensionByUrl("type") + .getValueAsPrimitive() + .getValueAsString(); + if (!validateContext(SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE.valueOf(name.toUpperCase()), type)) { + throw new IllegalArgumentException(String.format("Unsupported launch context for %s: %s", name, type)); + } + var content = getContent(contexts, name); + if (content == null || content.isEmpty()) { + throw new IllegalArgumentException(String.format("Missing content for context: %s", name)); + } + var value = getValue(type, content); + if (!value.isEmpty()) { + var resource = + (Resource) (value.size() == 1 ? value.get(0) : BundleHelper.newBundle(FhirVersionEnum.R5)); + if (value.size() > 1) { + value.forEach( + v -> ((Bundle) resource).addEntry(new BundleEntryComponent().setResource((Resource) v))); + } + params.addParameter(part("%" + name, resource)); + var cqlParameterName = name.substring(0, 1).toUpperCase().concat(name.substring(1)); + params.addParameter(part(cqlParameterName, resource)); + } else { + throw new IllegalArgumentException(String.format("Unable to retrieve resource for context: %s", name)); + } + }); + } + + private List getContent(List contexts, String name) { + return contexts == null + ? null + : contexts.stream() + .map(c -> (ParametersParameterComponent) c) + .filter(c -> c.getPart().stream() + .filter(p -> p.getName().equals("name")) + .anyMatch(p -> ((StringType) p.getValue()) + .getValueAsString() + .equals(name))) + .flatMap(c -> + c.getPart().stream().filter(p -> p.getName().equals("content"))) + .collect(Collectors.toList()); + } + + private List getValue(String type, List content) { + return content.stream() + .map(p -> { + if (p.getValue() instanceof Reference) { + return readRepository( + fhirContext().getResourceDefinition(type).getImplementingClass(), + ((Reference) p.getValue()).getReferenceElement()); + } else { + return (Resource) p.getResource(); + } + }) + .filter(p -> p != null) + .collect(Collectors.toList()); + } + @Override public Parameters getParameters() { return parameters; diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/LibraryProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/LibraryProcessor.java index 06c82e427..9d551e3b7 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/LibraryProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/LibraryProcessor.java @@ -3,8 +3,12 @@ import static java.util.Objects.requireNonNull; import static org.opencds.cqf.fhir.utility.Parameters.newBooleanPart; import static org.opencds.cqf.fhir.utility.Parameters.newParameters; +import static org.opencds.cqf.fhir.utility.repository.Repositories.createRestRepository; +import static org.opencds.cqf.fhir.utility.repository.Repositories.proxy; import ca.uhn.fhir.context.FhirVersionEnum; +import java.util.List; +import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -13,16 +17,25 @@ import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.EvaluationSettings; +import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.cr.common.DataRequirementsProcessor; +import org.opencds.cqf.fhir.cr.common.IDataRequirementsProcessor; import org.opencds.cqf.fhir.cr.common.IPackageProcessor; import org.opencds.cqf.fhir.cr.common.PackageProcessor; import org.opencds.cqf.fhir.cr.common.ResourceResolver; +import org.opencds.cqf.fhir.cr.library.evaluate.EvaluateProcessor; +import org.opencds.cqf.fhir.cr.library.evaluate.EvaluateRequest; +import org.opencds.cqf.fhir.cr.library.evaluate.IEvaluateProcessor; +import org.opencds.cqf.fhir.utility.Ids; import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache; import org.opencds.cqf.fhir.utility.monad.Either3; public class LibraryProcessor { protected final ModelResolver modelResolver; protected final FhirVersionEnum fhirVersion; - protected final IPackageProcessor packageProcessor; + protected IPackageProcessor packageProcessor; + protected IDataRequirementsProcessor dataRequirementsProcessor; + protected IEvaluateProcessor evaluateProcessor; protected Repository repository; protected EvaluationSettings evaluationSettings; @@ -31,16 +44,22 @@ public LibraryProcessor(Repository repository) { } public LibraryProcessor(Repository repository, EvaluationSettings evaluationSettings) { - this(repository, evaluationSettings, null); + this(repository, evaluationSettings, null, null, null); } public LibraryProcessor( - Repository repository, EvaluationSettings evaluationSettings, IPackageProcessor packageProcessor) { + Repository repository, + EvaluationSettings evaluationSettings, + IPackageProcessor packageProcessor, + IDataRequirementsProcessor dataRequirementsProcessor, + IEvaluateProcessor evaluateProcessor) { this.repository = requireNonNull(repository, "repository can not be null"); this.evaluationSettings = requireNonNull(evaluationSettings, "evaluationSettings can not be null"); fhirVersion = this.repository.fhirContext().getVersion().getVersion(); modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); - this.packageProcessor = packageProcessor != null ? packageProcessor : new PackageProcessor(this.repository); + this.packageProcessor = packageProcessor; + this.dataRequirementsProcessor = dataRequirementsProcessor; + this.evaluateProcessor = evaluateProcessor; } public EvaluationSettings evaluationSettings() { @@ -72,7 +91,104 @@ public , R extends IBaseResource> IBaseBundle p return packageLibrary(resolveLibrary(library), parameters); } - public IBaseBundle packageLibrary(IBaseResource questionnaire, IBaseParameters parameters) { - return packageProcessor.packageResource(questionnaire, parameters); + public IBaseBundle packageLibrary(IBaseResource library, IBaseParameters parameters) { + var processor = packageProcessor != null ? packageProcessor : new PackageProcessor(repository); + return processor.packageResource(library, parameters); + } + + public , R extends IBaseResource> IBaseResource dataRequirements( + Either3 library, IBaseParameters parameters) { + return dataRequirements(resolveLibrary(library), parameters); + } + + public IBaseResource dataRequirements(IBaseResource library, IBaseParameters parameters) { + var processor = dataRequirementsProcessor != null + ? dataRequirementsProcessor + : new DataRequirementsProcessor(repository, evaluationSettings); + return processor.getDataRequirements(library, parameters); + } + + protected , R extends IBaseResource> EvaluateRequest buildEvaluateRequest( + Either3 library, + String subject, + List expression, + IBaseParameters parameters, + boolean useServerData, + IBaseBundle data, + List prefetchData, + LibraryEngine libraryEngine) { + return new EvaluateRequest( + resolveLibrary(library), + StringUtils.isBlank(subject) ? null : Ids.newId(fhirVersion, subject), + expression, + parameters, + useServerData, + data, + prefetchData, + libraryEngine, + modelResolver); + } + + public , R extends IBaseResource> IBaseParameters evaluate( + Either3 library, + String subject, + List expression, + IBaseParameters parameters, + boolean useServerData, + IBaseBundle data, + List prefetchData, + IBaseResource dataEndpoint, + IBaseResource contentEndpoint, + IBaseResource terminologyEndpoint) { + return evaluate( + library, + subject, + expression, + parameters, + useServerData, + data, + prefetchData, + createRestRepository(repository.fhirContext(), dataEndpoint), + createRestRepository(repository.fhirContext(), contentEndpoint), + createRestRepository(repository.fhirContext(), terminologyEndpoint)); + } + + public , R extends IBaseResource> IBaseParameters evaluate( + Either3 library, + String subject, + List expression, + IBaseParameters parameters, + boolean useServerData, + IBaseBundle data, + List prefetchData, + Repository dataRepository, + Repository contentRepository, + Repository terminologyRepository) { + repository = proxy(repository, useServerData, dataRepository, contentRepository, terminologyRepository); + return evaluate( + library, + subject, + expression, + parameters, + useServerData, + data, + prefetchData, + new LibraryEngine(repository, this.evaluationSettings)); + } + + public , R extends IBaseResource> IBaseParameters evaluate( + Either3 library, + String subject, + List expression, + IBaseParameters parameters, + boolean useServerData, + IBaseBundle data, + List prefetchData, + LibraryEngine libraryEngine) { + var processor = evaluateProcessor != null + ? evaluateProcessor + : new EvaluateProcessor(this.repository, this.evaluationSettings); + return processor.evaluate(buildEvaluateRequest( + library, subject, expression, parameters, useServerData, data, prefetchData, libraryEngine)); } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/EvaluateProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/EvaluateProcessor.java new file mode 100644 index 000000000..4b00a200c --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/EvaluateProcessor.java @@ -0,0 +1,36 @@ +package org.opencds.cqf.fhir.cr.library.evaluate; + +import static org.opencds.cqf.fhir.utility.Parameters.newParameters; +import static org.opencds.cqf.fhir.utility.Parameters.newPart; + +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.EvaluationSettings; + +public class EvaluateProcessor implements IEvaluateProcessor { + protected Repository repository; + protected EvaluationSettings evaluationSettings; + + public EvaluateProcessor(Repository repository, EvaluationSettings evaluationSettings) { + this.repository = repository; + this.evaluationSettings = evaluationSettings; + } + + public IBaseParameters evaluate(EvaluateRequest request) { + try { + return request.getLibraryEngine() + .evaluate( + request.getDefaultLibraryUrl(), + request.getSubject(), + request.getParameters(), + request.getData(), + null, + request.getExpression()); + } catch (Exception e) { + request.logException(e.getMessage()); + return newParameters( + repository.fhirContext(), + newPart(repository.fhirContext(), "evaluation error", request.getOperationOutcome())); + } + } +} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/EvaluateRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/EvaluateRequest.java new file mode 100644 index 000000000..fe4ea5526 --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/EvaluateRequest.java @@ -0,0 +1,121 @@ +package org.opencds.cqf.fhir.cr.library.evaluate; + +import static com.google.common.base.Preconditions.checkNotNull; + +import ca.uhn.fhir.context.FhirVersionEnum; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.opencds.cqf.cql.engine.model.ModelResolver; +import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.cr.common.ICqlOperationRequest; + +public class EvaluateRequest implements ICqlOperationRequest { + private final IBaseResource library; + private final IIdType subjectId; + private final Set expression; + private final IBaseParameters parameters; + private final boolean useServerData; + private final IBaseBundle data; + private final List prefetchData; + private final LibraryEngine libraryEngine; + private final ModelResolver modelResolver; + private final FhirVersionEnum fhirVersion; + private IBaseOperationOutcome operationOutcome; + + public EvaluateRequest( + IBaseResource library, + IIdType subjectId, + List expression, + IBaseParameters parameters, + boolean useServerData, + IBaseBundle data, + List prefetchData, + LibraryEngine libraryEngine, + ModelResolver modelResolver) { + checkNotNull(libraryEngine, "expected non-null value for libraryEngine"); + checkNotNull(modelResolver, "expected non-null value for modelResolver"); + this.library = library; + this.subjectId = subjectId; + this.expression = expression == null ? null : new HashSet<>(expression); + this.parameters = parameters; + this.useServerData = useServerData; + this.data = data; + this.prefetchData = prefetchData; + this.libraryEngine = libraryEngine; + this.modelResolver = modelResolver; + fhirVersion = library.getStructureFhirVersionEnum(); + } + + public IBaseResource getLibrary() { + return library; + } + + public Set getExpression() { + return expression; + } + + @Override + public String getOperationName() { + return "evaluate"; + } + + @Override + public IIdType getSubjectId() { + return subjectId; + } + + public String getSubject() { + return subjectId == null ? null : subjectId.getValueAsString(); + } + + @Override + public IBaseBundle getData() { + return data; + } + + @Override + public IBaseParameters getParameters() { + return parameters; + } + + @Override + public LibraryEngine getLibraryEngine() { + return libraryEngine; + } + + @Override + public ModelResolver getModelResolver() { + return modelResolver; + } + + @Override + public FhirVersionEnum getFhirVersion() { + return fhirVersion; + } + + @Override + public String getDefaultLibraryUrl() { + return resolvePathString(library, "url"); + } + + @Override + public IBaseOperationOutcome getOperationOutcome() { + return operationOutcome; + } + + @Override + public void setOperationOutcome(IBaseOperationOutcome operationOutcome) { + this.operationOutcome = operationOutcome; + } + + @Override + public boolean getUseServerData() { + return useServerData; + } +} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/IEvaluateProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/IEvaluateProcessor.java new file mode 100644 index 000000000..10b1e6a52 --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/library/evaluate/IEvaluateProcessor.java @@ -0,0 +1,7 @@ +package org.opencds.cqf.fhir.cr.library.evaluate; + +import org.hl7.fhir.instance.model.api.IBaseParameters; + +public interface IEvaluateProcessor { + public IBaseParameters evaluate(EvaluateRequest request); +} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessor.java index 873cdcfba..36189228a 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessor.java @@ -19,6 +19,8 @@ import org.opencds.cqf.fhir.cql.EvaluationSettings; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.activitydefinition.apply.IRequestResolverFactory; +import org.opencds.cqf.fhir.cr.common.DataRequirementsProcessor; +import org.opencds.cqf.fhir.cr.common.IDataRequirementsProcessor; import org.opencds.cqf.fhir.cr.common.IPackageProcessor; import org.opencds.cqf.fhir.cr.common.PackageProcessor; import org.opencds.cqf.fhir.cr.common.ResourceResolver; @@ -33,10 +35,11 @@ public class PlanDefinitionProcessor { protected final ModelResolver modelResolver; protected final FhirVersionEnum fhirVersion; - protected final IApplyProcessor applyProcessor; - protected final IPackageProcessor packageProcessor; - protected final org.opencds.cqf.fhir.cr.activitydefinition.apply.IApplyProcessor activityProcessor; - protected final IRequestResolverFactory requestResolverFactory; + protected IApplyProcessor applyProcessor; + protected IPackageProcessor packageProcessor; + protected IDataRequirementsProcessor dataRequirementsProcessor; + protected org.opencds.cqf.fhir.cr.activitydefinition.apply.IApplyProcessor activityProcessor; + protected IRequestResolverFactory requestResolverFactory; protected Repository repository; protected EvaluationSettings evaluationSettings; @@ -45,7 +48,7 @@ public PlanDefinitionProcessor(Repository repository) { } public PlanDefinitionProcessor(Repository repository, EvaluationSettings evaluationSettings) { - this(repository, evaluationSettings, null, null, null, null); + this(repository, evaluationSettings, null, null, null, null, null); } public PlanDefinitionProcessor( @@ -53,31 +56,37 @@ public PlanDefinitionProcessor( EvaluationSettings evaluationSettings, IApplyProcessor applyProcessor, IPackageProcessor packageProcessor, + IDataRequirementsProcessor dataRequirementsProcessor, org.opencds.cqf.fhir.cr.activitydefinition.apply.IApplyProcessor activityProcessor, IRequestResolverFactory requestResolverFactory) { this.repository = requireNonNull(repository, "repository can not be null"); this.evaluationSettings = requireNonNull(evaluationSettings, "evaluationSettings can not be null"); fhirVersion = this.repository.fhirContext().getVersion().getVersion(); modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); - this.packageProcessor = packageProcessor != null ? packageProcessor : new PackageProcessor(this.repository); - // These two classes will no longer be needed once we are able to call multiple operations against a - // HapiFhirRepository - this.requestResolverFactory = requestResolverFactory != null - ? requestResolverFactory - : IRequestResolverFactory.getDefault(fhirVersion); - this.activityProcessor = activityProcessor != null - ? activityProcessor - : new org.opencds.cqf.fhir.cr.activitydefinition.apply.ApplyProcessor( - this.repository, this.requestResolverFactory); - this.applyProcessor = applyProcessor != null - ? applyProcessor - : new ApplyProcessor(this.repository, modelResolver, this.activityProcessor); + this.packageProcessor = packageProcessor; + this.dataRequirementsProcessor = dataRequirementsProcessor; + this.requestResolverFactory = requestResolverFactory; + this.activityProcessor = activityProcessor; + this.applyProcessor = applyProcessor; } public EvaluationSettings evaluationSettings() { return evaluationSettings; } + protected void initApplyProcessor() { + activityProcessor = activityProcessor != null + ? activityProcessor + : new org.opencds.cqf.fhir.cr.activitydefinition.apply.ApplyProcessor( + repository, + requestResolverFactory != null + ? requestResolverFactory + : IRequestResolverFactory.getDefault(fhirVersion)); + applyProcessor = applyProcessor != null + ? applyProcessor + : new ApplyProcessor(repository, modelResolver, activityProcessor); + } + protected , R extends IBaseResource> R resolvePlanDefinition( Either3 planDefinition) { return new ResourceResolver("PlanDefinition", repository).resolve(planDefinition); @@ -104,7 +113,20 @@ public , R extends IBaseResource> IBaseBundle p } public IBaseBundle packagePlanDefinition(IBaseResource planDefinition, IBaseParameters parameters) { - return packageProcessor.packageResource(planDefinition, parameters); + var processor = packageProcessor != null ? packageProcessor : new PackageProcessor(repository); + return processor.packageResource(planDefinition, parameters); + } + + public , R extends IBaseResource> IBaseResource dataRequirements( + Either3 planDefinition, IBaseParameters parameters) { + return dataRequirements(resolvePlanDefinition(planDefinition), parameters); + } + + public IBaseResource dataRequirements(IBaseResource planDefinition, IBaseParameters parameters) { + var processor = dataRequirementsProcessor != null + ? dataRequirementsProcessor + : new DataRequirementsProcessor(repository, evaluationSettings); + return processor.getDataRequirements(planDefinition, parameters); } protected , R extends IBaseResource> ApplyRequest buildApplyRequest( @@ -119,8 +141,8 @@ protected , R extends IBaseResource> ApplyReque IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseParameters prefetchData, LibraryEngine libraryEngine) { if (StringUtils.isBlank(subject)) { @@ -139,7 +161,7 @@ protected , R extends IBaseResource> ApplyReque settingContext, parameters, useServerData, - bundle, + data, libraryEngine, modelResolver, null); @@ -186,8 +208,8 @@ public , R extends IBaseResource> IBaseResource IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseParameters prefetchData, IBaseResource dataEndpoint, IBaseResource contentEndpoint, @@ -205,7 +227,7 @@ public , R extends IBaseResource> IBaseResource settingContext, parameters, useServerData, - bundle, + data, prefetchData, createRestRepository(repository.fhirContext(), dataEndpoint), createRestRepository(repository.fhirContext(), contentEndpoint), @@ -224,8 +246,8 @@ public , R extends IBaseResource> IBaseResource IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseParameters prefetchData, Repository dataRepository, Repository contentRepository, @@ -244,7 +266,7 @@ public , R extends IBaseResource> IBaseResource settingContext, parameters, useServerData, - bundle, + data, prefetchData, new LibraryEngine(repository, this.evaluationSettings)); } @@ -261,8 +283,8 @@ public , R extends IBaseResource> IBaseResource IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseParameters prefetchData, LibraryEngine libraryEngine) { if (fhirVersion == FhirVersionEnum.R5) { @@ -279,7 +301,7 @@ public , R extends IBaseResource> IBaseResource settingContext, parameters, useServerData, - bundle, + data, prefetchData, libraryEngine); } @@ -298,12 +320,13 @@ public , R extends IBaseResource> IBaseResource settingContext, parameters, useServerData, - bundle, + data, prefetchData, libraryEngine)); } public IBaseResource apply(ApplyRequest request) { + initApplyProcessor(); return applyProcessor.apply(request); } @@ -319,8 +342,8 @@ public , R extends IBaseResource> IBaseBundle a IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseParameters prefetchData, IBaseResource dataEndpoint, IBaseResource contentEndpoint, @@ -338,7 +361,7 @@ public , R extends IBaseResource> IBaseBundle a settingContext, parameters, useServerData, - bundle, + data, prefetchData, createRestRepository(repository.fhirContext(), dataEndpoint), createRestRepository(repository.fhirContext(), contentEndpoint), @@ -357,8 +380,8 @@ public , R extends IBaseResource> IBaseBundle a IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseParameters prefetchData, Repository dataRepository, Repository contentRepository, @@ -377,7 +400,7 @@ public , R extends IBaseResource> IBaseBundle a settingContext, parameters, useServerData, - bundle, + data, prefetchData, new LibraryEngine(repository, this.evaluationSettings)); } @@ -394,8 +417,8 @@ public , R extends IBaseResource> IBaseBundle a IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, IBaseParameters prefetchData, LibraryEngine libraryEngine) { // TODO: add prefetch bundles to data bundle? @@ -413,12 +436,13 @@ public , R extends IBaseResource> IBaseBundle a settingContext, parameters, useServerData, - bundle, + data, prefetchData, libraryEngine)); } public IBaseBundle applyR5(ApplyRequest request) { + initApplyProcessor(); return applyProcessor.applyR5(request); } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyProcessor.java index 822e299cc..49b7f5326 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyProcessor.java @@ -7,9 +7,13 @@ import static org.opencds.cqf.fhir.utility.BundleHelper.getEntryResources; import static org.opencds.cqf.fhir.utility.BundleHelper.newBundle; import static org.opencds.cqf.fhir.utility.BundleHelper.newEntryWithResource; +import static org.opencds.cqf.fhir.utility.VersionUtilities.stringTypeForVersion; +import static org.opencds.cqf.fhir.utility.VersionUtilities.uriTypeForVersion; +import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Collections; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -22,6 +26,7 @@ import org.opencds.cqf.fhir.cr.common.ExtensionProcessor; import org.opencds.cqf.fhir.cr.common.ICpgRequest; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateProcessor; +import org.opencds.cqf.fhir.cr.questionnaire.populate.PopulateProcessor; import org.opencds.cqf.fhir.cr.questionnaireresponse.QuestionnaireResponseProcessor; import org.opencds.cqf.fhir.utility.Constants; import org.opencds.cqf.fhir.utility.Ids; @@ -43,6 +48,7 @@ public class ApplyProcessor implements IApplyProcessor { protected final ModelResolver modelResolver; protected final ExtensionProcessor extensionProcessor; protected final GenerateProcessor generateProcessor; + protected final PopulateProcessor populateProcessor; protected final QuestionnaireResponseProcessor extractProcessor; protected final ProcessRequest processRequest; protected final ProcessGoal processGoal; @@ -58,8 +64,9 @@ public ApplyProcessor( this.activityProcessor = activityProcessor; extensionProcessor = new ExtensionProcessor(); generateProcessor = new GenerateProcessor(this.repository); + populateProcessor = new PopulateProcessor(); extractProcessor = new QuestionnaireResponseProcessor(this.repository); - processRequest = new ProcessRequest(); + processRequest = new ProcessRequest(populateProcessor); processGoal = new ProcessGoal(); processAction = new ProcessAction(this.repository, this, generateProcessor); } @@ -100,32 +107,48 @@ public IBaseBundle applyR5(ApplyRequest request) { request.resolveOperationOutcome(requestOrchestration); var resultBundle = newBundle( request.getFhirVersion(), requestOrchestration.getIdElement().getIdPart(), null); - addEntry(resultBundle, newEntryWithResource(request.getFhirVersion(), requestOrchestration)); + addEntry(resultBundle, newEntryWithResource(requestOrchestration)); for (var resource : request.getRequestResources()) { - addEntry(resultBundle, newEntryWithResource(request.getFhirVersion(), resource)); - } - for (var resource : request.getExtractedResources()) { - addEntry(resultBundle, newEntryWithResource(request.getFhirVersion(), resource)); + addEntry(resultBundle, newEntryWithResource(resource)); } if (!request.getItems(request.getQuestionnaire()).isEmpty()) { - addEntry(resultBundle, newEntryWithResource(request.getFhirVersion(), request.getQuestionnaire())); + addEntry(resultBundle, newEntryWithResource(populateProcessor.populate(request.toPopulateRequest()))); } return resultBundle; } protected void initApply(ApplyRequest request) { - request.setQuestionnaire(generateProcessor.generate( - request.getPlanDefinition().getIdElement().getIdPart())); + var questionnaire = generateProcessor.generate( + request.getPlanDefinition().getIdElement().getIdPart()); + var url = request.resolvePathString(request.getPlanDefinition(), "url") + .replace("/PlanDefinition/", "/Questionnaire/"); + if (url != null) { + request.getModelResolver().setValue(questionnaire, "url", uriTypeForVersion(request.getFhirVersion(), url)); + } + var version = request.resolvePathString(request.getPlanDefinition(), "version"); + if (version != null) { + var subject = request.getSubjectId().getIdPart(); + var formatter = new SimpleDateFormat("yyyy-MM-dd-hh.mm.ssZ"); + request.getModelResolver() + .setValue( + questionnaire, + "version", + stringTypeForVersion( + request.getFhirVersion(), + version.concat(String.format("-%s-%s", subject, formatter.format(new Date()))))); + } + request.setQuestionnaire(questionnaire); + request.addCqlLibraryExtension(); extractQuestionnaireResponse(request); } protected void extractQuestionnaireResponse(ApplyRequest request) { - if (request.getBundle() == null) { + if (request.getData() == null) { return; } - var questionnaireResponses = getEntryResources(request.getBundle()).stream() + var questionnaireResponses = getEntryResources(request.getData()).stream() .filter(r -> r.fhirType().equals("QuestionnaireResponse")) .collect(Collectors.toList()); if (questionnaireResponses != null && !questionnaireResponses.isEmpty()) { @@ -133,12 +156,13 @@ protected void extractQuestionnaireResponse(ApplyRequest request) { try { var extractBundle = extractProcessor.extract( Eithers.forRight(questionnaireResponse), + null, request.getParameters(), - request.getBundle(), + request.getData(), + request.getUseServerData(), request.getLibraryEngine()); - request.getExtractedResources().add(questionnaireResponse); for (var entry : getEntry(extractBundle)) { - addEntry(request.getBundle(), entry); + addEntry(request.getData(), entry); // Not adding extracted resources back into the response to reduce size of payload // $extract can be called on the QuestionnaireResponse if these are desired // request.getExtractedResources().add(getEntryResource(request.getFhirVersion(), entry)); @@ -163,7 +187,6 @@ public IBaseResource applyPlanDefinition(ApplyRequest request) { processGoals(request, requestOrchestration); var metConditions = new HashMap(); for (var action : request.resolvePathList(request.getPlanDefinition(), "action", IBaseBackboneElement.class)) { - // TODO - Apply input/output dataRequirements? request.getModelResolver() .setValue( requestOrchestration, diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequest.java index a41802f58..6370726d3 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequest.java @@ -10,23 +10,31 @@ import static org.opencds.cqf.fhir.utility.Constants.APPLY_PARAMETER_PLAN_DEFINITION; import static org.opencds.cqf.fhir.utility.Constants.APPLY_PARAMETER_PRACTITIONER; import static org.opencds.cqf.fhir.utility.Constants.APPLY_PARAMETER_SUBJECT; +import static org.opencds.cqf.fhir.utility.Parameters.newPart; +import static org.opencds.cqf.fhir.utility.Parameters.newStringPart; import ca.uhn.fhir.context.FhirVersionEnum; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseDatatype; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; +import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IIdType; import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.common.ICpgRequest; import org.opencds.cqf.fhir.cr.inputparameters.IInputParameterResolver; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateRequest; +import org.opencds.cqf.fhir.cr.questionnaire.populate.PopulateRequest; +import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.adapter.QuestionnaireAdapter; public class ApplyRequest implements ICpgRequest { private final IBaseResource planDefinition; @@ -40,8 +48,8 @@ public class ApplyRequest implements ICpgRequest { private final IBaseDatatype setting; private final IBaseDatatype settingContext; private final IBaseParameters parameters; - private final Boolean useServerData; - private IBaseBundle bundle; + private final boolean useServerData; + private IBaseBundle data; private final LibraryEngine libraryEngine; private final ModelResolver modelResolver; private final FhirVersionEnum fhirVersion; @@ -51,6 +59,7 @@ public class ApplyRequest implements ICpgRequest { private final Collection extractedResources; private IBaseOperationOutcome operationOutcome; private IBaseResource questionnaire; + private QuestionnaireAdapter questionnaireAdapter; private Boolean containResources; public ApplyRequest( @@ -65,12 +74,14 @@ public ApplyRequest( IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, LibraryEngine libraryEngine, ModelResolver modelResolver, IInputParameterResolver inputParameterResolver) { + checkNotNull(planDefinition, "expected non-null value for planDefinition"); checkNotNull(libraryEngine, "expected non-null value for libraryEngine"); + checkNotNull(modelResolver, "expected non-null value for modelResolver"); this.planDefinition = planDefinition; this.subjectId = subjectId; this.encounterId = encounterId; @@ -83,7 +94,7 @@ public ApplyRequest( this.settingContext = settingContext; this.parameters = parameters; this.useServerData = useServerData; - this.bundle = bundle; + this.data = data; this.libraryEngine = libraryEngine; this.modelResolver = modelResolver; fhirVersion = planDefinition.getStructureFhirVersionEnum(); @@ -96,7 +107,7 @@ public ApplyRequest( this.practitionerId, this.parameters, this.useServerData, - this.bundle); + this.data); defaultLibraryUrl = resolveDefaultLibraryUrl(); requestResources = new ArrayList<>(); extractedResources = new ArrayList<>(); @@ -117,7 +128,7 @@ public ApplyRequest copy(IBaseResource planDefinition) { settingContext, parameters, useServerData, - bundle, + data, libraryEngine, modelResolver, inputParameterResolver) @@ -139,17 +150,53 @@ public org.opencds.cqf.fhir.cr.activitydefinition.apply.ApplyRequest toActivityR getSettingContext(), getParameters(), getUseServerData(), - getBundle(), + getData(), libraryEngine, modelResolver); } public GenerateRequest toGenerateRequest(IBaseResource profile) { - return new GenerateRequest(profile, false, true, subjectId, parameters, bundle, libraryEngine, modelResolver) + return new GenerateRequest( + profile, false, true, subjectId, parameters, useServerData, data, libraryEngine, modelResolver) .setDefaultLibraryUrl(defaultLibraryUrl) .setQuestionnaire(questionnaire); } + public PopulateRequest toPopulateRequest() { + List context = new ArrayList<>(); + var launchContextExts = + getQuestionnaireAdapter().getExtensionsByUrl(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT); + launchContextExts.forEach(lc -> { + var code = lc.getExtension().stream() + .map(c -> (IBaseExtension) c) + .filter(c -> c.getUrl().equals("name")) + .map(c -> resolvePathString(c.getValue(), "code")) + .findFirst() + .orElse(null); + String value = null; + switch (Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE.valueOf(code.toUpperCase())) { + case PATIENT: + value = subjectId.getValue(); + break; + case ENCOUNTER: + value = encounterId.getValue(); + break; + case USER: + value = practitionerId.getValue(); + break; + default: + break; + } + context.add(newPart( + getFhirContext(), + "context", + newStringPart(getFhirContext(), "name", code), + newPart(getFhirContext(), "Reference", "content", value))); + }); + return new PopulateRequest( + questionnaire, subjectId, context, null, parameters, data, useServerData, libraryEngine, modelResolver); + } + public IBaseResource getPlanDefinition() { return planDefinition; } @@ -200,12 +247,12 @@ public IBaseDatatype getSettingContext() { } @Override - public IBaseBundle getBundle() { - return bundle; + public IBaseBundle getData() { + return data; } @Override - public Boolean getUseServerData() { + public boolean getUseServerData() { return useServerData; } @@ -251,7 +298,16 @@ public String getOperationName() { @Override public IBaseResource getQuestionnaire() { - return this.questionnaire; + return questionnaire; + } + + @Override + public QuestionnaireAdapter getQuestionnaireAdapter() { + if (questionnaireAdapter == null && questionnaire != null) { + questionnaireAdapter = (QuestionnaireAdapter) + getAdapterFactory().createKnowledgeArtifactAdapter((IDomainResource) questionnaire); + } + return questionnaireAdapter; } public ApplyRequest setQuestionnaire(IBaseResource questionnaire) { @@ -259,8 +315,8 @@ public ApplyRequest setQuestionnaire(IBaseResource questionnaire) { return this; } - public ApplyRequest setBundle(IBaseBundle bundle) { - this.bundle = bundle; + public ApplyRequest setData(IBaseBundle bundle) { + data = bundle; return this; } @@ -323,9 +379,9 @@ protected IBaseParameters transformRequestParametersDstu3(IBaseResource resource params.addParameter(org.opencds.cqf.fhir.utility.dstu3.Parameters.part( APPLY_PARAMETER_PARAMETERS, (org.hl7.fhir.dstu3.model.Parameters) getParameters())); } - if (getBundle() != null) { + if (getData() != null) { params.addParameter(org.opencds.cqf.fhir.utility.dstu3.Parameters.part( - APPLY_PARAMETER_DATA, (org.hl7.fhir.dstu3.model.Resource) getBundle())); + APPLY_PARAMETER_DATA, (org.hl7.fhir.dstu3.model.Resource) getData())); } return params; @@ -356,9 +412,9 @@ protected IBaseParameters transformRequestParametersR4(IBaseResource resource) { params.addParameter(org.opencds.cqf.fhir.utility.r4.Parameters.part( APPLY_PARAMETER_PARAMETERS, (org.hl7.fhir.r4.model.Parameters) getParameters())); } - if (getBundle() != null) { + if (getData() != null) { params.addParameter(org.opencds.cqf.fhir.utility.r4.Parameters.part( - APPLY_PARAMETER_DATA, (org.hl7.fhir.r4.model.Resource) getBundle())); + APPLY_PARAMETER_DATA, (org.hl7.fhir.r4.model.Resource) getData())); } return params; @@ -389,9 +445,9 @@ protected IBaseParameters transformRequestParametersR5(IBaseResource resource) { params.addParameter(org.opencds.cqf.fhir.utility.r5.Parameters.part( APPLY_PARAMETER_PARAMETERS, (org.hl7.fhir.r5.model.Parameters) getParameters())); } - if (getBundle() != null) { + if (getData() != null) { params.addParameter(org.opencds.cqf.fhir.utility.r5.Parameters.part( - APPLY_PARAMETER_DATA, (org.hl7.fhir.r5.model.Resource) getBundle())); + APPLY_PARAMETER_DATA, (org.hl7.fhir.r5.model.Resource) getData())); } return params; diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessAction.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessAction.java index f5c843753..60e8f2a8a 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessAction.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessAction.java @@ -20,7 +20,6 @@ import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; import org.opencds.cqf.fhir.cr.common.ExtensionProcessor; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateProcessor; -import org.opencds.cqf.fhir.utility.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,9 +47,8 @@ public IBaseBackboneElement processAction( IBaseResource requestOrchestration, Map metConditions, IBaseBackboneElement action) { - if (request.hasExtension(request.getPlanDefinition(), Constants.CPG_QUESTIONNAIRE_GENERATE)) { - addQuestionnaireItemForInput(request, action); - } + // Create Questionnaire items for any input profiles that are present on the action + addQuestionnaireItemForInput(request, action); if (Boolean.TRUE.equals(meetsConditions(request, action, requestOrchestration))) { // TODO: Figure out why this was here and what it was trying to do @@ -98,9 +96,10 @@ protected void addQuestionnaireItemForInput(ApplyRequest request, IBaseBackboneE } var profile = searchRepositoryByCanonical(repository, profiles.get(0)); var generateRequest = request.toGenerateRequest(profile); - request.addQuestionnaireItem(generateProcessor.generateItem(generateRequest)); + var item = generateProcessor.generateItem(generateRequest); + request.addQuestionnaireItem(item.getLeft()); + request.addLaunchContextExtensions(item.getRight()); // If input has text extension use it to override - // resolve extensions or not? } } catch (Exception e) { var message = String.format( diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequest.java index 67de5839f..71487de84 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequest.java @@ -3,11 +3,16 @@ import java.util.Collections; import java.util.stream.Collectors; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.opencds.cqf.fhir.cr.questionnaire.populate.IPopulateProcessor; import org.opencds.cqf.fhir.utility.Constants; import org.opencds.cqf.fhir.utility.Ids; public class ProcessRequest { - public ProcessRequest() {} + protected final IPopulateProcessor populateProcessor; + + public ProcessRequest(IPopulateProcessor populateProcessor) { + this.populateProcessor = populateProcessor; + } public IBaseResource generateRequestOrchestration(ApplyRequest request) { switch (request.getFhirVersion()) { @@ -188,7 +193,8 @@ protected IBaseResource generateCarePlanDstu3(ApplyRequest request, IBaseResourc var questionnaire = (org.hl7.fhir.dstu3.model.Questionnaire) request.getQuestionnaire(); if (questionnaire != null && questionnaire.hasItem()) { - carePlan.addContained(questionnaire); + carePlan.addContained((org.hl7.fhir.dstu3.model.Resource) + populateProcessor.processResponse(request.toPopulateRequest(), request.getItems(questionnaire))); } return carePlan; diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessor.java index de15c5e34..691b17ecc 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessor.java @@ -7,8 +7,11 @@ import static org.opencds.cqf.fhir.utility.repository.Repositories.proxy; import ca.uhn.fhir.context.FhirVersionEnum; +import java.util.List; import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -17,6 +20,8 @@ import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.EvaluationSettings; import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.cr.common.DataRequirementsProcessor; +import org.opencds.cqf.fhir.cr.common.IDataRequirementsProcessor; import org.opencds.cqf.fhir.cr.common.IPackageProcessor; import org.opencds.cqf.fhir.cr.common.PackageProcessor; import org.opencds.cqf.fhir.cr.common.ResourceResolver; @@ -41,6 +46,7 @@ public class QuestionnaireProcessor { protected Repository repository; protected IGenerateProcessor generateProcessor; protected IPackageProcessor packageProcessor; + protected IDataRequirementsProcessor dataRequirementsProcessor; protected IPopulateProcessor populateProcessor; public QuestionnaireProcessor(Repository repository) { @@ -48,7 +54,7 @@ public QuestionnaireProcessor(Repository repository) { } public QuestionnaireProcessor(Repository repository, EvaluationSettings evaluationSettings) { - this(repository, evaluationSettings, null, null, null); + this(repository, evaluationSettings, null, null, null, null); } public QuestionnaireProcessor( @@ -56,6 +62,7 @@ public QuestionnaireProcessor( EvaluationSettings evaluationSettings, IGenerateProcessor generateProcessor, IPackageProcessor packageProcessor, + IDataRequirementsProcessor dataRequirementsProcessor, IPopulateProcessor populateProcessor) { this.repository = requireNonNull(repository, "repository can not be null"); this.evaluationSettings = requireNonNull(evaluationSettings, "evaluationSettings can not be null"); @@ -63,23 +70,24 @@ public QuestionnaireProcessor( this.structureDefResolver = new ResourceResolver("StructureDefinition", this.repository); fhirVersion = this.repository.fhirContext().getVersion().getVersion(); modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); - this.generateProcessor = generateProcessor != null ? generateProcessor : new GenerateProcessor(this.repository); - this.packageProcessor = packageProcessor != null ? packageProcessor : new PackageProcessor(this.repository); - this.populateProcessor = populateProcessor != null ? populateProcessor : new PopulateProcessor(); + this.generateProcessor = generateProcessor; + this.packageProcessor = packageProcessor; + this.dataRequirementsProcessor = dataRequirementsProcessor; + this.populateProcessor = populateProcessor; } public , R extends IBaseResource> R resolveQuestionnaire( Either3 questionnaire) { - return (R) questionnaireResolver.resolve(questionnaire); + return questionnaireResolver.resolve(questionnaire); } public , R extends IBaseResource> R resolveStructureDefinition( Either3 structureDef) { - return (R) structureDefResolver.resolve(structureDef); + return structureDefResolver.resolve(structureDef); } public IBaseResource generateQuestionnaire(String id) { - return generateProcessor.generate(id); + return generateQuestionnaire(null, id); } public , R extends IBaseResource> IBaseResource generateQuestionnaire( @@ -88,19 +96,19 @@ public , R extends IBaseResource> IBaseResource } public , R extends IBaseResource> IBaseResource generateQuestionnaire( - Either3 profile, Boolean supportedOnly, Boolean requiredOnly) { + Either3 profile, boolean supportedOnly, boolean requiredOnly) { return generateQuestionnaire( - profile, supportedOnly, requiredOnly, null, null, null, null, (IBaseResource) null, null, null, null); + profile, supportedOnly, requiredOnly, null, null, null, true, (IBaseResource) null, null, null, null); } public , R extends IBaseResource> IBaseResource generateQuestionnaire( Either3 profile, - Boolean supportedOnly, - Boolean requiredOnly, + boolean supportedOnly, + boolean requiredOnly, String subjectId, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, IBaseResource dataEndpoint, IBaseResource contentEndpoint, IBaseResource terminologyEndpoint, @@ -111,7 +119,7 @@ public , R extends IBaseResource> IBaseResource requiredOnly, subjectId, parameters, - bundle, + data, useServerData, createRestRepository(repository.fhirContext(), dataEndpoint), createRestRepository(repository.fhirContext(), contentEndpoint), @@ -121,12 +129,12 @@ public , R extends IBaseResource> IBaseResource public , R extends IBaseResource> IBaseResource generateQuestionnaire( Either3 profile, - Boolean supportedOnly, - Boolean requiredOnly, + boolean supportedOnly, + boolean requiredOnly, String subjectId, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, Repository dataRepository, Repository contentRepository, Repository terminologyRepository, @@ -138,18 +146,20 @@ public , R extends IBaseResource> IBaseResource requiredOnly, subjectId, parameters, - bundle, + data, + useServerData, new LibraryEngine(repository, evaluationSettings), id); } public , R extends IBaseResource> IBaseResource generateQuestionnaire( Either3 profile, - Boolean supportedOnly, - Boolean requiredOnly, + boolean supportedOnly, + boolean requiredOnly, String subjectId, IBaseParameters parameters, - IBaseBundle bundle, + IBaseBundle data, + boolean useServerData, LibraryEngine libraryEngine, String id) { var request = new GenerateRequest( @@ -158,14 +168,16 @@ public , R extends IBaseResource> IBaseResource requiredOnly, subjectId == null ? null : Ids.newId(fhirVersion, Ids.ensureIdType(subjectId, SUBJECT_TYPE)), parameters, - bundle, + useServerData, + data, libraryEngine == null ? new LibraryEngine(repository, evaluationSettings) : libraryEngine, modelResolver); return generateQuestionnaire(request, id); } public IBaseResource generateQuestionnaire(GenerateRequest request, String id) { - return generateProcessor.generate(request, id); + var processor = generateProcessor != null ? generateProcessor : new GenerateProcessor(this.repository); + return request == null ? processor.generate(id) : processor.generate(request, id); } public > IBaseBundle packageQuestionnaire( @@ -189,111 +201,64 @@ public > IBaseBundle packageQuestionnaire( } public IBaseBundle packageQuestionnaire(IBaseResource questionnaire, IBaseParameters parameters) { - return packageProcessor.packageResource(questionnaire, parameters); + var processor = packageProcessor != null ? packageProcessor : new PackageProcessor(repository); + return processor.packageResource(questionnaire, parameters); + } + + public , R extends IBaseResource> IBaseResource dataRequirements( + Either3 questionnaire, IBaseParameters parameters) { + return dataRequirements(resolveQuestionnaire(questionnaire), parameters); + } + + public IBaseResource dataRequirements(IBaseResource questionnaire, IBaseParameters parameters) { + var processor = dataRequirementsProcessor != null + ? dataRequirementsProcessor + : new DataRequirementsProcessor(repository); + return processor.getDataRequirements(questionnaire, parameters); } public PopulateRequest buildPopulateRequest( - String operationName, IBaseResource questionnaire, String subjectId, + List context, + IBaseExtension launchContext, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, LibraryEngine libraryEngine) { if (StringUtils.isBlank(subjectId)) { throw new IllegalArgumentException("Missing required parameter: 'subject'"); } return new PopulateRequest( - operationName, questionnaire, Ids.newId(fhirVersion, Ids.ensureIdType(subjectId, SUBJECT_TYPE)), + context, + launchContext, parameters, - bundle, + data, useServerData, libraryEngine != null ? libraryEngine : new LibraryEngine(repository, evaluationSettings), modelResolver); } - public , R extends IBaseResource> R prePopulate( - Either3 questionnaire, - String patientId, - IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, - IBaseResource dataEndpoint, - IBaseResource contentEndpoint, - IBaseResource terminologyEndpoint) { - return prePopulate( - questionnaire, - patientId, - parameters, - bundle, - useServerData, - createRestRepository(repository.fhirContext(), dataEndpoint), - createRestRepository(repository.fhirContext(), contentEndpoint), - createRestRepository(repository.fhirContext(), terminologyEndpoint)); - } - - public , R extends IBaseResource> R prePopulate( - Either3 questionnaire, - String patientId, - IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, - Repository dataRepository, - Repository contentRepository, - Repository terminologyRepository) { - repository = proxy(repository, useServerData, dataRepository, contentRepository, terminologyRepository); - return prePopulate( - questionnaire, - patientId, - parameters, - bundle, - useServerData, - new LibraryEngine(repository, evaluationSettings)); - } - - public , R extends IBaseResource> R prePopulate( - Either3 questionnaire, - String patientId, - IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, - LibraryEngine libraryEngine) { - return prePopulate( - resolveQuestionnaire(questionnaire), patientId, parameters, bundle, useServerData, libraryEngine); - } - - public R prePopulate( - IBaseResource questionnaire, - String subjectId, - IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, - LibraryEngine libraryEngine) { - return prePopulate(buildPopulateRequest( - "prepopulate", questionnaire, subjectId, parameters, bundle, useServerData, libraryEngine)); - } - - @SuppressWarnings("unchecked") - public R prePopulate(PopulateRequest request) { - return (R) populateProcessor.prePopulate(request); - } - public , R extends IBaseResource> IBaseResource populate( Either3 questionnaire, - String patientId, + String subjectId, + List context, + IBaseExtension launchContext, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, IBaseResource dataEndpoint, IBaseResource contentEndpoint, IBaseResource terminologyEndpoint) { return populate( questionnaire, - patientId, + subjectId, + context, + launchContext, parameters, - bundle, + data, useServerData, createRestRepository(repository.fhirContext(), dataEndpoint), createRestRepository(repository.fhirContext(), contentEndpoint), @@ -302,46 +267,62 @@ public , R extends IBaseResource> IBaseResource public , R extends IBaseResource> IBaseResource populate( Either3 questionnaire, - String patientId, + String subjectId, + List context, + IBaseExtension launchContext, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, Repository dataRepository, Repository contentRepository, Repository terminologyRepository) { repository = proxy(repository, useServerData, dataRepository, contentRepository, terminologyRepository); return populate( questionnaire, - patientId, + subjectId, + context, + launchContext, parameters, - bundle, + data, useServerData, new LibraryEngine(repository, this.evaluationSettings)); } public , R extends IBaseResource> IBaseResource populate( Either3 questionnaire, - String patientId, + String subjectId, + List context, + IBaseExtension launchContext, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, LibraryEngine libraryEngine) { return populate( - resolveQuestionnaire(questionnaire), patientId, parameters, bundle, useServerData, libraryEngine); + resolveQuestionnaire(questionnaire), + subjectId, + context, + launchContext, + parameters, + data, + useServerData, + libraryEngine); } public IBaseResource populate( IBaseResource questionnaire, String subjectId, + List context, + IBaseExtension launchContext, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, LibraryEngine libraryEngine) { return populate(buildPopulateRequest( - "populate", questionnaire, subjectId, parameters, bundle, useServerData, libraryEngine)); + questionnaire, subjectId, context, launchContext, parameters, data, useServerData, libraryEngine)); } public IBaseResource populate(PopulateRequest request) { - return populateProcessor.populate(request); + var processor = populateProcessor != null ? populateProcessor : new PopulateProcessor(); + return processor.populate(request); } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementHasCaseFeature.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementHasCaseFeature.java index 8f2769149..2048d4baa 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementHasCaseFeature.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementHasCaseFeature.java @@ -1,27 +1,58 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate; -import java.util.List; -import org.hl7.fhir.instance.model.api.IBaseResource; +import ca.uhn.fhir.context.FhirVersionEnum; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.ICompositeType; -import org.opencds.cqf.fhir.cr.common.IOperationRequest; +import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.CqfExpression; public class ElementHasCaseFeature { - public Object getPathValue(IOperationRequest request, IBaseResource caseFeature, ICompositeType element) { - Object pathValue = null; + public IBaseBackboneElement addProperties( + GenerateRequest request, + CqfExpression caseFeature, + ICompositeType element, + IBaseBackboneElement questionnaireItem) { var elementPath = request.resolvePathString(element, "path"); - var pathSplit = elementPath.split("\\."); - if (pathSplit.length > 2) { - pathValue = caseFeature; - for (int i = 1; i < pathSplit.length; i++) { - if (pathValue instanceof List) { - pathValue = ((List) pathValue).isEmpty() ? null : ((List) pathValue).get(0); + var path = elementPath.substring(elementPath.indexOf(".")).replaceAll("\\[[^\\[]*\\]", ""); + var expression = caseFeature.getName(); + var expressionType = createExpression( + request.getFhirVersion(), + "%" + String.format("%s%s", expression, path), + caseFeature.getLibraryUrl(), + null); + if (expressionType != null) { + var initialExpressionExt = questionnaireItem.addExtension(); + initialExpressionExt.setUrl(Constants.SDC_QUESTIONNAIRE_INITIAL_EXPRESSION); + initialExpressionExt.setValue(expressionType); + } + return questionnaireItem; + } + + private ICompositeType createExpression( + FhirVersionEnum fhirVersion, String expression, String libraryRef, String name) { + switch (fhirVersion) { + case R4: + var r4Expression = new org.hl7.fhir.r4.model.Expression() + .setLanguage("text/cql-expression") + .setExpression(expression) + .setName(name); + if (StringUtils.isNotBlank(libraryRef)) { + r4Expression.setReference(libraryRef); } - pathValue = request.getModelResolver().resolvePath(pathValue, pathSplit[i].replace("[x]", "")); - } - } else { - var path = pathSplit[pathSplit.length - 1].replace("[x]", ""); - pathValue = request.getModelResolver().resolvePath(caseFeature, path); + return r4Expression; + case R5: + var r5Expression = new org.hl7.fhir.r5.model.Expression() + .setLanguage("text/cql-expression") + .setExpression(expression) + .setName(name); + if (StringUtils.isNotBlank(libraryRef)) { + r5Expression.setReference(libraryRef); + } + return r5Expression; + + default: + return null; } - return pathValue; } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementHasCqfExpression.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementHasCqfExpression.java deleted file mode 100644 index 3f2c20bec..000000000 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementHasCqfExpression.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.opencds.cqf.fhir.cr.questionnaire.generate; - -import static org.opencds.cqf.fhir.cr.common.ExtensionBuilders.buildReference; -import static org.opencds.cqf.fhir.cr.questionnaire.generate.IElementProcessor.createInitial; - -import ca.uhn.fhir.context.FhirVersionEnum; -import java.util.List; -import org.hl7.fhir.instance.model.api.IAnyResource; -import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.instance.model.api.IBaseDatatype; -import org.hl7.fhir.instance.model.api.IBaseExtension; -import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; -import org.opencds.cqf.fhir.cr.common.IOperationRequest; -import org.opencds.cqf.fhir.utility.Constants; - -public class ElementHasCqfExpression { - protected final ExpressionProcessor expressionProcessor; - - public ElementHasCqfExpression() { - this(new ExpressionProcessor()); - } - - public ElementHasCqfExpression(ExpressionProcessor expressionProcessor) { - this.expressionProcessor = expressionProcessor; - } - - public IBaseBackboneElement addProperties( - IOperationRequest request, List> extensions, IBaseBackboneElement questionnaireItem) { - final var expressionExtensionUrl = request.getFhirVersion() == FhirVersionEnum.DSTU3 - ? Constants.CQIF_CQL_EXPRESSION - : Constants.CQF_EXPRESSION; - final var expression = expressionProcessor.getCqfExpression(request, extensions, expressionExtensionUrl); - final List results = expressionProcessor.getExpressionResult(request, expression); - results.forEach(result -> { - if (IAnyResource.class.isAssignableFrom(result.getClass())) { - addResourceValue(request, (IAnyResource) result, questionnaireItem); - } else { - addTypeValue(request, result, questionnaireItem); - } - }); - return questionnaireItem; - } - - protected void addResourceValue( - IOperationRequest request, IAnyResource resource, IBaseBackboneElement questionnaireItem) { - final var reference = buildReference(request.getFhirVersion(), resource.getId()); - var initial = createInitial(request, reference); - request.getModelResolver().setValue(questionnaireItem, "initial", initial); - } - - protected void addTypeValue(IOperationRequest request, IBase result, IBaseBackboneElement questionnaireItem) { - var initial = createInitial(request, (IBaseDatatype) result); - request.getModelResolver().setValue(questionnaireItem, "initial", initial); - } -} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateProcessor.java index db4858036..8d04a2a8a 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateProcessor.java @@ -3,10 +3,14 @@ import static org.opencds.cqf.fhir.utility.SearchHelper.searchRepositoryByCanonical; import ca.uhn.fhir.context.FhirVersionEnum; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.List; import java.util.stream.Collectors; +import org.apache.commons.lang3.tuple.Pair; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.IPrimitiveType; @@ -43,12 +47,24 @@ public IBaseResource generate(String id) { public IBaseResource generate(GenerateRequest request, String id) { request.setQuestionnaire( generate(id == null ? request.getProfile().getIdElement().getIdPart() : id)); - request.addQuestionnaireItem(generateItem(request)); + var formatter = new SimpleDateFormat("yyyy-MM-dd-hh.mm.ssZ"); + request.getQuestionnaireAdapter() + .setVersion( + String.format("%s-%s", request.getProfileAdapter().getVersion(), formatter.format(new Date()))); + var item = generateItem(request); + request.addQuestionnaireItem(item.getLeft()); + if (!item.getRight().isEmpty()) { + // Add launchContexts + request.addLaunchContextExtensions(item.getRight()); + } return request.getQuestionnaire(); } @Override - public IBaseBackboneElement generateItem(GenerateRequest request) { + public Pair>> generateItem(GenerateRequest request) { + logger.info( + "Generating Questionnaire Item for StructureDefinition/{}", + request.getProfile().getIdElement().getIdPart()); request.setDifferentialElements( getElements(request, request.resolvePath(request.getProfile(), "differential"))); request.setSnapshotElements(getElements(request, getProfileSnapshot(request))); @@ -100,11 +116,14 @@ protected IBase getProfileSnapshot(GenerateRequest request) { protected IBaseResource createQuestionnaire() { switch (fhirVersion) { case DSTU3: - return new org.hl7.fhir.dstu3.model.Questionnaire(); + return new org.hl7.fhir.dstu3.model.Questionnaire() + .setStatus(org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus.ACTIVE); case R4: - return new org.hl7.fhir.r4.model.Questionnaire(); + return new org.hl7.fhir.r4.model.Questionnaire() + .setStatus(org.hl7.fhir.r4.model.Enumerations.PublicationStatus.ACTIVE); case R5: - return new org.hl7.fhir.r5.model.Questionnaire(); + return new org.hl7.fhir.r5.model.Questionnaire() + .setStatus(org.hl7.fhir.r5.model.Enumerations.PublicationStatus.ACTIVE); default: return null; diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateRequest.java index f7fa5b0f4..a19e8753f 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/GenerateRequest.java @@ -1,5 +1,7 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate; +import static com.google.common.base.Preconditions.checkNotNull; + import ca.uhn.fhir.context.FhirVersionEnum; import java.util.List; import org.hl7.fhir.dstu3.model.Reference; @@ -8,58 +10,78 @@ import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; +import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.common.IQuestionnaireRequest; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.adapter.QuestionnaireAdapter; +import org.opencds.cqf.fhir.utility.adapter.StructureDefinitionAdapter; public class GenerateRequest implements IQuestionnaireRequest { - private final Boolean supportedOnly; - private final Boolean requiredOnly; + private final boolean supportedOnly; + private final boolean requiredOnly; private final IIdType subjectId; private final IBaseParameters parameters; - private final IBaseBundle bundle; + private final boolean useServerData; + private final IBaseBundle data; private final LibraryEngine libraryEngine; private final ModelResolver modelResolver; private final FhirVersionEnum fhirVersion; private final IBaseResource profile; - private final String profileUrl; private String defaultLibraryUrl; private IBaseResource questionnaire; + private QuestionnaireAdapter questionnaireAdapter; + private StructureDefinitionAdapter profileAdapter; private List differentialElements; private List snapshotElements; public GenerateRequest( IBaseResource profile, - Boolean supportedOnly, - Boolean requiredOnly, + boolean supportedOnly, + boolean requiredOnly, IIdType subjectId, IBaseParameters parameters, - IBaseBundle bundle, + boolean useServerData, + IBaseBundle data, LibraryEngine libraryEngine, ModelResolver modelResolver) { + checkNotNull(libraryEngine, "expected non-null value for libraryEngine"); + checkNotNull(modelResolver, "expected non-null value for modelResolver"); this.profile = profile; this.supportedOnly = supportedOnly; this.requiredOnly = requiredOnly; this.subjectId = subjectId; this.parameters = parameters; - this.bundle = bundle; + this.useServerData = useServerData; + this.data = data; this.libraryEngine = libraryEngine; this.modelResolver = modelResolver; fhirVersion = this.libraryEngine.getRepository().fhirContext().getVersion().getVersion(); defaultLibraryUrl = resolveDefaultLibraryUrl(); - profileUrl = resolvePathString(this.profile, "url"); } public IBaseResource getProfile() { return profile; } - public String getProfileUrl() { - return profileUrl; + public StructureDefinitionAdapter getProfileAdapter() { + if (profileAdapter == null) { + profileAdapter = (StructureDefinitionAdapter) + getAdapterFactory().createKnowledgeArtifactAdapter((IDomainResource) profile); + } + return profileAdapter; + } + + public QuestionnaireAdapter getQuestionnaireAdapter() { + if (questionnaireAdapter == null && questionnaire != null) { + questionnaireAdapter = (QuestionnaireAdapter) + getAdapterFactory().createKnowledgeArtifactAdapter((IDomainResource) questionnaire); + } + return questionnaireAdapter; } public void setDifferentialElements(List elements) { @@ -109,8 +131,13 @@ public IIdType getSubjectId() { } @Override - public IBaseBundle getBundle() { - return bundle; + public IBaseBundle getData() { + return data; + } + + @Override + public boolean getUseServerData() { + return useServerData; } @Override diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IElementProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IElementProcessor.java index b94c87c7d..ca7954426 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IElementProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IElementProcessor.java @@ -5,10 +5,10 @@ import java.util.Collections; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseDatatype; -import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cr.common.IOperationRequest; +import org.opencds.cqf.fhir.utility.CqfExpression; public interface IElementProcessor { IBaseBackboneElement processElement( @@ -16,7 +16,7 @@ IBaseBackboneElement processElement( ICompositeType element, String elementType, String childLinkId, - IBaseResource caseFeature, + CqfExpression caseFeature, Boolean isGroup); public static IElementProcessor createProcessor(Repository repository) { diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IGenerateProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IGenerateProcessor.java index 78bc9f823..fd5cb85ee 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IGenerateProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/IGenerateProcessor.java @@ -1,6 +1,9 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate; +import java.util.List; +import org.apache.commons.lang3.tuple.Pair; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseResource; public interface IGenerateProcessor { @@ -8,5 +11,11 @@ public interface IGenerateProcessor { IBaseResource generate(GenerateRequest request, String id); - IBaseBackboneElement generateItem(GenerateRequest request); + /** + * Generates a Questionnaire item from a StructureDefinition Profile and returns + * a Pair containing the Questionnaire item and the url of the supporting CQL Library if present + * @param request + * @return + */ + Pair>> generateItem(GenerateRequest request); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGenerator.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGenerator.java index a41f757b2..2f8f3b448 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGenerator.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGenerator.java @@ -1,22 +1,31 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate; +import static org.opencds.cqf.fhir.cr.common.ExtensionBuilders.buildSdcLaunchContextExt; +import static org.opencds.cqf.fhir.utility.VersionUtilities.codeTypeForVersion; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBooleanDatatype; -import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.opencds.cqf.cql.engine.execution.CqlEngine; import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.Engines; import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; import org.opencds.cqf.fhir.cr.common.ExtensionProcessor; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE; import org.opencds.cqf.fhir.utility.CqfExpression; +import org.opencds.cqf.fhir.utility.SearchHelper; +import org.opencds.cqf.fhir.utility.VersionUtilities; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -26,10 +35,8 @@ public class ItemGenerator { protected static final String ITEM_CREATION_ERROR = "An error occurred during item creation: %s"; protected static final String CHILD_LINK_ID_FORMAT = "%s.%s"; - public static final List INPUT_EXTENSION_LIST = - Arrays.asList(Constants.CPG_INPUT_DESCRIPTION, Constants.CPG_FEATURE_EXPRESSION); - protected final Repository repository; + protected final CqlEngine engine; protected final IElementProcessor elementProcessor; protected final ExpressionProcessor expressionProcessor; protected final ExtensionProcessor extensionProcessor; @@ -40,59 +47,68 @@ public ItemGenerator(Repository repository) { public ItemGenerator(Repository repository, IElementProcessor elementProcessor) { this.repository = repository; + engine = Engines.forRepository(this.repository); this.elementProcessor = elementProcessor; expressionProcessor = new ExpressionProcessor(); extensionProcessor = new ExtensionProcessor(); } - public IBaseBackboneElement generate(GenerateRequest request) { + public Pair>> generate(GenerateRequest request) { final String linkId = String.valueOf(request.getItems(request.getQuestionnaire()).size() + 1); try { var questionnaireItem = createQuestionnaireItem(request, linkId); - processExtensions(request, questionnaireItem); int childCount = request.getItems(questionnaireItem).size(); - var caseFeature = getCaseFeature(request, linkId); + var caseFeature = getFeatureExpression(request); var parentElements = getElements(request, null, null); processElements(request, questionnaireItem, parentElements, childCount, linkId, caseFeature); - return questionnaireItem; + // If we have a caseFeature we need to include launchContext extensions and Item Population Context + var launchContextExts = new ArrayList>(); + if (caseFeature != null) { + var itemContextExt = questionnaireItem.addExtension(); + itemContextExt.setUrl(Constants.SDC_QUESTIONNAIRE_ITEM_POPULATION_CONTEXT); + itemContextExt.setValue(caseFeature.toExpressionType(request.getFhirVersion())); + // Assume Patient + launchContextExts.add(buildSdcLaunchContextExt(request.getFhirVersion(), "patient")); + var featureLibrary = request.getAdapterFactory() + .createLibrary(SearchHelper.searchRepositoryByCanonical( + repository, + VersionUtilities.canonicalTypeForVersion( + request.getFhirVersion(), caseFeature.getLibraryUrl()))); + // Add any other in parameters that match launch context codes + var inParameters = featureLibrary.getParameter().stream() + .filter(p -> { + var name = request.resolvePathString(p, "name").toUpperCase(); + return (name.equals("PRACTITIONER")) + || request.resolvePathString(p, "use").equals("in") + && Arrays.asList(SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE.values()).stream() + .map(Object::toString) + .collect(Collectors.toList()) + .contains(name); + }) + .map(p -> request.resolvePathString(p, "name").toLowerCase()) + .collect(Collectors.toList()); + inParameters.forEach(p -> launchContextExts.add(buildSdcLaunchContextExt(request.getFhirVersion(), p))); + } + return new ImmutablePair<>(questionnaireItem, launchContextExts); } catch (Exception ex) { final String message = String.format(ITEM_CREATION_ERROR, ex.getMessage()); logger.error(message); - return createErrorItem(request, linkId, message); - } - } - - protected void processExtensions(GenerateRequest request, IBaseBackboneElement questionnaireItem) { - extensionProcessor.processExtensionsInList( - request, questionnaireItem, request.getProfile(), INPUT_EXTENSION_LIST); - } - - protected IBaseResource getCaseFeature(GenerateRequest request, String itemLinkId) { - IBaseResource caseFeature = null; - var featureExpression = getFeatureExpression(request); - if (featureExpression != null) { - try { - var results = getFeatureExpressionResults(request, featureExpression, itemLinkId); - var result = results == null || results.isEmpty() ? null : results.get(0); - if (result instanceof IBaseResource) { - caseFeature = (IBaseResource) result; - } - } catch (ResolveExpressionException e) { - logger.error(e.getMessage()); - } + return new ImmutablePair<>(createErrorItem(request, linkId, message), new ArrayList<>()); } - return caseFeature; } protected CqfExpression getFeatureExpression(GenerateRequest request) { - return expressionProcessor.getCqfExpression( + var expression = expressionProcessor.getCqfExpression( request, request.getExtensions(request.getProfile()), Constants.CPG_FEATURE_EXPRESSION); + if (expression != null) { + expression.setName(request.getProfileAdapter().getName()); + } + return expression; } protected List getFeatureExpressionResults( - GenerateRequest request, CqfExpression featureExpression, String itemLinkId) - throws ResolveExpressionException { + GenerateRequest request, CqfExpression featureExpression, String itemLinkId) { return expressionProcessor.getExpressionResultForItem(request, featureExpression, itemLinkId); } @@ -102,7 +118,7 @@ protected void processElements( List elements, int childCount, String itemLinkId, - IBaseResource caseFeature) { + CqfExpression caseFeature) { for (var element : elements) { childCount++; var childLinkId = String.format(CHILD_LINK_ID_FORMAT, itemLinkId, childCount); @@ -128,7 +144,7 @@ protected IBaseBackboneElement processElement( ICompositeType element, String elementType, String childLinkId, - IBaseResource caseFeature, + CqfExpression caseFeature, Boolean isGroup) { try { return elementProcessor.processElement(request, element, elementType, childLinkId, caseFeature, isGroup); @@ -168,11 +184,12 @@ protected Boolean filterElement( String sliceName, Boolean requiredOnly) { var path = request.resolvePathString(element, "path"); - if (existingElements != null && !existingElements.isEmpty()) { - if (existingElements.stream().anyMatch(e -> path.equals(request.resolvePathString(e, "path")))) { - return false; - } + if (existingElements != null + && !existingElements.isEmpty() + && existingElements.stream().anyMatch(e -> path.equals(request.resolvePathString(e, "path")))) { + return false; } + // filter out slicing definitions if (request.resolvePath(element, "slicing") != null) { return false; @@ -193,13 +210,13 @@ protected Boolean filterElement( if (sliceName != null && !request.resolvePathString(element, "id").contains(sliceName)) { return false; } - if (requiredOnly) { + if (Boolean.TRUE.equals(requiredOnly)) { var min = request.resolvePath(element, "min", IPrimitiveType.class); if (min == null || (Integer) min.getValue() == 0) { return false; } } - if (request.getSupportedOnly()) { + if (Boolean.TRUE.equals(request.getSupportedOnly())) { var mustSupportElement = request.resolvePath(element, "mustSupport", IBaseBooleanDatatype.class); if (mustSupportElement == null || mustSupportElement.getValue().equals(Boolean.FALSE)) { return false; @@ -236,38 +253,25 @@ protected String getElementType(GenerateRequest request, ICompositeType element) } public IBaseBackboneElement createQuestionnaireItem(GenerateRequest request, String linkId) { - var url = request.resolvePathString(request.getProfile(), "url"); - var type = request.resolvePathString(request.getProfile(), "type"); - final String definition = String.format("%s#%s", url, type); - String text = getProfileText(request); - var item = createQuestionnaireItemComponent(request, text, linkId, definition, false); + var text = request.getProfileAdapter().hasTitle() + ? request.getProfileAdapter().getTitle() + : request.getProfileAdapter().getName(); + var item = createQuestionnaireItemComponent( + request, text, linkId, request.getProfileAdapter().getUrl(), false); + var extractContext = item.addExtension(); + extractContext.setUrl(Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT); + extractContext.setValue(codeTypeForVersion( + request.getFhirVersion(), request.getProfileAdapter().getType())); return item; } - @SuppressWarnings("unchecked") - protected String getProfileText(GenerateRequest request) { - var inputExt = request.getExtensions(request.getProfile()).stream() - .filter(e -> e.getUrl().equals(Constants.CPG_INPUT_TEXT)) - .findFirst() - .orElse(null); - if (inputExt != null) { - return ((IPrimitiveType) inputExt.getValue()).getValue(); - } - var title = request.resolvePathString(request.getProfile(), "title"); - if (title != null) { - return title; - } - var url = request.resolvePathString(request.getProfile(), "url"); - return url.substring(url.lastIndexOf("/") + 1); - } - protected IBaseBackboneElement createQuestionnaireItemComponent( GenerateRequest request, String text, String linkId, String definition, Boolean isDisplay) { switch (request.getFhirVersion()) { case DSTU3: return new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent() .setType( - isDisplay + Boolean.TRUE.equals(isDisplay) ? org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.DISPLAY : org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP) .setDefinition(definition) @@ -276,7 +280,7 @@ protected IBaseBackboneElement createQuestionnaireItemComponent( case R4: return new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent() .setType( - isDisplay + Boolean.TRUE.equals(isDisplay) ? org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.DISPLAY : org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.GROUP) .setDefinition(definition) @@ -285,7 +289,7 @@ protected IBaseBackboneElement createQuestionnaireItemComponent( case R5: return new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent() .setType( - isDisplay + Boolean.TRUE.equals(isDisplay) ? org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemType.DISPLAY : org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemType.GROUP) .setDefinition(definition) diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/dstu3/ElementProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/dstu3/ElementProcessor.java index 7d98f5fda..718d6195c 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/dstu3/ElementProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/dstu3/ElementProcessor.java @@ -1,33 +1,26 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate.dstu3; -import static org.opencds.cqf.fhir.cr.common.ItemValueTransformer.transformValueToItem; - import org.hl7.fhir.dstu3.model.ElementDefinition; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType; -import org.hl7.fhir.dstu3.model.Type; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasCaseFeature; -import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasCqfExpression; import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasDefaultValue; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateRequest; import org.opencds.cqf.fhir.cr.questionnaire.generate.IElementProcessor; -import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.CqfExpression; public class ElementProcessor implements IElementProcessor { protected static final String ITEM_TYPE_ERROR = "Unable to determine type for element: %s"; protected final QuestionnaireTypeIsChoice questionnaireTypeIsChoice; protected final ElementHasDefaultValue elementHasDefaultValue; - protected final ElementHasCqfExpression elementHasCqfExpression; protected final ElementHasCaseFeature elementHasCaseFeature; public ElementProcessor(Repository repository) { questionnaireTypeIsChoice = new QuestionnaireTypeIsChoice(repository); elementHasDefaultValue = new ElementHasDefaultValue(); - elementHasCqfExpression = new ElementHasCqfExpression(); elementHasCaseFeature = new ElementHasCaseFeature(); } @@ -37,15 +30,16 @@ public IBaseBackboneElement processElement( ICompositeType baseElement, String elementType, String childLinkId, - IBaseResource caseFeature, + CqfExpression caseFeature, Boolean isGroup) { var element = (ElementDefinition) baseElement; - final var itemType = isGroup ? QuestionnaireItemType.GROUP : parseItemType(elementType, element.hasBinding()); - final var item = initializeQuestionnaireItem(itemType, request.getProfileUrl(), element, childLinkId); + final var itemType = Boolean.TRUE.equals(isGroup) + ? QuestionnaireItemType.GROUP + : parseItemType(elementType, element.hasBinding()); + final var item = initializeQuestionnaireItem( + itemType, request.getProfileAdapter().getUrl(), element, childLinkId); item.setRequired(element.hasMin() && element.getMin() > 0); item.setRepeats(element.hasMax() && !element.getMax().equals("1")); - // set enableWhen based on? use - // http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression if (itemType == QuestionnaireItemType.GROUP) { return item; } @@ -58,13 +52,8 @@ public IBaseBackboneElement processElement( elementHasDefaultValue.addProperties(request, element.getPattern(), item); } else if (element.hasDefaultValue()) { elementHasDefaultValue.addProperties(request, element.getDefaultValue(), item); - } else if (element.hasExtension(Constants.CQIF_CQL_EXPRESSION)) { - elementHasCqfExpression.addProperties(request, request.getExtensions(element), item); } else if (caseFeature != null) { - var pathValue = elementHasCaseFeature.getPathValue(request, caseFeature, element); - if (pathValue instanceof Type) { - item.setInitial(transformValueToItem((Type) pathValue)); - } + elementHasCaseFeature.addProperties(request, caseFeature, baseElement, item); } return item; } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r4/ElementProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r4/ElementProcessor.java index 15e56955b..d970be949 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r4/ElementProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r4/ElementProcessor.java @@ -1,33 +1,26 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate.r4; -import static org.opencds.cqf.fhir.cr.common.ItemValueTransformer.transformValueToItem; - import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.r4.model.ElementDefinition; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType; -import org.hl7.fhir.r4.model.Type; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasCaseFeature; -import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasCqfExpression; import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasDefaultValue; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateRequest; import org.opencds.cqf.fhir.cr.questionnaire.generate.IElementProcessor; -import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.CqfExpression; public class ElementProcessor implements IElementProcessor { protected static final String ITEM_TYPE_ERROR = "Unable to determine type for element: %s"; protected final QuestionnaireTypeIsChoice questionnaireTypeIsChoice; protected final ElementHasDefaultValue elementHasDefaultValue; - protected final ElementHasCqfExpression elementHasCqfExpression; protected final ElementHasCaseFeature elementHasCaseFeature; public ElementProcessor(Repository repository) { questionnaireTypeIsChoice = new QuestionnaireTypeIsChoice(repository); elementHasDefaultValue = new ElementHasDefaultValue(); - elementHasCqfExpression = new ElementHasCqfExpression(); elementHasCaseFeature = new ElementHasCaseFeature(); } @@ -37,15 +30,16 @@ public IBaseBackboneElement processElement( ICompositeType baseElement, String elementType, String childLinkId, - IBaseResource caseFeature, + CqfExpression caseFeature, Boolean isGroup) { var element = (ElementDefinition) baseElement; - final var itemType = isGroup ? QuestionnaireItemType.GROUP : parseItemType(elementType, element.hasBinding()); - final var item = initializeQuestionnaireItem(itemType, request.getProfileUrl(), element, childLinkId); + final var itemType = Boolean.TRUE.equals(isGroup) + ? QuestionnaireItemType.GROUP + : parseItemType(elementType, element.hasBinding()); + final var item = initializeQuestionnaireItem( + itemType, request.getProfileAdapter().getUrl(), element, childLinkId); item.setRequired(element.hasMin() && element.getMin() > 0); item.setRepeats(element.hasMax() && !element.getMax().equals("1")); - // set enableWhen based on? use - // http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression if (itemType == QuestionnaireItemType.GROUP) { return item; } @@ -56,20 +50,15 @@ public IBaseBackboneElement processElement( elementHasDefaultValue.addProperties(request, element.getFixedOrPattern(), item); } else if (element.hasDefaultValue()) { elementHasDefaultValue.addProperties(request, element.getDefaultValue(), item); - } else if (element.hasExtension(Constants.CQF_EXPRESSION)) { - elementHasCqfExpression.addProperties(request, request.getExtensions(element), item); } else if (caseFeature != null) { - var pathValue = elementHasCaseFeature.getPathValue(request, caseFeature, element); - if (pathValue instanceof Type) { - item.addInitial().setValue(transformValueToItem((Type) pathValue)); - } + elementHasCaseFeature.addProperties(request, caseFeature, baseElement, item); } return item; } protected QuestionnaireItemComponent initializeQuestionnaireItem( QuestionnaireItemType itemType, String profileUrl, ElementDefinition element, String childLinkId) { - final String definition = profileUrl + "#" + element.getPath(); + final String definition = profileUrl + "#" + element.getId(); return new QuestionnaireItemComponent() .setType(itemType) .setDefinition(definition) diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r5/ElementProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r5/ElementProcessor.java index fe314c78d..0416e95bf 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r5/ElementProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/generate/r5/ElementProcessor.java @@ -1,33 +1,26 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate.r5; -import static org.opencds.cqf.fhir.cr.common.ItemValueTransformer.transformValueToItem; - import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.ICompositeType; -import org.hl7.fhir.r5.model.DataType; import org.hl7.fhir.r5.model.ElementDefinition; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemType; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasCaseFeature; -import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasCqfExpression; import org.opencds.cqf.fhir.cr.questionnaire.generate.ElementHasDefaultValue; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateRequest; import org.opencds.cqf.fhir.cr.questionnaire.generate.IElementProcessor; -import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.CqfExpression; public class ElementProcessor implements IElementProcessor { protected static final String ITEM_TYPE_ERROR = "Unable to determine type for element: %s"; protected final QuestionnaireTypeIsChoice questionnaireTypeIsChoice; protected final ElementHasDefaultValue elementHasDefaultValue; - protected final ElementHasCqfExpression elementHasCqfExpression; protected final ElementHasCaseFeature elementHasCaseFeature; public ElementProcessor(Repository repository) { questionnaireTypeIsChoice = new QuestionnaireTypeIsChoice(repository); elementHasDefaultValue = new ElementHasDefaultValue(); - elementHasCqfExpression = new ElementHasCqfExpression(); elementHasCaseFeature = new ElementHasCaseFeature(); } @@ -37,15 +30,16 @@ public IBaseBackboneElement processElement( ICompositeType baseElement, String elementType, String childLinkId, - IBaseResource caseFeature, + CqfExpression caseFeature, Boolean isGroup) { var element = (ElementDefinition) baseElement; - final var itemType = isGroup ? QuestionnaireItemType.GROUP : parseItemType(elementType, element.hasBinding()); - final var item = initializeQuestionnaireItem(itemType, request.getProfileUrl(), element, childLinkId); + final var itemType = Boolean.TRUE.equals(isGroup) + ? QuestionnaireItemType.GROUP + : parseItemType(elementType, element.hasBinding()); + final var item = initializeQuestionnaireItem( + itemType, request.getProfileAdapter().getUrl(), element, childLinkId); item.setRequired(element.hasMin() && element.getMin() > 0); item.setRepeats(element.hasMax() && !element.getMax().equals("1")); - // set enableWhen based on? use - // http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression if (itemType == QuestionnaireItemType.GROUP) { return item; } @@ -56,13 +50,8 @@ public IBaseBackboneElement processElement( elementHasDefaultValue.addProperties(request, element.getFixedOrPattern(), item); } else if (element.hasDefaultValue()) { elementHasDefaultValue.addProperties(request, element.getDefaultValue(), item); - } else if (element.hasExtension(Constants.CQF_EXPRESSION)) { - elementHasCqfExpression.addProperties(request, request.getExtensions(element), item); } else if (caseFeature != null) { - var pathValue = elementHasCaseFeature.getPathValue(request, caseFeature, element); - if (pathValue instanceof DataType) { - item.addInitial().setValue(transformValueToItem((DataType) pathValue)); - } + elementHasCaseFeature.addProperties(request, caseFeature, baseElement, item); } return item; } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/IPopulateProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/IPopulateProcessor.java index d618c4187..00863df19 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/IPopulateProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/IPopulateProcessor.java @@ -1,9 +1,11 @@ package org.opencds.cqf.fhir.cr.questionnaire.populate; +import java.util.List; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseResource; public interface IPopulateProcessor { - R prePopulate(PopulateRequest request); - IBaseResource populate(PopulateRequest request); + + IBaseResource processResponse(PopulateRequest request, List items); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessor.java index 3955f8173..20cea0c6b 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessor.java @@ -1,18 +1,11 @@ package org.opencds.cqf.fhir.cr.questionnaire.populate; -import static org.opencds.cqf.fhir.cr.common.ExtensionBuilders.buildReferenceExt; -import static org.opencds.cqf.fhir.cr.common.ExtensionBuilders.dtrQuestionnaireResponseExtension; -import static org.opencds.cqf.fhir.cr.common.ExtensionBuilders.prepopulateSubjectExtension; - import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.apache.commons.lang3.SerializationUtils; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; import org.opencds.cqf.fhir.utility.Constants; -import org.opencds.cqf.fhir.utility.Resources; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -20,102 +13,67 @@ public class PopulateProcessor implements IPopulateProcessor { protected static final Logger logger = LoggerFactory.getLogger(PopulateProcessor.class); private final ProcessItem processItem; private final ProcessItemWithContext processItemWithContext; - private final ProcessResponseItem processResponseItem; public PopulateProcessor() { - this(new ProcessItem(), new ProcessItemWithContext(), new ProcessResponseItem()); + this(new ProcessItem(), new ProcessItemWithContext()); } - private PopulateProcessor( - ProcessItem processItem, - ProcessItemWithContext processItemWithExtension, - ProcessResponseItem processResponseItem) { + private PopulateProcessor(ProcessItem processItem, ProcessItemWithContext processItemWithExtension) { this.processItem = processItem; this.processItemWithContext = processItemWithExtension; - this.processResponseItem = processResponseItem; } @Override - @SuppressWarnings("unchecked") - public R prePopulate(PopulateRequest request) { - final String questionnaireId = request.getQuestionnaire().getIdElement().getIdPart() + "-" - + request.getSubjectId().getIdPart(); - final IBaseResource populatedQuestionnaire = Resources.clone(request.getQuestionnaire()); - request.getModelResolver().setValue(populatedQuestionnaire, "item", null); - populatedQuestionnaire.setId(questionnaireId); - request.getModelResolver() - .setValue( - populatedQuestionnaire, - "extension", - Collections.singletonList(buildReferenceExt( - request.getFhirVersion(), - prepopulateSubjectExtension( - "Patient", request.getSubjectId().getIdPart()), - false))); - var items = request.getItems(request.getQuestionnaire()); - final List processedItems = processItems(request, items); - request.getModelResolver().setValue(populatedQuestionnaire, "item", processedItems); - request.resolveOperationOutcome(populatedQuestionnaire); - return (R) populatedQuestionnaire; + public IBaseResource populate(PopulateRequest request) { + logger.info( + "Performing $populate operation on Questionnaire/{}", + request.getQuestionnaire().getIdElement().getIdPart()); + return processResponse(request, processItems(request, request.getItems(request.getQuestionnaire()))); } @Override - public IBaseResource populate(PopulateRequest request) { + public IBaseResource processResponse(PopulateRequest request, List items) { final IBaseResource response = createQuestionnaireResponse(request); response.setId(request.getQuestionnaire().getIdElement().getIdPart() + "-" + request.getSubjectId().getIdPart()); - var items = request.getItems(request.getQuestionnaire()); - var processedItems = processItems(request, items); - var responseItems = processResponseItems(request, processedItems); - request.getModelResolver().setValue(response, "item", responseItems); + request.getModelResolver().setValue(response, "item", items); request.resolveOperationOutcome(response); request.getModelResolver() .setValue(response, "contained", Collections.singletonList(request.getQuestionnaire())); - request.getModelResolver() - .setValue( - response, - "extension", - Collections.singletonList(buildReferenceExt( - request.getFhirVersion(), - dtrQuestionnaireResponseExtension(request.getQuestionnaire() - .getIdElement() - .getIdPart()), - true))); + logger.info("$populate operation completed"); return response; } public List processItems(PopulateRequest request, List items) { - final List populatedItems = new ArrayList<>(); + final List responseItems = new ArrayList<>(); items.forEach(item -> { + logger.info("Processing item {}", request.getItemLinkId(item)); var populationContextExt = item.getExtension().stream() .filter(e -> e.getUrl().equals(Constants.SDC_QUESTIONNAIRE_ITEM_POPULATION_CONTEXT)) .findFirst() .orElse(null); if (populationContextExt != null) { - populatedItems.addAll(processItemWithContext(request, item)); + responseItems.addAll(processItemWithContext(request, item)); } else { var childItems = request.getItems(item); if (!childItems.isEmpty()) { - final IBaseBackboneElement populatedItem = SerializationUtils.clone(item); - request.getModelResolver().setValue(populatedItem, "item", null); - final var processedChildItems = processItems(request, childItems); - request.getModelResolver().setValue(populatedItem, "item", processedChildItems); - populatedItems.add(populatedItem); + final var responseItem = processItem.createResponseItem(request.getFhirVersion(), item); + final var responseChildItems = processItems(request, childItems); + request.getModelResolver().setValue(responseItem, "item", responseChildItems); + responseItems.add(responseItem); } else { - var populatedItem = processItem(request, item); - populatedItems.add(populatedItem); + var responseItem = processItem(request, item); + responseItems.add(responseItem); } } }); - return populatedItems; + return responseItems; } protected List processItemWithContext(PopulateRequest request, IBaseBackboneElement item) { try { - // extension value is the context resource we're using to populate - // Expression-based Population - return processItemWithContext.processItem(request, item); - } catch (ResolveExpressionException e) { + return processItemWithContext.processContextItem(request, item); + } catch (Exception e) { logger.error(e.getMessage()); request.logException(e.getMessage()); return new ArrayList<>(); @@ -125,10 +83,10 @@ protected List processItemWithContext(PopulateRequest requ protected IBaseBackboneElement processItem(PopulateRequest request, IBaseBackboneElement item) { try { return processItem.processItem(request, item); - } catch (ResolveExpressionException e) { + } catch (Exception e) { logger.error(e.getMessage()); request.logException(e.getMessage()); - return item; + return processItem.createResponseItem(request.getFhirVersion(), item); } } @@ -138,33 +96,24 @@ protected IBaseResource createQuestionnaireResponse(PopulateRequest request) { return new org.hl7.fhir.dstu3.model.QuestionnaireResponse() .setStatus( org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS) - .setQuestionnaire(new org.hl7.fhir.dstu3.model.Reference( - ((org.hl7.fhir.dstu3.model.Questionnaire) request.getQuestionnaire()).getUrl())) + .setQuestionnaire(new org.hl7.fhir.dstu3.model.Reference("#" + + ((org.hl7.fhir.dstu3.model.Questionnaire) request.getQuestionnaire()).getIdPart())) .setSubject(new org.hl7.fhir.dstu3.model.Reference(request.getSubjectId())); case R4: return new org.hl7.fhir.r4.model.QuestionnaireResponse() .setStatus(org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS) - .setQuestionnaire(((org.hl7.fhir.r4.model.Questionnaire) request.getQuestionnaire()).getUrl()) + .setQuestionnaire( + "#" + ((org.hl7.fhir.r4.model.Questionnaire) request.getQuestionnaire()).getIdPart()) .setSubject(new org.hl7.fhir.r4.model.Reference(request.getSubjectId())); case R5: return new org.hl7.fhir.r5.model.QuestionnaireResponse() .setStatus(org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS) - .setQuestionnaire(((org.hl7.fhir.r5.model.Questionnaire) request.getQuestionnaire()).getUrl()) + .setQuestionnaire( + "#" + ((org.hl7.fhir.r5.model.Questionnaire) request.getQuestionnaire()).getIdPart()) .setSubject(new org.hl7.fhir.r5.model.Reference(request.getSubjectId())); default: return null; } } - - public List processResponseItems( - PopulateRequest request, List items) { - try { - return processResponseItem.processResponseItems(request, items); - } catch (Exception e) { - logger.error(e.getMessage()); - request.logException(e.getMessage()); - return new ArrayList<>(); - } - } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateRequest.java index 0dd544fb6..5b2f35eca 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateRequest.java @@ -3,11 +3,15 @@ import static com.google.common.base.Preconditions.checkNotNull; import ca.uhn.fhir.context.FhirVersionEnum; +import java.util.List; import org.hl7.fhir.dstu3.model.Reference; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.opencds.cqf.cql.engine.model.ModelResolver; @@ -15,41 +19,53 @@ import org.opencds.cqf.fhir.cr.common.IQuestionnaireRequest; import org.opencds.cqf.fhir.cr.inputparameters.IInputParameterResolver; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.adapter.QuestionnaireAdapter; public class PopulateRequest implements IQuestionnaireRequest { - private final String operationName; private final IBaseResource questionnaire; private final IIdType subjectId; + private final List context; + private final List> launchContext; private final IBaseParameters parameters; - private final IBaseBundle bundle; + private final IBaseBundle data; + private final boolean useServerData; private final LibraryEngine libraryEngine; private final ModelResolver modelResolver; private final FhirVersionEnum fhirVersion; private final String defaultLibraryUrl; - private final Boolean useServerData; private final IInputParameterResolver inputParameterResolver; + private final QuestionnaireAdapter questionnaireAdapter; private IBaseOperationOutcome operationOutcome; public PopulateRequest( - String operationName, IBaseResource questionnaire, IIdType subjectId, + List context, + IBaseExtension launchContext, IBaseParameters parameters, - IBaseBundle bundle, - Boolean useServerData, + IBaseBundle data, + boolean useServerData, LibraryEngine libraryEngine, ModelResolver modelResolver) { + checkNotNull(questionnaire, "expected non-null value for questionnaire"); checkNotNull(libraryEngine, "expected non-null value for libraryEngine"); - this.operationName = operationName; + checkNotNull(modelResolver, "expected non-null value for modelResolver"); this.questionnaire = questionnaire; this.subjectId = subjectId; + this.context = context; this.parameters = parameters; - this.bundle = bundle; + this.data = data; this.useServerData = useServerData; this.libraryEngine = libraryEngine; this.modelResolver = modelResolver; + this.launchContext = getExtensionsByUrl(this.questionnaire, Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT); + if (launchContext != null) { + this.launchContext.add(launchContext); + } this.fhirVersion = questionnaire.getStructureFhirVersionEnum(); this.defaultLibraryUrl = resolveDefaultLibraryUrl(); + questionnaireAdapter = (QuestionnaireAdapter) + getAdapterFactory().createKnowledgeArtifactAdapter((IDomainResource) this.questionnaire); inputParameterResolver = IInputParameterResolver.createResolver( libraryEngine.getRepository(), this.subjectId, @@ -57,12 +73,14 @@ public PopulateRequest( null, this.parameters, this.useServerData, - this.bundle); + this.data, + this.context, + this.launchContext); } @Override public String getOperationName() { - return operationName; + return "populate"; } @Override @@ -70,14 +88,24 @@ public IBaseResource getQuestionnaire() { return questionnaire; } + @Override + public QuestionnaireAdapter getQuestionnaireAdapter() { + return questionnaireAdapter; + } + @Override public IIdType getSubjectId() { return subjectId; } @Override - public IBaseBundle getBundle() { - return bundle; + public IBaseBundle getData() { + return data; + } + + @Override + public boolean getUseServerData() { + return useServerData; } @Override @@ -128,4 +156,8 @@ protected final String resolveDefaultLibraryUrl() { ? ((Reference) libraryExt.getValue()).getReference() : ((IPrimitiveType) libraryExt.getValue()).getValue(); } + + public void addContextParameter(String name, IBaseResource resource) { + getAdapterFactory().createParameters(getParameters()).addParameter(name, resource); + } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItem.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItem.java index a2bacfdff..2e0758653 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItem.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItem.java @@ -8,74 +8,120 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.apache.commons.lang3.SerializationUtils; +import java.util.stream.Collectors; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ProcessItem { + private static final Logger logger = LoggerFactory.getLogger(ProcessItem.class); final ExpressionProcessor expressionProcessor; public ProcessItem() { this(new ExpressionProcessor()); } - private ProcessItem(ExpressionProcessor expressionProcessor) { + public ProcessItem(ExpressionProcessor expressionProcessor) { this.expressionProcessor = expressionProcessor; } - public IBaseBackboneElement processItem(PopulateRequest request, IBaseBackboneElement item) - throws ResolveExpressionException { - final var populatedItem = copyItem(item); - final List expressionResults = getExpressionResults(request, item); - if (!expressionResults.isEmpty()) { - request.getModelResolver() - .setValue( - populatedItem, - "extension", - Collections.singletonList(buildReferenceExt( - request.getFhirVersion(), QUESTIONNAIRE_RESPONSE_AUTHOR_EXTENSION, false))); - if (request.getFhirVersion().equals(FhirVersionEnum.DSTU3)) { - request.getModelResolver() - .setValue(populatedItem, "initial", transformValueToItem((org.hl7.fhir.dstu3.model.Type) - expressionResults.get(0))); - } else { - List initial = new ArrayList<>(); - expressionResults.forEach(result -> { - initial.add(createInitial(request.getFhirVersion(), result)); - }); - request.getModelResolver().setValue(populatedItem, "initial", initial); - } - } - return populatedItem; + public IBaseBackboneElement processItem(PopulateRequest request, IBaseBackboneElement item) { + final var responseItem = createResponseItem(request.getFhirVersion(), item); + populateAnswer(request, responseItem, getInitialValue(request, item)); + return responseItem; } - public IBaseBackboneElement copyItem(IBaseBackboneElement item) { - return SerializationUtils.clone(item); + protected void populateAnswer( + PopulateRequest request, IBaseBackboneElement responseItem, List initialValue) { + if (initialValue == null || initialValue.isEmpty()) { + return; + } + var answers = new ArrayList<>(); + for (var value : (List) initialValue) { + answers.add(createAnswer(request.getFhirVersion(), (IBase) value)); + } + request.getModelResolver().setValue(responseItem, "answer", answers); } - public List getExpressionResults(PopulateRequest request, IBaseBackboneElement item) - throws ResolveExpressionException { + protected List getInitialValue(PopulateRequest request, IBaseBackboneElement item) { + List results; var expression = expressionProcessor.getItemInitialExpression(request, item); if (expression != null) { var itemLinkId = request.getItemLinkId(item); - return expressionProcessor.getExpressionResultForItem(request, expression, itemLinkId); + try { + results = expressionProcessor.getExpressionResultForItem(request, expression, itemLinkId); + if (results != null && !results.isEmpty()) { + addAuthorExtension(request, item); + } + } catch (Exception e) { + var message = String.format( + "Encountered error evaluating initial expression for item %s: %s", itemLinkId, e.getMessage()); + logger.error(message); + request.logException(message); + results = new ArrayList<>(); + } + } else if (request.getFhirVersion().equals(FhirVersionEnum.DSTU3)) { + var initial = request.resolvePath(item, "initial"); + results = initial == null ? new ArrayList<>() : Collections.singletonList(initial); + } else { + results = request.resolvePathList(item, "initial", IBaseBackboneElement.class).stream() + .map(i -> request.resolvePath(i, "value", IBase.class)) + .collect(Collectors.toList()); } - return new ArrayList<>(); + return results; + } + + protected void addAuthorExtension(PopulateRequest request, IBaseBackboneElement item) { + request.getModelResolver() + .setValue( + item, + "extension", + Collections.singletonList(buildReferenceExt( + request.getFhirVersion(), QUESTIONNAIRE_RESPONSE_AUTHOR_EXTENSION, false))); } - public IBaseBackboneElement createInitial(FhirVersionEnum fhirVersion, IBase value) { + protected IBaseBackboneElement createAnswer(FhirVersionEnum fhirVersion, IBase value) { switch (fhirVersion) { + case DSTU3: + return new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent() + .setValue(transformValueToItem((org.hl7.fhir.dstu3.model.Type) value)); case R4: - return new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemInitialComponent() + return new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent() .setValue(transformValueToItem((org.hl7.fhir.r4.model.Type) value)); case R5: - return new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemInitialComponent() + return new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent() .setValue(transformValueToItem((org.hl7.fhir.r5.model.DataType) value)); default: return null; } } + + protected IBaseBackboneElement createResponseItem(FhirVersionEnum fhirVersion, IBaseBackboneElement item) { + switch (fhirVersion) { + case DSTU3: + var dstu3Item = (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent) item; + return new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent( + dstu3Item.getLinkIdElement()) + .setDefinitionElement(dstu3Item.getDefinitionElement()) + .setTextElement(dstu3Item.getTextElement()); + case R4: + var r4Item = (org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent) item; + return new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent( + r4Item.getLinkIdElement()) + .setDefinitionElement(r4Item.getDefinitionElement()) + .setTextElement(r4Item.getTextElement()); + case R5: + var r5Item = (org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent) item; + return new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent( + r5Item.getLinkId()) + .setDefinitionElement(r5Item.getDefinitionElement()) + .setTextElement(r5Item.getTextElement()); + + default: + return null; + } + } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemWithContext.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemWithContext.java index afc1aaa54..3bf8bba8b 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemWithContext.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemWithContext.java @@ -1,110 +1,199 @@ package org.opencds.cqf.fhir.cr.questionnaire.populate; -import static org.opencds.cqf.fhir.cr.common.ExtensionBuilders.QUESTIONNAIRE_RESPONSE_AUTHOR_EXTENSION; -import static org.opencds.cqf.fhir.cr.common.ExtensionBuilders.buildReferenceExt; -import static org.opencds.cqf.fhir.cr.common.ItemValueTransformer.transformValueToItem; +import static java.util.Objects.nonNull; +import static org.opencds.cqf.fhir.utility.SearchHelper.searchRepositoryByCanonical; +import static org.opencds.cqf.fhir.utility.VersionUtilities.canonicalTypeForVersion; -import ca.uhn.fhir.context.FhirVersionEnum; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; -import org.apache.commons.lang3.SerializationUtils; +import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; +import org.opencds.cqf.fhir.cr.common.IOperationRequest; import org.opencds.cqf.fhir.utility.Constants; import org.opencds.cqf.fhir.utility.CqfExpression; +import org.opencds.cqf.fhir.utility.adapter.StructureDefinitionAdapter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -public class ProcessItemWithContext { +public class ProcessItemWithContext extends ProcessItem { + private static final Logger logger = LoggerFactory.getLogger(ProcessItemWithContext.class); private final ExpressionProcessor expressionProcessor; public ProcessItemWithContext() { this(new ExpressionProcessor()); } - private ProcessItemWithContext(ExpressionProcessor expressionProcessor) { + public ProcessItemWithContext(ExpressionProcessor expressionProcessor) { this.expressionProcessor = expressionProcessor; } - List processItem(PopulateRequest request, IBaseBackboneElement item) - throws ResolveExpressionException { + List processContextItem(PopulateRequest request, IBaseBackboneElement item) { var itemLinkId = request.getItemLinkId(item); + IBaseResource profile = null; + var definition = request.resolvePathString(item, "definition"); + if (StringUtils.isNotBlank(definition)) { + var profileUrl = definition.split("#")[0]; + try { + profile = searchRepositoryByCanonical( + request.getRepository(), canonicalTypeForVersion(request.getFhirVersion(), profileUrl)); + } catch (Exception e) { + var message = String.format("No profile found for definition: %s", profileUrl); + logger.error(message); + request.logException(message); + } + } + final var profileAdapter = profile == null + ? null + : (StructureDefinitionAdapter) + request.getAdapterFactory().createKnowledgeArtifactAdapter((IDomainResource) profile); final CqfExpression contextExpression = expressionProcessor.getCqfExpression( request, item.getExtension(), Constants.SDC_QUESTIONNAIRE_ITEM_POPULATION_CONTEXT); - final List populationContext = - expressionProcessor.getExpressionResultForItem(request, contextExpression, itemLinkId); + final List populationContext = + expressionProcessor.getExpressionResultForItem(request, contextExpression, itemLinkId).stream() + .map(r -> { + if (r instanceof IBaseResource) { + return (IBaseResource) r; + } else { + var message = String.format( + "Encountered error populating item (%s): Context value is expected to be a resource.", + itemLinkId); + logger.error(message); + request.logException(message); + return null; + } + }) + .filter(r -> nonNull(r)) + .collect(Collectors.toList()); return populationContext.stream() - .map(context -> processPopulationContext(request, item, context)) + .map(context -> + processPopulationContext(request, item, contextExpression.getName(), context, profileAdapter)) .collect(Collectors.toList()); } IBaseBackboneElement processPopulationContext( - PopulateRequest request, IBaseBackboneElement groupItem, IBase context) { - final IBaseBackboneElement contextItem = copyItemWithNoSubItems(request, groupItem); + PopulateRequest request, + IBaseBackboneElement groupItem, + String contextName, + IBaseResource context, + StructureDefinitionAdapter profile) { + final var contextItem = createResponseItem(request.getFhirVersion(), groupItem); request.getItems(groupItem).forEach(item -> { - final IBaseBackboneElement processedSubItem = createNewQuestionnaireItemComponent(request, item, context); - request.getModelResolver().setValue(contextItem, "item", Collections.singletonList(processedSubItem)); + var childItems = request.getItems(item); + if (!childItems.isEmpty()) { + var childGroupItem = processPopulationContext(request, item, contextName, context, profile); + request.getModelResolver().setValue(contextItem, "item", Collections.singletonList(childGroupItem)); + } else { + try { + var processedSubItem = createResponseContextItem(request, item, contextName, context, profile); + request.getModelResolver() + .setValue(contextItem, "item", Collections.singletonList(processedSubItem)); + } catch (Exception | Error e) { + logger.error(e.getMessage()); + request.logException(e.getMessage()); + } + } }); return contextItem; } @SuppressWarnings("unchecked") - IBaseBackboneElement createNewQuestionnaireItemComponent( - PopulateRequest request, IBaseBackboneElement item, IBase context) { - final IBaseBackboneElement populatedItem = SerializationUtils.clone(item); - final String path = ((IPrimitiveType) request.getModelResolver().resolvePath(item, "definition")) - .getValue() - .split("#")[1] - .split("\\.")[1] - .replace("[x]", ""); - final var initialValue = request.getModelResolver().resolvePath(context, path); - if (initialValue != null) { - request.getModelResolver() - .setValue( - populatedItem, - "extension", - Collections.singletonList(buildReferenceExt( - request.getFhirVersion(), QUESTIONNAIRE_RESPONSE_AUTHOR_EXTENSION, false))); + IBaseBackboneElement createResponseContextItem( + PopulateRequest request, + IBaseBackboneElement item, + String contextName, + IBaseResource context, + StructureDefinitionAdapter profile) { + if (request.resolveRawPath(item, "initial") != null) { + return processItem(request, item); } - if (initialValue instanceof IBase) { - request.getModelResolver() - .setValue( - populatedItem, - "initial", - Collections.singletonList(createInitial(request.getFhirVersion(), (IBase) initialValue))); - } else if (initialValue instanceof List) { - var initials = new ArrayList<>(); - for (var value : (List) initialValue) { - initials.add(createInitial(request.getFhirVersion(), (IBase) value)); + final var responseItem = createResponseItem(request.getFhirVersion(), item); + // if we have a definition use it to populate + var definition = request.resolvePathString(item, "definition"); + if (StringUtils.isNotBlank(definition) && profile != null) { + final var pathValue = getPathValue(request, context, definition, profile); + final List answerValue = pathValue == null + ? null + : pathValue instanceof List ? (List) pathValue : Arrays.asList((IBase) pathValue); + if (answerValue != null && !answerValue.isEmpty()) { + addAuthorExtension(request, responseItem); + } + populateAnswer(request, responseItem, answerValue); + } else { + var extension = request.getExtensionByUrl(item, Constants.SDC_QUESTIONNAIRE_INITIAL_EXPRESSION); + // populate using expected initial expression extensions + if (extension != null) { + // pass the context resource(s) as a parameter to the evaluation + request.addContextParameter("%" + contextName, context); + populateAnswer(request, responseItem, getInitialValue(request, item)); } - request.getModelResolver().setValue(populatedItem, "initial", initials); } - return populatedItem; + return responseItem; } - IBaseBackboneElement copyItemWithNoSubItems(PopulateRequest request, IBaseBackboneElement item) { - var clone = SerializationUtils.clone(item); - request.getModelResolver().setValue(clone, "item", null); - return clone; - } - - IBaseBackboneElement createInitial(FhirVersionEnum fhirVersion, IBase value) { - switch (fhirVersion) { - case DSTU3: - return new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent() - .setValue(transformValueToItem((org.hl7.fhir.dstu3.model.Type) value)); - case R4: - return new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemInitialComponent() - .setValue(transformValueToItem((org.hl7.fhir.r4.model.Type) value)); - case R5: - return new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemInitialComponent() - .setValue(transformValueToItem((org.hl7.fhir.r5.model.DataType) value)); - - default: - return null; + @SuppressWarnings("unchecked") + public Object getPathValue( + IOperationRequest request, IBaseResource context, String definition, StructureDefinitionAdapter profile) { + Object pathValue = null; + var elementId = definition.split("#")[1]; + var pathSplit = elementId.split("\\."); + if (pathSplit.length > 2) { + pathValue = context; + String slice = null; + for (int i = 1; i < pathSplit.length; i++) { + if (pathValue instanceof List && !((List) pathValue).isEmpty()) { + if (slice != null && ((List) pathValue).size() > 1) { + final var sliceName = slice; + final var filterIndex = i; + final var pathValues = ((List) pathValue); + var filterElements = profile.getDifferentialElements().stream() + .filter(e -> { + var id = request.resolvePathString(e, "id"); + return !id.equals(elementId) + && request.resolveRawPath(e, "sliceName") == null + && id.contains(sliceName); + }) + .collect(Collectors.toList()); + var filterValues = new ArrayList<>(); + filterElements.forEach(e -> { + var path = request.resolvePathString(e, "path"); + var elementPath = elementId.replace(":" + sliceName, ""); + var filterPath = path.replace( + elementPath.substring(0, elementPath.indexOf(pathSplit[filterIndex])), ""); + var filterValue = request.resolvePath(e, "fixed"); + pathValues.stream().forEach(v -> { + var value = request.resolvePath((IBase) v, filterPath); + if (value instanceof IPrimitiveType && filterValue instanceof IPrimitiveType) { + if (((IPrimitiveType) value) + .getValueAsString() + .equals(((IPrimitiveType) filterValue).getValueAsString())) { + filterValues.add(v); + } + } else if (value.equals(filterValue)) { + filterValues.add(v); + } + }); + }); + pathValue = filterValues.isEmpty() ? null : filterValues.get(0); + } else { + pathValue = ((List) pathValue).get(0); + } + } + slice = pathSplit[i].contains(":") ? pathSplit[i].substring(pathSplit[i].indexOf(":") + 1) : null; + pathValue = request.resolveRawPath( + pathValue, pathSplit[i].replace("[x]", "").replace(":" + slice, "")); + } + } else { + var path = pathSplit[pathSplit.length - 1].replace("[x]", ""); + pathValue = request.resolveRawPath(context, path); } + return pathValue; } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessResponseItem.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessResponseItem.java deleted file mode 100644 index 1fc583dbc..000000000 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessResponseItem.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.opencds.cqf.fhir.cr.questionnaire.populate; - -import ca.uhn.fhir.context.FhirVersionEnum; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; -import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.opencds.cqf.fhir.utility.Constants; - -public class ProcessResponseItem { - public ProcessResponseItem() {} - - public List processResponseItems( - PopulateRequest request, List items) { - return items.stream().map(i -> processResponseItem(request, i)).collect(Collectors.toList()); - } - - public IBaseBackboneElement processResponseItem(PopulateRequest request, IBaseBackboneElement item) { - var responseItem = createResponseItem(request.getFhirVersion(), item); - var items = request.getItems(item); - if (!items.isEmpty()) { - final List nestedResponseItems = processResponseItems(request, items); - request.getModelResolver().setValue(responseItem, "item", nestedResponseItems); - } else { - var authorExt = item.getExtension().stream() - .filter(e -> e.getUrl().equals(Constants.QUESTIONNAIRE_RESPONSE_AUTHOR)) - .findFirst() - .orElse(null); - if (authorExt != null) { - request.getModelResolver().setValue(responseItem, "extension", Collections.singletonList(authorExt)); - } - responseItem = setAnswersForInitial(request, item, responseItem); - } - return responseItem; - } - - public IBaseBackboneElement setAnswersForInitial( - PopulateRequest request, IBaseBackboneElement item, IBaseBackboneElement responseItem) { - if (request.getFhirVersion().equals(FhirVersionEnum.DSTU3)) { - var dstu3Answer = createAnswer(FhirVersionEnum.DSTU3, request.resolvePath(item, "initial")); - request.getModelResolver().setValue(responseItem, "answer", dstu3Answer); - } else { - var initial = request.resolvePathList(item, "initial").stream() - .map(i -> (IBaseBackboneElement) i) - .collect(Collectors.toList()); - if (!initial.isEmpty()) { - initial.forEach(i -> { - final var answer = createAnswer(request.getFhirVersion(), request.resolvePath(i, "value")); - request.getModelResolver().setValue(responseItem, "answer", Collections.singletonList(answer)); - }); - } - } - return responseItem; - } - - protected IBaseBackboneElement createAnswer(FhirVersionEnum fhirVersion, IBase value) { - switch (fhirVersion) { - case DSTU3: - return new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent() - .setValue((org.hl7.fhir.dstu3.model.Type) value); - case R4: - return new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent() - .setValue((org.hl7.fhir.r4.model.Type) value); - case R5: - return new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent() - .setValue((org.hl7.fhir.r5.model.DataType) value); - - default: - return null; - } - } - - protected IBaseBackboneElement createResponseItem(FhirVersionEnum fhirVersion, IBaseBackboneElement item) { - switch (fhirVersion) { - case DSTU3: - var dstu3Item = (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent) item; - return new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent( - dstu3Item.getLinkIdElement()) - .setDefinitionElement(dstu3Item.getDefinitionElement()) - .setTextElement(dstu3Item.getTextElement()); - case R4: - var r4Item = (org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent) item; - return new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent( - r4Item.getLinkIdElement()) - .setDefinitionElement(r4Item.getDefinitionElement()) - .setTextElement(r4Item.getTextElement()); - case R5: - var r5Item = (org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent) item; - return new org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent( - r5Item.getLinkId()) - .setDefinitionElement(r5Item.getDefinitionElement()) - .setTextElement(r5Item.getTextElement()); - - default: - return null; - } - } -} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessor.java index 56bfabcad..8962413d8 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessor.java @@ -4,8 +4,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; -import ca.uhn.fhir.parser.DataFormatException; -import org.hl7.fhir.exceptions.FHIRException; +import java.util.List; import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseReference; @@ -28,7 +27,8 @@ public class QuestionnaireResponseProcessor { protected static final Logger logger = LoggerFactory.getLogger(QuestionnaireResponseProcessor.class); - protected final ResourceResolver resourceResolver; + protected final ResourceResolver questionnaireResponseResolver; + protected final ResourceResolver questionnaireResolver; protected final ModelResolver modelResolver; protected final EvaluationSettings evaluationSettings; protected final FhirVersionEnum fhirVersion; @@ -47,10 +47,11 @@ public QuestionnaireResponseProcessor( Repository repository, EvaluationSettings evaluationSettings, IExtractProcessor extractProcessor) { this.repository = requireNonNull(repository, "repository can not be null"); this.evaluationSettings = requireNonNull(evaluationSettings, "evaluationSettings can not be null"); - this.resourceResolver = new ResourceResolver("QuestionnaireResponse", this.repository); + this.questionnaireResponseResolver = new ResourceResolver("QuestionnaireResponse", this.repository); + this.questionnaireResolver = new ResourceResolver("Questionnaire", this.repository); this.fhirVersion = this.repository.fhirContext().getVersion().getVersion(); modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); - this.extractProcessor = extractProcessor != null ? extractProcessor : new ExtractProcessor(); + this.extractProcessor = extractProcessor; } public FhirContext fhirContext() { @@ -58,57 +59,94 @@ public FhirContext fhirContext() { } protected R resolveQuestionnaireResponse(Either questionnaireResponse) { - return (R) resourceResolver.resolve(questionnaireResponse); + return questionnaireResponseResolver.resolve(questionnaireResponse); } @SuppressWarnings("unchecked") - protected IBaseResource resolveQuestionnaire(IBaseResource questionnaireResponse) { - try { - IPrimitiveType canonical; - if (questionnaireResponse.getStructureFhirVersionEnum().equals(FhirVersionEnum.DSTU3)) { - var pathResult = modelResolver.resolvePath(questionnaireResponse, "questionnaire"); - canonical = pathResult == null ? null : ((IBaseReference) pathResult).getReferenceElement(); - } else { - canonical = (IPrimitiveType) modelResolver.resolvePath(questionnaireResponse, "questionnaire"); - } - return canonical == null - ? null - : SearchHelper.searchRepositoryByCanonical( + protected IBaseResource resolveQuestionnaire( + IBaseResource questionnaireResponse, Either questionnaireId) { + if (questionnaireId != null) { + return questionnaireResolver.resolve(questionnaireId); + } else { + try { + IPrimitiveType canonical; + if (questionnaireResponse.getStructureFhirVersionEnum().equals(FhirVersionEnum.DSTU3)) { + var pathResult = modelResolver.resolvePath(questionnaireResponse, "questionnaire"); + canonical = pathResult == null ? null : ((IBaseReference) pathResult).getReferenceElement(); + } else { + canonical = + (IPrimitiveType) modelResolver.resolvePath(questionnaireResponse, "questionnaire"); + } + if (canonical == null) { + return null; + } + IBaseResource questionnaire = null; + var contained = (List) modelResolver.resolvePath(questionnaireResponse, "contained"); + if (contained != null && !contained.isEmpty()) { + questionnaire = contained.stream() + .filter(r -> r.fhirType().equals("Questionnaire") + && canonical + .getValueAsString() + .equals(r.getIdElement().getIdPart())) + .findFirst() + .orElse(null); + } + if (questionnaire == null) { + questionnaire = SearchHelper.searchRepositoryByCanonical( repository, canonical, repository .fhirContext() .getResourceDefinition("questionnaire") .getImplementingClass()); - } catch (DataFormatException | FHIRException e) { - logger.error(e.getMessage()); - return null; + } + return questionnaire; + } catch (Exception e) { + logger.error(e.getMessage()); + return null; + } } } public IBaseBundle extract(Either resource) { - return extract(resource, null, null); + return extract(resource, null, null, null, true); } public IBaseBundle extract( - Either resource, IBaseParameters parameters, IBaseBundle bundle) { - return extract(resource, parameters, bundle, new LibraryEngine(repository, evaluationSettings)); + Either questionnaireResponseId, + Either questionnaireId, + IBaseParameters parameters, + IBaseBundle data, + boolean useServerData) { + return extract( + questionnaireResponseId, + questionnaireId, + parameters, + data, + useServerData, + new LibraryEngine(repository, evaluationSettings)); } public IBaseBundle extract( - Either resource, IBaseParameters parameters, IBaseBundle bundle, LibraryEngine libraryEngine) { - var questionnaireResponse = resolveQuestionnaireResponse(resource); - var questionnaire = resolveQuestionnaire(questionnaireResponse); + Either questionnaireResponseId, + Either questionnaireId, + IBaseParameters parameters, + IBaseBundle data, + boolean useServerData, + LibraryEngine libraryEngine) { + var questionnaireResponse = resolveQuestionnaireResponse(questionnaireResponseId); + var questionnaire = resolveQuestionnaire(questionnaireResponse, questionnaireId); var subject = (IBaseReference) modelResolver.resolvePath(questionnaireResponse, "subject"); var request = new ExtractRequest( questionnaireResponse, questionnaire, subject == null ? null : subject.getReferenceElement(), parameters, - bundle, + data, + useServerData, libraryEngine, - modelResolver, - repository.fhirContext()); - return extractProcessor.extract(request); + modelResolver); + var processor = extractProcessor != null ? extractProcessor : new ExtractProcessor(); + return processor.extract(request); } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractProcessor.java index 58bc2ffeb..a2cab0a50 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractProcessor.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractProcessor.java @@ -1,6 +1,5 @@ package org.opencds.cqf.fhir.cr.questionnaireresponse.extract; -import static org.opencds.cqf.fhir.cr.questionnaireresponse.extract.CodeMap.create; import static org.opencds.cqf.fhir.cr.questionnaireresponse.extract.ResponseBundle.createBundleDstu3; import static org.opencds.cqf.fhir.cr.questionnaireresponse.extract.ResponseBundle.createBundleR4; import static org.opencds.cqf.fhir.cr.questionnaireresponse.extract.ResponseBundle.createBundleR5; @@ -15,23 +14,22 @@ import org.hl7.fhir.instance.model.api.IBaseCoding; import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; import org.opencds.cqf.fhir.utility.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ExtractProcessor implements IExtractProcessor { protected static final Logger logger = LoggerFactory.getLogger(ExtractProcessor.class); - protected final ProcessItem processItem; - protected final ProcessDefinitionItem processDefinitionItem; + protected final ProcessItem itemProcessor; + protected final ProcessDefinitionItem definitionItemProcessor; public ExtractProcessor() { this(new ProcessItem(), new ProcessDefinitionItem()); } private ExtractProcessor(ProcessItem processItem, ProcessDefinitionItem processDefinitionItem) { - this.processItem = processItem; - this.processDefinitionItem = processDefinitionItem; + this.itemProcessor = processItem; + this.definitionItemProcessor = processDefinitionItem; } @Override @@ -46,17 +44,15 @@ public List processItems(ExtractRequest request) { var subject = (IBaseReference) request.resolvePath(request.getQuestionnaireResponse(), "subject"); var extractionContextExt = request.getItemExtractionContext(); if (extractionContextExt != null) { - request.getItems(request.getQuestionnaireResponse()) - .forEach(item -> processDefinitionItem(request, item, resources, subject)); + processDefinitionItem(request, null, null, resources, subject); } else { - var questionnaireCodeMap = create(request); + var questionnaireCodeMap = CodeMap.create(request); request.getItems(request.getQuestionnaireResponse()).forEach(item -> { + var questionnaireItem = request.getQuestionnaireItem(item); if (!request.getItems(item).isEmpty()) { - processGroupItem(request, item, questionnaireCodeMap, resources, subject); - } else if (request.resolvePathString(item, "definition") != null) { - processDefinitionItem(request, item, resources, subject); + processGroupItem(request, item, questionnaireItem, questionnaireCodeMap, resources, subject); } else { - processItem(request, item, questionnaireCodeMap, resources, subject); + processItem(request, item, questionnaireItem, questionnaireCodeMap, resources, subject); } }); } @@ -81,6 +77,7 @@ protected IBaseBundle createBundle(ExtractRequest request, List r protected void processGroupItem( ExtractRequest request, IBaseBackboneElement item, + IBaseBackboneElement questionnaireItem, Map> questionnaireCodeMap, List resources, IBaseReference subject) { @@ -94,16 +91,18 @@ protected void processGroupItem( .get(0), "value") : (IBaseReference) SerializationUtils.clone(subject); - if (request.resolvePathString(item, "definition") != null) { - processDefinitionItem(request, item, resources, groupSubject); + if (request.isDefinitionItem(questionnaireItem, item)) { + processDefinitionItem(request, item, questionnaireItem, resources, groupSubject); } else { request.getItems(item).forEach(childItem -> { - if (!childItem.getExtension().stream() - .anyMatch(e -> e.getUrl().equals(Constants.SDC_QUESTIONNAIRE_RESPONSE_IS_SUBJECT))) { + if (childItem.getExtension().stream() + .noneMatch(e -> e.getUrl().equals(Constants.SDC_QUESTIONNAIRE_RESPONSE_IS_SUBJECT))) { + var childQ = request.getQuestionnaireItem(childItem, request.getItems(questionnaireItem)); if (!request.getItems(childItem).isEmpty()) { - processGroupItem(request, childItem, questionnaireCodeMap, resources, groupSubject); + processGroupItem(request, childItem, childQ, questionnaireCodeMap, resources, groupSubject); } else { - processItem(request, childItem, questionnaireCodeMap, resources, groupSubject); + processObservationItem( + request, childItem, childQ, questionnaireCodeMap, resources, groupSubject); } } }); @@ -113,11 +112,26 @@ protected void processGroupItem( protected void processItem( ExtractRequest request, IBaseBackboneElement item, + IBaseBackboneElement questionnaireItem, + Map> questionnaireCodeMap, + List resources, + IBaseReference subject) { + if (request.isDefinitionItem(questionnaireItem, item)) { + processDefinitionItem(request, item, questionnaireItem, resources, subject); + } else { + processObservationItem(request, item, questionnaireItem, questionnaireCodeMap, resources, subject); + } + } + + protected void processObservationItem( + ExtractRequest request, + IBaseBackboneElement item, + IBaseBackboneElement questionnaireItem, Map> questionnaireCodeMap, List resources, IBaseReference subject) { try { - processItem.processItem(request, item, questionnaireCodeMap, resources, subject); + itemProcessor.processItem(request, item, questionnaireItem, questionnaireCodeMap, resources, subject); } catch (Exception e) { request.logException(e.getMessage()); throw e; @@ -125,11 +139,16 @@ protected void processItem( } protected void processDefinitionItem( - ExtractRequest request, IBaseBackboneElement item, List resources, IBaseReference subject) { + ExtractRequest request, + IBaseBackboneElement item, + IBaseBackboneElement questionnaireItem, + List resources, + IBaseReference subject) { try { - processDefinitionItem.processDefinitionItem(request, item, resources, subject); - } catch (ResolveExpressionException e) { + definitionItemProcessor.processDefinitionItem(request, item, questionnaireItem, resources, subject); + } catch (Exception e) { request.logException(e.getMessage()); + throw e; } } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractRequest.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractRequest.java index d9ff0dc16..78a37ba0a 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractRequest.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ExtractRequest.java @@ -1,30 +1,39 @@ package org.opencds.cqf.fhir.cr.questionnaireresponse.extract; +import static com.google.common.base.Preconditions.checkNotNull; + import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IIdType; import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.common.IQuestionnaireRequest; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.adapter.QuestionnaireAdapter; public class ExtractRequest implements IQuestionnaireRequest { private final IBaseResource questionnaireResponse; private final IBaseResource questionnaire; private final IIdType subjectId; private final IBaseParameters parameters; - private final IBaseBundle bundle; + private final IBaseBundle data; + private final boolean useServerData; private final LibraryEngine libraryEngine; private final ModelResolver modelResolver; private final FhirContext fhirContext; private final FhirVersionEnum fhirVersion; private final String defaultLibraryUrl; private IBaseOperationOutcome operationOutcome; + private QuestionnaireAdapter questionnaireAdapter; public ExtractRequest( IBaseResource questionnaireResponse, @@ -32,26 +41,30 @@ public ExtractRequest( IIdType subjectId, IBaseParameters parameters, IBaseBundle bundle, + boolean useServerData, LibraryEngine libraryEngine, - ModelResolver modelResolver, - FhirContext fhirContext) { + ModelResolver modelResolver) { + checkNotNull(questionnaireResponse, "expected non-null value for questionnaireResponse"); + checkNotNull(libraryEngine, "expected non-null value for libraryEngine"); + checkNotNull(modelResolver, "expected non-null value for modelResolver"); this.questionnaireResponse = questionnaireResponse; + this.questionnaire = questionnaire; this.subjectId = subjectId; this.parameters = parameters; - this.bundle = bundle; + this.data = bundle; + this.useServerData = useServerData; this.libraryEngine = libraryEngine; this.modelResolver = modelResolver; - this.fhirContext = fhirContext; - this.fhirVersion = fhirContext.getVersion().getVersion(); - this.questionnaire = questionnaire; - this.defaultLibraryUrl = ""; + fhirContext = this.libraryEngine.getRepository().fhirContext(); + fhirVersion = this.questionnaireResponse.getStructureFhirVersionEnum(); + defaultLibraryUrl = ""; } public IBaseResource getQuestionnaireResponse() { return questionnaireResponse; } - public Boolean hasQuestionnaire() { + public boolean hasQuestionnaire() { return questionnaire != null; } @@ -59,6 +72,32 @@ public IBaseResource getQuestionnaire() { return questionnaire; } + public QuestionnaireAdapter getQuestionnaireAdapter() { + if (questionnaireAdapter == null && questionnaire != null) { + questionnaireAdapter = (QuestionnaireAdapter) + getAdapterFactory().createKnowledgeArtifactAdapter((IDomainResource) questionnaire); + } + return questionnaireAdapter; + } + + public IBaseBackboneElement getQuestionnaireItem(IBaseBackboneElement item) { + return hasQuestionnaire() ? getQuestionnaireItem(item, getItems(getQuestionnaire())) : null; + } + + public IBaseBackboneElement getQuestionnaireItem(IBaseBackboneElement item, List qItems) { + return qItems != null + ? qItems.stream() + .filter(i -> getItemLinkId(i).equals(getItemLinkId(item))) + .findFirst() + .orElse(null) + : null; + } + + public boolean isDefinitionItem(IBaseBackboneElement item, IBaseBackboneElement qrItem) { + return hasExtension(item == null ? qrItem : item, Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT) + || StringUtils.isNotBlank(resolvePathString(item == null ? qrItem : item, "definition")); + } + public IBaseExtension getItemExtractionContext() { var qrExt = getExtensions(questionnaireResponse).stream() .filter(e -> e.getUrl().equals(Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT)) @@ -79,6 +118,7 @@ public String getExtractId() { return "extract-" + questionnaireResponse.getIdElement().getIdPart(); } + @Override public FhirContext getFhirContext() { return fhirContext; } @@ -94,8 +134,13 @@ public IIdType getSubjectId() { } @Override - public IBaseBundle getBundle() { - return bundle; + public IBaseBundle getData() { + return data; + } + + @Override + public boolean getUseServerData() { + return useServerData; } @Override diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessDefinitionItem.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessDefinitionItem.java index 34fd1ec36..11202e978 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessDefinitionItem.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessDefinitionItem.java @@ -12,16 +12,19 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.ImmutablePair; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseReference; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.ICompositeType; import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.hl7.fhir.r4.model.IdType; import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.CqfExpression; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,49 +36,151 @@ public ProcessDefinitionItem() { this(new ExpressionProcessor()); } - private ProcessDefinitionItem(ExpressionProcessor expressionProcessor) { + public ProcessDefinitionItem(ExpressionProcessor expressionProcessor) { this.expressionProcessor = expressionProcessor; } - public void processDefinitionItem( - ExtractRequest request, IBaseBackboneElement item, List resources, IBaseReference subject) - throws ResolveExpressionException { - processDefinitionItem(request, item, resources, subject, null); - } - public void processDefinitionItem( ExtractRequest request, IBaseBackboneElement item, + IBaseBackboneElement questionnaireItem, List resources, - IBaseReference subject, - IBaseExtension contextExtension) - throws ResolveExpressionException { + IBaseReference subject) { // Definition-based extraction - // http://build.fhir.org/ig/HL7/sdc/extraction.html#definition-based-extraction - var contextExtensionUrl = Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT; - var itemExtractionContext = request.hasExtension(item, contextExtensionUrl) - ? expressionProcessor.getCqfExpression(request, request.getExtensions(item), contextExtensionUrl) - : expressionProcessor.getCqfExpression( - request, request.getExtensions(request.getQuestionnaireResponse()), contextExtensionUrl); - if (itemExtractionContext != null) { - var context = expressionProcessor.getExpressionResultForItem( - request, itemExtractionContext, request.getItemLinkId(item)); - if (context != null && !context.isEmpty()) { - // TODO: edit context instead of creating new resources + var linkId = request.getItemLinkId(item); + var context = getContext(request, linkId, getContextExtension(request, item, questionnaireItem)); + var resourceType = context.left; + var contextResource = context.right; + var definition = getDefinition(request, item, questionnaireItem); + if (resourceType == null && (contextResource == null || contextResource.isEmpty())) { + if (definition == null) { + throw new IllegalArgumentException(String.format("Unable to retrieve definition for item: %s", linkId)); } + resourceType = getDefinitionType(definition); } + if (contextResource != null && contextResource.size() > 1) { + contextResource.forEach(r -> processResource( + request, linkId, r, false, definition, item, questionnaireItem, resources, subject)); + } else { + var isCreatedResource = true; + IBaseResource resource = null; + if (contextResource != null && !contextResource.isEmpty()) { + resource = contextResource.get(0); + isCreatedResource = false; + } else { + resource = (IBaseResource) newValue(request, resourceType); + } + processResource( + request, + linkId, + resource, + isCreatedResource, + definition, + item, + questionnaireItem, + resources, + subject); + } + } - var definition = request.resolvePathString(item, "definition"); - var resourceType = getDefinitionType(definition); - var resource = (IBaseResource) newValue(request, resourceType); + private IBaseExtension getContextExtension( + ExtractRequest request, IBaseBackboneElement item, IBaseBackboneElement questionnaireItem) { + // First, check the Questionnaire.item + // Second, check the QuestionnaireResponse.item + // Third, check the Questionnaire + return request.getExtensionByUrl( + request.hasExtension(questionnaireItem, Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT) + ? questionnaireItem + : request.hasExtension(item, Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT) + ? item + : request.getQuestionnaire(), + Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT); + } + + @SuppressWarnings("unchecked") + private ImmutablePair> getContext( + ExtractRequest request, String linkId, IBaseExtension contextExtension) { + String resourceType = null; + List context = null; + if (contextExtension != null) { + var contextValue = contextExtension.getValue(); + if (contextValue instanceof IPrimitiveType) { + // Extension value is a CodeType containing the Type of the Resource to be extracted. + resourceType = ((IPrimitiveType) contextValue).getValueAsString(); + } else if (contextValue instanceof ICompositeType) { + // Extension value is an Expression resulting in the Resource(s) to be modified by the extraction. + var contextExpression = CqfExpression.of(contextExtension, request.getDefaultLibraryUrl()); + if (contextExpression != null) { + try { + context = + expressionProcessor + .getExpressionResultForItem(request, contextExpression, linkId) + .stream() + .map(r -> (IBaseResource) r) + .collect(Collectors.toList()); + } catch (Exception e) { + var message = String.format( + "Error encountered processing item %s: Error resolving context expression %s: %s", + linkId, contextExpression.getExpression(), e.getMessage()); + logger.error(message); + throw new IllegalArgumentException(message); + } + } + } + } + return new ImmutablePair<>(resourceType, context); + } + + private void processResource( + ExtractRequest request, + String linkId, + IBaseResource resource, + boolean isCreatedResource, + String definition, + IBaseBackboneElement item, + IBaseBackboneElement questionnaireItem, + List resources, + IBaseReference subject) { var resourceDefinition = request.getFhirContext().getElementDefinition(resource.getClass()); - resource.setId(new IdType(resourceType, request.getExtractId() + "-" + request.getItemLinkId(item))); - resolveMeta(resource, definition); + if (isCreatedResource) { + var id = request.getExtractId(); + if (StringUtils.isNotBlank(linkId)) { + id = id.concat(String.format("-%s", linkId)); + } + resource.setId(new IdType(resource.fhirType(), id)); + resolveMeta(resource, definition); + resolveSubject(request, resource, subject, resourceDefinition); + resolveAuthored(request, linkId, resource, resourceDefinition); + } + + processChildren( + request, + resourceDefinition, + resource, + request.getItems(item == null ? request.getQuestionnaireResponse() : item), + request.getItems(questionnaireItem == null ? request.getQuestionnaire() : questionnaireItem)); + + resources.add(resource); + } + + private void resolveSubject( + ExtractRequest request, + IBaseResource resource, + IBaseReference subject, + BaseRuntimeElementDefinition resourceDefinition) { var subjectPath = getSubjectPath(resourceDefinition); if (subjectPath != null) { request.getModelResolver().setValue(resource, subjectPath, subject); } + } + + private void resolveAuthored( + ExtractRequest request, + String linkId, + IBaseResource resource, + BaseRuntimeElementDefinition resourceDefinition) { var authorPath = getAuthorPath(resourceDefinition); if (authorPath != null) { var authorValue = request.resolvePath(request.getQuestionnaireResponse(), "author"); @@ -96,57 +201,75 @@ public void processDefinitionItem( request.getModelResolver().setValue(resource, dateDef.getElementName(), authoredValue); } catch (Exception ex) { var message = String.format( - "Error encountered attempting to set property (%s) on resource type (%s): %s", - dateDef.getElementName(), resource.fhirType(), ex.getMessage()); + "Error encountered processing item %s: Error setting property (%s) on resource type (%s): %s", + linkId, dateDef.getElementName(), resource.fhirType(), ex.getMessage()); logger.error(message); request.logException(message); } }); } } - var items = request.getItems(item); - processChildren(request, resourceDefinition, resource, items); - - resources.add(resource); } private void processChildren( ExtractRequest request, BaseRuntimeElementDefinition resourceDefinition, IBaseResource resource, - List items) { + List items, + List questionnaireItems) { items.forEach(childItem -> { - var childDefinition = request.resolvePathString(childItem, "definition"); + var questionnaireItem = questionnaireItems.stream() + .filter(i -> request.getItemLinkId(i).equals(request.getItemLinkId(childItem))) + .findFirst() + .orElse(null); + var childDefinition = getDefinition(request, childItem, questionnaireItem); if (childDefinition != null) { var path = childDefinition.split("#")[1]; // First element is always the resource type, so it can be ignored path = path.replace(resource.fhirType() + ".", ""); var children = request.getItems(childItem); if (!children.isEmpty()) { - processChildren(request, resourceDefinition, resource, children); + processChildren(request, resourceDefinition, resource, children, request.getItems(resource)); } else { - var answers = request.resolvePathList(childItem, "answer", IBaseBackboneElement.class); - var answerValue = answers.isEmpty() ? null : request.resolvePath(answers.get(0), "value"); - if (answerValue != null) { - // Check if answer type matches path types available and transform if necessary - var pathDefinition = - (BaseRuntimeDeclaredChildDefinition) resourceDefinition.getChildByName(path); - if (pathDefinition instanceof RuntimeChildChoiceDefinition) { - var choices = ((RuntimeChildChoiceDefinition) pathDefinition).getChoices(); - if (!choices.contains(answerValue.getClass())) { - answerValue = transformValueToResource(request.getFhirVersion(), answerValue); - } - } else if (pathDefinition instanceof RuntimeChildCompositeDatatypeDefinition - && !pathDefinition.getField().getType().equals(answerValue.getClass())) { - answerValue = transformValueToResource(request.getFhirVersion(), answerValue); - } - request.getModelResolver().setValue(resource, path, answerValue); - } + processChild(request, resourceDefinition, resource, childItem, path); } } }); } + private void processChild( + ExtractRequest request, + BaseRuntimeElementDefinition resourceDefinition, + IBaseResource resource, + IBaseBackboneElement childItem, + String path) { + var answers = request.resolvePathList(childItem, "answer", IBaseBackboneElement.class); + var answerValue = answers.isEmpty() ? null : request.resolvePath(answers.get(0), "value"); + if (answerValue != null) { + // Check if answer type matches path types available and transform if necessary + var pathDefinition = (BaseRuntimeDeclaredChildDefinition) resourceDefinition.getChildByName(path); + if (pathDefinition instanceof RuntimeChildChoiceDefinition) { + var choices = ((RuntimeChildChoiceDefinition) pathDefinition).getChoices(); + if (!choices.contains(answerValue.getClass())) { + answerValue = transformValueToResource(request.getFhirVersion(), answerValue); + } + } else if (pathDefinition instanceof RuntimeChildCompositeDatatypeDefinition + && !pathDefinition.getField().getType().equals(answerValue.getClass())) { + answerValue = transformValueToResource(request.getFhirVersion(), answerValue); + } + request.getModelResolver().setValue(resource, path, answerValue); + } + } + + private String getDefinition( + ExtractRequest request, IBaseBackboneElement item, IBaseBackboneElement questionnaireItem) { + var definition = request.resolvePathString(questionnaireItem, "definition"); + if (definition == null) { + definition = request.resolvePathString(item, "definition"); + } + return definition; + } + private String getDefinitionType(String definition) { if (!definition.contains("#")) { throw new IllegalArgumentException( @@ -175,7 +298,7 @@ private List getDateDefs(BaseRuntimeElementD results.add(definition.getChildByName("recordDate")); return results.stream() - .filter(d -> d instanceof BaseRuntimeChildDatatypeDefinition) + .filter(BaseRuntimeChildDatatypeDefinition.class::isInstance) .map(d -> (BaseRuntimeChildDatatypeDefinition) d) .collect(Collectors.toList()); } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessItem.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessItem.java index 3305d3c6f..e19615672 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessItem.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessItem.java @@ -13,6 +13,7 @@ public class ProcessItem { public void processItem( ExtractRequest request, IBaseBackboneElement item, + IBaseBackboneElement questionnaireItem, Map> questionnaireCodeMap, List resources, IBaseReference subject) { @@ -26,14 +27,20 @@ public void processItem( answers.forEach(answer -> { var answerItems = request.getItems(answer); if (!answerItems.isEmpty()) { - answerItems.forEach( - answerItem -> processItem(request, answerItem, questionnaireCodeMap, resources, subject)); + answerItems.forEach(answerItem -> processItem( + request, answerItem, questionnaireItem, questionnaireCodeMap, resources, subject)); } else { var linkId = request.resolvePathString(item, "linkId"); if (questionnaireCodeMap.get(linkId) != null && !questionnaireCodeMap.get(linkId).isEmpty()) { resources.add(createObservationFromItemAnswer( - request, answer, linkId, subject, questionnaireCodeMap, categoryExt)); + request, + answer, + questionnaireItem, + linkId, + subject, + questionnaireCodeMap, + categoryExt)); } } }); @@ -43,6 +50,7 @@ public void processItem( private IBaseResource createObservationFromItemAnswer( ExtractRequest request, IBaseBackboneElement answer, + IBaseBackboneElement questionnaireItem, String linkId, IBaseReference subject, Map> questionnaireCodeMap, @@ -52,13 +60,16 @@ private IBaseResource createObservationFromItemAnswer( switch (request.getFhirVersion()) { case DSTU3: return new org.opencds.cqf.fhir.cr.questionnaireresponse.extract.dstu3.ObservationResolver() - .resolve(request, answer, linkId, subject, questionnaireCodeMap, categoryExt); + .resolve( + request, answer, questionnaireItem, linkId, subject, questionnaireCodeMap, categoryExt); case R4: return new org.opencds.cqf.fhir.cr.questionnaireresponse.extract.r4.ObservationResolver() - .resolve(request, answer, linkId, subject, questionnaireCodeMap, categoryExt); + .resolve( + request, answer, questionnaireItem, linkId, subject, questionnaireCodeMap, categoryExt); case R5: return new org.opencds.cqf.fhir.cr.questionnaireresponse.extract.r5.ObservationResolver() - .resolve(request, answer, linkId, subject, questionnaireCodeMap, categoryExt); + .resolve( + request, answer, questionnaireItem, linkId, subject, questionnaireCodeMap, categoryExt); default: return null; diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/dstu3/ObservationResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/dstu3/ObservationResolver.java index c5180e74c..d14c45a6d 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/dstu3/ObservationResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/dstu3/ObservationResolver.java @@ -12,6 +12,8 @@ import org.hl7.fhir.dstu3.model.Extension; import org.hl7.fhir.dstu3.model.InstantType; import org.hl7.fhir.dstu3.model.Observation; +import org.hl7.fhir.dstu3.model.Quantity; +import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.dstu3.model.QuestionnaireResponse; import org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent; import org.hl7.fhir.dstu3.model.Reference; @@ -28,16 +30,17 @@ public class ObservationResolver { public IBaseResource resolve( ExtractRequest request, IBaseBackboneElement baseAnswer, + IBaseBackboneElement baseItem, String linkId, IBaseReference subject, Map> questionnaireCodeMap, IBaseExtension categoryExt) { var questionnaireResponse = (QuestionnaireResponse) request.getQuestionnaireResponse(); var answer = (QuestionnaireResponseItemAnswerComponent) baseAnswer; + var item = (QuestionnaireItemComponent) baseItem; var obs = new Observation(); obs.setId(request.getExtractId() + "." + linkId); obs.setBasedOn(questionnaireResponse.getBasedOn()); - // obs.setPartOf(questionnaireResponse.getPartOf()); obs.setStatus(Observation.ObservationStatus.FINAL); var qrCategoryCode = categoryExt == null @@ -53,8 +56,6 @@ public IBaseResource resolve( .map(c -> (Coding) c) .collect(Collectors.toList()))); obs.setSubject((Reference) subject); - // obs.setFocus(); - // obs.setEncounter(questionnaireResponse.getEncounter()); var authoredDate = new DateTimeType((questionnaireResponse.hasAuthored() ? questionnaireResponse.getAuthored().toInstant() : Instant.now()) @@ -70,6 +71,14 @@ public IBaseResource resolve( case "date": obs.setValue(new DateTimeType(((DateType) answer.getValue()).getValue())); break; + case "decimal": + case "integer": + if (item.hasExtension(Constants.QUESTIONNAIRE_UNIT)) { + obs.setValue(getQuantity(answer, item)); + } else { + obs.setValue(answer.getValue()); + } + break; default: obs.setValue(answer.getValue()); } @@ -89,4 +98,19 @@ public IBaseResource resolve( obs.addExtension(linkIdExtension); return obs; } + + protected Quantity getQuantity(QuestionnaireResponseItemAnswerComponent answer, QuestionnaireItemComponent item) { + var unit = (Coding) item.getExtensionByUrl(Constants.QUESTIONNAIRE_UNIT).getValue(); + var quantity = new Quantity() + .setUnit(unit.getDisplay()) + .setSystem(unit.getSystem()) + .setCode(unit.getCode()); + if (answer.hasValueDecimalType()) { + quantity.setValueElement(answer.getValueDecimalType()); + } + if (answer.hasValueIntegerType()) { + quantity.setValue(answer.getValueIntegerType().getValue()); + } + return quantity; + } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r4/ObservationResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r4/ObservationResolver.java index baab2d37c..5c9a7937d 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r4/ObservationResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r4/ObservationResolver.java @@ -17,6 +17,8 @@ import org.hl7.fhir.r4.model.Extension; import org.hl7.fhir.r4.model.InstantType; import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Quantity; +import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent; import org.hl7.fhir.r4.model.Reference; @@ -28,12 +30,14 @@ public class ObservationResolver { public IBaseResource resolve( ExtractRequest request, IBaseBackboneElement baseAnswer, + IBaseBackboneElement baseItem, String linkId, IBaseReference subject, Map> questionnaireCodeMap, IBaseExtension categoryExt) { var questionnaireResponse = (QuestionnaireResponse) request.getQuestionnaireResponse(); var answer = (QuestionnaireResponseItemAnswerComponent) baseAnswer; + var item = (QuestionnaireItemComponent) baseItem; var obs = new Observation(); obs.setId(request.getExtractId() + "." + linkId); obs.setBasedOn(questionnaireResponse.getBasedOn()); @@ -53,7 +57,6 @@ public IBaseResource resolve( .map(c -> (Coding) c) .collect(Collectors.toList()))); obs.setSubject((Reference) subject); - // obs.setFocus(); obs.setEncounter(questionnaireResponse.getEncounter()); var authoredDate = new DateTimeType((questionnaireResponse.hasAuthored() ? questionnaireResponse.getAuthored().toInstant() @@ -70,6 +73,14 @@ public IBaseResource resolve( case "date": obs.setValue(new DateTimeType(((DateType) answer.getValue()).getValue())); break; + case "decimal": + case "integer": + if (item.hasExtension(Constants.QUESTIONNAIRE_UNIT)) { + obs.setValue(getQuantity(answer, item)); + } else { + obs.setValue(answer.getValue()); + } + break; default: obs.setValue(answer.getValue()); } @@ -84,4 +95,19 @@ public IBaseResource resolve( obs.addExtension(linkIdExtension); return obs; } + + protected Quantity getQuantity(QuestionnaireResponseItemAnswerComponent answer, QuestionnaireItemComponent item) { + var unit = (Coding) item.getExtensionByUrl(Constants.QUESTIONNAIRE_UNIT).getValue(); + var quantity = new Quantity() + .setUnit(unit.getDisplay()) + .setSystem(unit.getSystem()) + .setCode(unit.getCode()); + if (answer.hasValueDecimalType()) { + quantity.setValueElement(answer.getValueDecimalType()); + } + if (answer.hasValueIntegerType()) { + quantity.setValue(answer.getValueIntegerType().getValue()); + } + return quantity; + } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r5/ObservationResolver.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r5/ObservationResolver.java index f5c5cc743..81f21a371 100644 --- a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r5/ObservationResolver.java +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/r5/ObservationResolver.java @@ -18,6 +18,8 @@ import org.hl7.fhir.r5.model.Extension; import org.hl7.fhir.r5.model.InstantType; import org.hl7.fhir.r5.model.Observation; +import org.hl7.fhir.r5.model.Quantity; +import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r5.model.QuestionnaireResponse; import org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent; import org.hl7.fhir.r5.model.Reference; @@ -29,12 +31,14 @@ public class ObservationResolver { public IBaseResource resolve( ExtractRequest request, IBaseBackboneElement baseAnswer, + IBaseBackboneElement baseItem, String linkId, IBaseReference subject, Map> questionnaireCodeMap, IBaseExtension categoryExt) { var questionnaireResponse = (QuestionnaireResponse) request.getQuestionnaireResponse(); var answer = (QuestionnaireResponseItemAnswerComponent) baseAnswer; + var item = (QuestionnaireItemComponent) baseItem; var obs = new Observation(); obs.setId(request.getExtractId() + "." + linkId); obs.setBasedOn(questionnaireResponse.getBasedOn()); @@ -54,7 +58,6 @@ public IBaseResource resolve( .map(c -> (Coding) c) .collect(Collectors.toList()))); obs.setSubject((Reference) subject); - // obs.setFocus(); obs.setEncounter(questionnaireResponse.getEncounter()); var authoredDate = new DateTimeType((questionnaireResponse.hasAuthored() ? questionnaireResponse.getAuthored().toInstant() @@ -71,6 +74,14 @@ public IBaseResource resolve( case "date": obs.setValue(new DateTimeType(((DateType) answer.getValue()).getValue())); break; + case "decimal": + case "integer": + if (item.hasExtension(Constants.QUESTIONNAIRE_UNIT)) { + obs.setValue(getQuantity(answer, item)); + } else { + obs.setValue(answer.getValue()); + } + break; default: obs.setValue(answer.getValue()); } @@ -85,4 +96,19 @@ public IBaseResource resolve( obs.addExtension(linkIdExtension); return obs; } + + protected Quantity getQuantity(QuestionnaireResponseItemAnswerComponent answer, QuestionnaireItemComponent item) { + var unit = (Coding) item.getExtensionByUrl(Constants.QUESTIONNAIRE_UNIT).getValue(); + var quantity = new Quantity() + .setUnit(unit.getDisplay()) + .setSystem(unit.getSystem()) + .setCode(unit.getCode()); + if (answer.hasValueDecimalType()) { + quantity.setValueElement(answer.getValueDecimalType()); + } + if (answer.hasValueIntegerType()) { + quantity.setValue(answer.getValueIntegerType().getValue()); + } + return quantity; + } } diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/valueset/ValueSetProcessor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/valueset/ValueSetProcessor.java new file mode 100644 index 000000000..0c03e6d67 --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/valueset/ValueSetProcessor.java @@ -0,0 +1,98 @@ +package org.opencds.cqf.fhir.cr.valueset; + +import static java.util.Objects.requireNonNull; +import static org.opencds.cqf.fhir.utility.Parameters.newBooleanPart; +import static org.opencds.cqf.fhir.utility.Parameters.newParameters; + +import ca.uhn.fhir.context.FhirVersionEnum; +import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.opencds.cqf.cql.engine.model.ModelResolver; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.EvaluationSettings; +import org.opencds.cqf.fhir.cr.common.DataRequirementsProcessor; +import org.opencds.cqf.fhir.cr.common.IDataRequirementsProcessor; +import org.opencds.cqf.fhir.cr.common.IPackageProcessor; +import org.opencds.cqf.fhir.cr.common.PackageProcessor; +import org.opencds.cqf.fhir.cr.common.ResourceResolver; +import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache; +import org.opencds.cqf.fhir.utility.monad.Either3; + +public class ValueSetProcessor { + protected final ModelResolver modelResolver; + protected final FhirVersionEnum fhirVersion; + protected IPackageProcessor packageProcessor; + protected IDataRequirementsProcessor dataRequirementsProcessor; + protected Repository repository; + protected EvaluationSettings evaluationSettings; + + public ValueSetProcessor(Repository repository) { + this(repository, EvaluationSettings.getDefault()); + } + + public ValueSetProcessor(Repository repository, EvaluationSettings evaluationSettings) { + this(repository, evaluationSettings, null, null); + } + + public ValueSetProcessor( + Repository repository, + EvaluationSettings evaluationSettings, + IPackageProcessor packageProcessor, + IDataRequirementsProcessor dataRequirementsProcessor) { + this.repository = requireNonNull(repository, "repository can not be null"); + this.evaluationSettings = requireNonNull(evaluationSettings, "evaluationSettings can not be null"); + fhirVersion = this.repository.fhirContext().getVersion().getVersion(); + modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); + this.packageProcessor = packageProcessor; + this.dataRequirementsProcessor = dataRequirementsProcessor; + } + + public EvaluationSettings evaluationSettings() { + return evaluationSettings; + } + + protected , R extends IBaseResource> R resolveValueSet( + Either3 valueSet) { + return new ResourceResolver("ValueSet", repository).resolve(valueSet); + } + + public , R extends IBaseResource> IBaseBundle packageValueSet( + Either3 valueSet) { + return packageValueSet(valueSet, false); + } + + public , R extends IBaseResource> IBaseBundle packageValueSet( + Either3 valueSet, boolean isPut) { + return packageValueSet( + valueSet, + newParameters( + repository.fhirContext(), + "package-parameters", + newBooleanPart(repository.fhirContext(), "isPut", isPut))); + } + + public , R extends IBaseResource> IBaseBundle packageValueSet( + Either3 valueSet, IBaseParameters parameters) { + return packageValueSet(resolveValueSet(valueSet), parameters); + } + + public IBaseBundle packageValueSet(IBaseResource valueSet, IBaseParameters parameters) { + var processor = packageProcessor != null ? packageProcessor : new PackageProcessor(repository); + return processor.packageResource(valueSet, parameters); + } + + public , R extends IBaseResource> IBaseResource dataRequirements( + Either3 valueSet, IBaseParameters parameters) { + return dataRequirements(resolveValueSet(valueSet), parameters); + } + + public IBaseResource dataRequirements(IBaseResource valueSet, IBaseParameters parameters) { + var processor = dataRequirementsProcessor != null + ? dataRequirementsProcessor + : new DataRequirementsProcessor(repository, evaluationSettings); + return processor.getDataRequirements(valueSet, parameters); + } +} diff --git a/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/visitor/DataRequirementsVisitor.java b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/visitor/DataRequirementsVisitor.java new file mode 100644 index 000000000..74dffedd3 --- /dev/null +++ b/cqf-fhir-cr/src/main/java/org/opencds/cqf/fhir/cr/visitor/DataRequirementsVisitor.java @@ -0,0 +1,264 @@ +package org.opencds.cqf.fhir.cr.visitor; + +import static org.opencds.cqf.fhir.utility.visitor.VisitorHelper.findUnsupportedCapability; +import static org.opencds.cqf.fhir.utility.visitor.VisitorHelper.processCanonicals; + +import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.parser.DataFormatException; +import ca.uhn.fhir.rest.server.exceptions.PreconditionFailedException; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.cqframework.cql.cql2elm.CqlTranslator; +import org.cqframework.cql.cql2elm.LibraryManager; +import org.cqframework.cql.cql2elm.LibrarySourceProvider; +import org.cqframework.cql.cql2elm.ModelManager; +import org.cqframework.cql.elm.requirements.fhir.DataRequirementsProcessor; +import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_50; +import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50; +import org.hl7.fhir.convertors.conv30_50.VersionConvertor_30_50; +import org.hl7.fhir.convertors.conv40_50.VersionConvertor_40_50; +import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.instance.model.api.IBaseHasExtensions; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.ICompositeType; +import org.hl7.fhir.instance.model.api.IDomainResource; +import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.hl7.fhir.r5.model.Library; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.Engines; +import org.opencds.cqf.fhir.cql.EvaluationSettings; +import org.opencds.cqf.fhir.cql.cql2elm.content.RepositoryFhirLibrarySourceProvider; +import org.opencds.cqf.fhir.cql.cql2elm.util.LibraryVersionSelector; +import org.opencds.cqf.fhir.utility.BundleHelper; +import org.opencds.cqf.fhir.utility.Canonicals; +import org.opencds.cqf.fhir.utility.Libraries; +import org.opencds.cqf.fhir.utility.SearchHelper; +import org.opencds.cqf.fhir.utility.adapter.AdapterFactory; +import org.opencds.cqf.fhir.utility.adapter.KnowledgeArtifactAdapter; +import org.opencds.cqf.fhir.utility.adapter.LibraryAdapter; +import org.opencds.cqf.fhir.utility.visitor.IKnowledgeArtifactVisitor; +import org.opencds.cqf.fhir.utility.visitor.VisitorHelper; + +public class DataRequirementsVisitor implements IKnowledgeArtifactVisitor { + protected DataRequirementsProcessor dataRequirementsProcessor; + protected EvaluationSettings evaluationSettings; + + public DataRequirementsVisitor(EvaluationSettings evaluationSettings) { + dataRequirementsProcessor = new DataRequirementsProcessor(); + this.evaluationSettings = evaluationSettings; + } + + @Override + public IBase visit(KnowledgeArtifactAdapter adapter, Repository repository, IBaseParameters drParameters) { + var fhirVersion = adapter.get().getStructureFhirVersionEnum(); + Optional parameters = + VisitorHelper.getResourceParameter("parameters", drParameters, IBaseParameters.class); + List artifactVersion = VisitorHelper.getListParameter( + "artifactVersion", drParameters, IPrimitiveType.class) + .map(l -> l.stream().map(t -> (String) t.getValue()).collect(Collectors.toList())) + .orElseGet(() -> new ArrayList<>()); + List checkArtifactVersion = VisitorHelper.getListParameter( + "checkArtifactVersion", drParameters, IPrimitiveType.class) + .map(l -> l.stream().map(t -> (String) t.getValue()).collect(Collectors.toList())) + .orElseGet(() -> new ArrayList<>()); + List forceArtifactVersion = VisitorHelper.getListParameter( + "forceArtifactVersion", drParameters, IPrimitiveType.class) + .map(l -> l.stream().map(t -> (String) t.getValue()).collect(Collectors.toList())) + .orElseGet(() -> new ArrayList<>()); + + LibraryAdapter library; + var primaryLibrary = adapter.getPrimaryLibrary(repository); + if (primaryLibrary != null) { + var libraryManager = createLibraryManager(repository); + CqlTranslator translator = translateLibrary(primaryLibrary, libraryManager); + var cqlFhirParametersConverter = Engines.getCqlFhirParametersConverter(repository.fhirContext()); + var evaluationParameters = + parameters.isPresent() ? cqlFhirParametersConverter.toCqlParameters(parameters.get()) : null; + + var r5Library = dataRequirementsProcessor.gatherDataRequirements( + libraryManager, + translator.getTranslatedLibrary(), + evaluationSettings.getCqlOptions().getCqlCompilerOptions(), + null, + evaluationParameters, + true, + true); + library = convertAndCreateAdapter(fhirVersion, r5Library); + } else { + library = AdapterFactory.forFhirContext(repository.fhirContext()) + .createLibrary(repository + .fhirContext() + .getResourceDefinition("Library") + .newInstance()); + library.setName("EffectiveDataRequirements"); + library.setStatus(adapter.getStatus()); + library.setType("module-definition"); + } + var gatheredResources = new ArrayList(); + var relatedArtifacts = stripInvalid(library); + recursiveGather( + adapter.get(), + gatheredResources, + relatedArtifacts, + repository, + forceArtifactVersion, + forceArtifactVersion, + artifactVersion, + checkArtifactVersion, + forceArtifactVersion); + + library.setRelatedArtifact(relatedArtifacts); + return library.get(); + } + + @SuppressWarnings("unchecked") + private List stripInvalid(LibraryAdapter library) { + // Until we support passing the Manifest we do not know the IG context and cannot correctly setup the + // NamespaceManager + // This method will strip out any relatedArtifacts that do not have a full valid canonical + return library.getRelatedArtifact().stream() + .filter(r -> { + var resourcePath = library.resolvePath(r, "resource"); + var reference = + library.fhirContext().getVersion().getVersion().equals(FhirVersionEnum.DSTU3) + ? ((org.hl7.fhir.dstu3.model.Reference) resourcePath).getReference() + : ((IPrimitiveType) resourcePath).getValue(); + return reference.split("/").length > 2; + }) + .map(r -> (T) r) + .collect(Collectors.toList()); + } + + private LibraryAdapter convertAndCreateAdapter(FhirVersionEnum fhirVersion, Library r5Library) { + var adapterFactory = AdapterFactory.forFhirVersion(fhirVersion); + switch (fhirVersion) { + case DSTU3: + var versionConvertor3050 = new VersionConvertor_30_50(new BaseAdvisor_30_50()); + return adapterFactory.createLibrary(versionConvertor3050.convertResource(r5Library)); + case R4: + var versionConvertor4050 = new VersionConvertor_40_50(new BaseAdvisor_40_50()); + return adapterFactory.createLibrary(versionConvertor4050.convertResource(r5Library)); + case R5: + return adapterFactory.createLibrary(r5Library); + + default: + throw new IllegalArgumentException( + String.format("FHIR version %s is not supported.", fhirVersion.toString())); + } + } + + protected CqlTranslator getTranslator(InputStream cqlStream, LibraryManager libraryManager) { + CqlTranslator translator; + try { + translator = CqlTranslator.fromStream(cqlStream, libraryManager); + } catch (IOException e) { + throw new IllegalArgumentException( + String.format("Errors occurred translating library: %s", e.getMessage())); + } + + return translator; + } + + protected CqlTranslator translateLibrary(IBaseResource library, LibraryManager libraryManager) { + CqlTranslator translator = getTranslator( + new ByteArrayInputStream( + Libraries.getContent(library, "text/cql").get()), + libraryManager); + if (!translator.getErrors().isEmpty()) { + throw new RuntimeException(translator.getErrors().get(0).getMessage()); + } + return translator; + } + + protected static LibrarySourceProvider buildLibrarySource(Repository repository) { + AdapterFactory adapterFactory = AdapterFactory.forFhirContext(repository.fhirContext()); + return new RepositoryFhirLibrarySourceProvider( + repository, adapterFactory, new LibraryVersionSelector(adapterFactory)); + } + + protected LibraryManager createLibraryManager(Repository repository) { + var librarySourceProvider = buildLibrarySource(repository); + var sourceProviders = new ArrayList<>(Arrays.asList(librarySourceProvider, librarySourceProvider)); + var modelManager = evaluationSettings.getModelCache() != null + ? new ModelManager(evaluationSettings.getModelCache()) + : new ModelManager(); + var libraryManager = new LibraryManager( + modelManager, + evaluationSettings.getCqlOptions().getCqlCompilerOptions(), + evaluationSettings.getLibraryCache()); + libraryManager.getLibrarySourceLoader().clearProviders(); + for (var provider : sourceProviders) { + libraryManager.getLibrarySourceLoader().registerProvider(provider); + } + return libraryManager; + } + + protected void recursiveGather( + IDomainResource resource, + List gatheredResources, + List relatedArtifacts, + Repository repository, + List capability, + List include, + List artifactVersion, + List checkArtifactVersion, + List forceArtifactVersion) + throws PreconditionFailedException { + if (resource != null && !gatheredResources.contains(resource.getId())) { + gatheredResources.add(resource.getId()); + var fhirVersion = resource.getStructureFhirVersionEnum(); + var adapter = AdapterFactory.forFhirVersion(fhirVersion).createKnowledgeArtifactAdapter(resource); + findUnsupportedCapability(adapter, capability); + processCanonicals(adapter, artifactVersion, checkArtifactVersion, forceArtifactVersion); + var reference = adapter.hasVersion() + ? adapter.getUrl().concat(String.format("|%s", adapter.getVersion())) + : adapter.getUrl(); + boolean addArtifact = relatedArtifacts.stream() + .noneMatch(ra -> KnowledgeArtifactAdapter.getRelatedArtifactReference(ra) + .equals(reference)); + if (addArtifact) { + relatedArtifacts.add(KnowledgeArtifactAdapter.newRelatedArtifact( + fhirVersion, "depends-on", reference, adapter.getDescriptor())); + } + + adapter.combineComponentsAndDependencies().stream() + // sometimes VS dependencies aren't FHIR resources + .filter(ra -> StringUtils.isNotBlank(ra.getReference()) + && StringUtils.isNotBlank(Canonicals.getResourceType(ra.getReference()))) + .filter(ra -> { + try { + var resourceDef = repository + .fhirContext() + .getResourceDefinition(Canonicals.getResourceType(ra.getReference())); + return resourceDef != null; + } catch (DataFormatException e) { + if (e.getMessage().contains("1684")) { + return false; + } else { + throw new DataFormatException(e.getMessage()); + } + } + }) + .map(ra -> SearchHelper.searchRepositoryByCanonicalWithPaging(repository, ra.getReference())) + .map(searchBundle -> (IDomainResource) BundleHelper.getEntryResourceFirstRep(searchBundle)) + .forEach(component -> recursiveGather( + component, + gatheredResources, + relatedArtifacts, + repository, + capability, + include, + artifactVersion, + checkArtifactVersion, + forceArtifactVersion)); + } + } +} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessorTests.java index 0f4d214b6..9b8f422b7 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/ActivityDefinitionProcessorTests.java @@ -37,7 +37,7 @@ class ActivityDefinitionProcessorTests { private Repository createRepository(FhirContext fhirContext, String version) { return new IgRepository( fhirContext, - Paths.get(getResourcePath(this.getClass()) + "/org/opencds/cqf/fhir/cr/activitydefinition/" + version)); + Paths.get(getResourcePath(this.getClass()) + "/org/opencds/cqf/fhir/cr/shared/" + version)); } private ActivityDefinitionProcessor createProcessor(Repository repository) { @@ -143,7 +143,6 @@ void dynamicValueWithNestedPathR4() { } @Test - // @Disabled // Unable to load R5 packages and run CQL void activityDefinitionApplyR5() throws FHIRException { var result = this.activityDefinitionProcessorR5.apply( Eithers.forMiddle3(Ids.newId( diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/RequestResourceResolver.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/RequestResourceResolver.java index 2965d7644..d7331da9b 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/RequestResourceResolver.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/RequestResourceResolver.java @@ -13,10 +13,11 @@ import org.opencds.cqf.fhir.cr.activitydefinition.apply.BaseRequestResourceResolver; import org.opencds.cqf.fhir.cr.activitydefinition.apply.IRequestResolverFactory; import org.opencds.cqf.fhir.utility.Ids; +import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache; import org.opencds.cqf.fhir.utility.repository.ig.IgRepository; public class RequestResourceResolver { - public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/activitydefinition"; + public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/shared"; public static class Given { private IRequestResolverFactory resolverFactory; @@ -106,10 +107,11 @@ public IBaseResource resolve() { null, null, null, - null, + true, null, new LibraryEngine(repository, EvaluationSettings.getDefault()), - null)); + FhirModelResolverCache.resolverForVersion( + repository.fhirContext().getVersion().getVersion()))); } } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/RequestResourceResolverTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/RequestResourceResolverTests.java index 1cad6bd01..8272396d2 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/RequestResourceResolverTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/RequestResourceResolverTests.java @@ -35,8 +35,18 @@ class RequestResourceResolverTests { private final IIdType encounterId = Ids.newId(Encounter.class, "encounter123"); private final IIdType organizationId = Ids.newId(Organization.class, "org123"); - @SuppressWarnings("unchecked") private R testResolver(String testId, Class expectedClass) { + return testResolver(testId, expectedClass, subjectId, practitionerId, encounterId, organizationId); + } + + @SuppressWarnings("unchecked") + private R testResolver( + String testId, + Class expectedClass, + IIdType subjectId, + IIdType practitionerId, + IIdType encounterId, + IIdType organizationId) { var result = new Given() .repositoryFor(fhirContext, "dstu3") .activityDefinition(testId) @@ -85,6 +95,8 @@ void procedureResolver() { @Test void referralRequestResolver() { testResolver("referralrequest-test", ReferralRequest.class); + testResolver("referralrequest-test", ReferralRequest.class, subjectId, null, encounterId, organizationId); + testResolver("referralrequest-test", ReferralRequest.class, subjectId, null, encounterId, null); } @Test diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessorTests.java index 3f951cef5..7aeda6d57 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/common/DynamicValueProcessorTests.java @@ -15,6 +15,7 @@ import org.mockito.Mock; import org.mockito.Spy; import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.helpers.RequestHelpers; import org.opencds.cqf.fhir.cr.inputparameters.IInputParameterResolver; @@ -26,6 +27,9 @@ class DynamicValueProcessorTests { @Mock private LibraryEngine libraryEngine; + @Mock + private ModelResolver modelResolver; + @Mock private IInputParameterResolver inputParameterResolver; @@ -35,16 +39,16 @@ class DynamicValueProcessorTests { @Test void unsupportedFhirVersion() { - var request = - RequestHelpers.newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, inputParameterResolver); + var request = RequestHelpers.newPDApplyRequestForVersion( + FhirVersionEnum.R4B, libraryEngine, modelResolver, inputParameterResolver); assertNull(fixture.getDynamicValueExpression(request, null)); } @Test void testNullExpressionResult() { var cqfExpression = new CqfExpression().setExpression("NullTest"); - var request = - RequestHelpers.newPDApplyRequestForVersion(FhirVersionEnum.R4, libraryEngine, inputParameterResolver); + var request = RequestHelpers.newPDApplyRequestForVersion( + FhirVersionEnum.R4, libraryEngine, null, inputParameterResolver); var dynamicValue = new org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent() .setPath("action.extension") .setExpression(new org.hl7.fhir.r4.model.Expression() @@ -70,7 +74,7 @@ void dstu3PriorityExt() { // works in dstu3, throws in other versions var cqfExpression = new CqfExpression(); var requestDstu3 = RequestHelpers.newPDApplyRequestForVersion( - FhirVersionEnum.DSTU3, libraryEngine, inputParameterResolver); + FhirVersionEnum.DSTU3, libraryEngine, null, inputParameterResolver); var dvDstu3 = new org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent() .setPath("action.extension") .setExpression("priority") @@ -84,8 +88,8 @@ void dstu3PriorityExt() { fixture.resolveDynamicValue(requestDstu3, dvDstu3, null, null, raDstu3); - var requestR4 = - RequestHelpers.newPDApplyRequestForVersion(FhirVersionEnum.R4, libraryEngine, inputParameterResolver); + var requestR4 = RequestHelpers.newPDApplyRequestForVersion( + FhirVersionEnum.R4, libraryEngine, null, inputParameterResolver); var dvR4 = new org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionDynamicValueComponent() .setPath("action.extension") .setExpression(new org.hl7.fhir.r4.model.Expression() diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/helpers/DataRequirementsLibrary.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/helpers/DataRequirementsLibrary.java new file mode 100644 index 000000000..5653e290c --- /dev/null +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/helpers/DataRequirementsLibrary.java @@ -0,0 +1,26 @@ +package org.opencds.cqf.fhir.cr.helpers; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.opencds.cqf.fhir.utility.adapter.AdapterFactory; +import org.opencds.cqf.fhir.utility.adapter.LibraryAdapter; + +public class DataRequirementsLibrary { + final IBaseResource library; + final LibraryAdapter libraryAdapter; + + public DataRequirementsLibrary(IBaseResource library) { + this.library = library; + libraryAdapter = (LibraryAdapter) AdapterFactory.createAdapterForResource(library); + } + + public DataRequirementsLibrary hasDataRequirements(int count) { + assertEquals(count, libraryAdapter.getDataRequirement().size()); + return this; + } + + public IBaseResource getLibrary() { + return library; + } +} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/helpers/RequestHelpers.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/helpers/RequestHelpers.java index 5c760e623..26ff68c27 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/helpers/RequestHelpers.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/helpers/RequestHelpers.java @@ -10,6 +10,7 @@ import org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyRequest; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateRequest; import org.opencds.cqf.fhir.cr.questionnaire.populate.PopulateRequest; +import org.opencds.cqf.fhir.cr.questionnaireresponse.extract.ExtractRequest; import org.opencds.cqf.fhir.utility.Ids; import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache; @@ -23,8 +24,20 @@ public class RequestHelpers { public static final String PROFILE_ID = "profileId"; public static final String PROFILE_URL = "http://test.fhir.org/fhir/StructureDefinition/"; + public static ApplyRequest newPDApplyRequestForVersion(FhirVersionEnum fhirVersion, LibraryEngine libraryEngine) { + return newPDApplyRequestForVersion(fhirVersion, libraryEngine, null, null); + } + + public static ApplyRequest newPDApplyRequestForVersion( + FhirVersionEnum fhirVersion, LibraryEngine libraryEngine, ModelResolver modelResolver) { + return newPDApplyRequestForVersion(fhirVersion, libraryEngine, modelResolver, null); + } + public static ApplyRequest newPDApplyRequestForVersion( - FhirVersionEnum fhirVersion, LibraryEngine libraryEngine, IInputParameterResolver inputParameterResolver) { + FhirVersionEnum fhirVersion, + LibraryEngine libraryEngine, + ModelResolver modelResolver, + IInputParameterResolver inputParameterResolver) { var fhirContext = FhirContext.forCached(fhirVersion); IBaseResource planDefinition = null; try { @@ -35,17 +48,20 @@ public static ApplyRequest newPDApplyRequestForVersion( } catch (Exception e) { // TODO: handle exception } - return newPDApplyRequestForVersion(fhirVersion, planDefinition, libraryEngine, inputParameterResolver); + return newPDApplyRequestForVersion( + fhirVersion, planDefinition, libraryEngine, modelResolver, inputParameterResolver); } public static ApplyRequest newPDApplyRequestForVersion( FhirVersionEnum fhirVersion, IBaseResource planDefinition, LibraryEngine libraryEngine, + ModelResolver modelResolver, IInputParameterResolver inputParameterResolver) { - ModelResolver modelResolver = null; try { - modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); + if (modelResolver == null) { + modelResolver = FhirModelResolverCache.resolverForVersion(fhirVersion); + } var planDefinitionUrl = modelResolver.resolvePath(planDefinition, "url"); if (planDefinitionUrl == null) { var url = PLANDEFINITION_URL + planDefinition.getIdElement().getIdPart(); @@ -131,6 +147,7 @@ public static GenerateRequest newGenerateRequestForVersion( true, Ids.newId(fhirVersion, Ids.ensureIdType(PATIENT_ID, "Patient")), null, + true, null, libraryEngine, FhirModelResolverCache.resolverForVersion(fhirVersion)); @@ -138,16 +155,25 @@ public static GenerateRequest newGenerateRequestForVersion( public static PopulateRequest newPopulateRequestForVersion( FhirVersionEnum fhirVersion, LibraryEngine libraryEngine, IBaseResource questionnaire) { - return newPopulateRequestForVersion(fhirVersion, libraryEngine, questionnaire, "populate"); + return new PopulateRequest( + questionnaire, + Ids.newId(fhirVersion, Ids.ensureIdType(PATIENT_ID, "Patient")), + null, + null, + null, + null, + true, + libraryEngine, + FhirModelResolverCache.resolverForVersion(fhirVersion)); } - public static PopulateRequest newPopulateRequestForVersion( + public static ExtractRequest newExtractRequestForVersion( FhirVersionEnum fhirVersion, LibraryEngine libraryEngine, - IBaseResource questionnaire, - String operationName) { - return new PopulateRequest( - operationName, + IBaseResource questionnaireResponse, + IBaseResource questionnaire) { + return new ExtractRequest( + questionnaireResponse, questionnaire, Ids.newId(fhirVersion, Ids.ensureIdType(PATIENT_ID, "Patient")), null, diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/inputparameters/InputParametersTest.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/inputparameters/InputParametersTest.java new file mode 100644 index 000000000..a9384615d --- /dev/null +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/inputparameters/InputParametersTest.java @@ -0,0 +1,687 @@ +package org.opencds.cqf.fhir.cr.inputparameters; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.Mockito.doReturn; +import static org.opencds.cqf.fhir.utility.Parameters.newPart; +import static org.opencds.cqf.fhir.utility.Parameters.newStringPart; + +import ca.uhn.fhir.context.FhirContext; +import java.util.Arrays; +import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.Ids; + +@ExtendWith(MockitoExtension.class) +class InputParametersTest { + private final FhirContext fhirContextDstu3 = FhirContext.forDstu3Cached(); + private final FhirContext fhirContextR4 = FhirContext.forR4Cached(); + private final FhirContext fhirContextR5 = FhirContext.forR5Cached(); + private final String patientId = "patient1"; + private final String practitionerId = "practitioner1"; + private final String encounterId = "encounter1"; + private final String locationId = "location1"; + private final String studyId = "study1"; + + @Mock + Repository repository; + + @Test + void testResolveParametersDstu3() { + var patient = new org.hl7.fhir.dstu3.model.Patient(); + patient.setIdElement(Ids.newId(fhirContextDstu3, "Patient", patientId)); + var practitioner = new org.hl7.fhir.dstu3.model.Practitioner(); + practitioner.setIdElement(Ids.newId(fhirContextDstu3, "Practitioner", practitionerId)); + doReturn(fhirContextDstu3).when(repository).fhirContext(); + doReturn(patient).when(repository).read(org.hl7.fhir.dstu3.model.Patient.class, patient.getIdElement()); + doReturn(practitioner) + .when(repository) + .read(org.hl7.fhir.dstu3.model.Practitioner.class, practitioner.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + patient.getIdElement(), + Ids.newId(fhirContextDstu3, "Encounter", encounterId), + practitioner.getIdElement(), + null, + true, + null, + // SDC Launch Context is not supported in Dstu3 + null, + null); + var actual = (org.hl7.fhir.dstu3.model.Parameters) resolver.getParameters(); + assertNotNull(actual); + assertEquals(2, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(patient, actual.getParameter().get(0).getResource()); + assertEquals("%practitioner", actual.getParameter().get(1).getName()); + assertEquals(practitioner, actual.getParameter().get(1).getResource()); + } + + @Test + void testResolveParametersR4() { + var patient = new org.hl7.fhir.r4.model.Patient(); + patient.setIdElement(Ids.newId(fhirContextR4, "Patient", patientId)); + var encounter = new org.hl7.fhir.r4.model.Encounter(); + encounter.setIdElement(Ids.newId(fhirContextR4, "Encounter", encounterId)); + var location = new org.hl7.fhir.r4.model.Location(); + location.setIdElement(Ids.newId(fhirContextR4, locationId)); + var practitioner = new org.hl7.fhir.r4.model.Practitioner(); + practitioner.setIdElement(Ids.newId(fhirContextR4, "Practitioner", practitionerId)); + var study = new org.hl7.fhir.r4.model.ResearchStudy(); + study.setIdElement(Ids.newId(fhirContextR4, "ResearchStudy", studyId)); + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(patient).when(repository).read(org.hl7.fhir.r4.model.Patient.class, patient.getIdElement()); + doReturn(encounter).when(repository).read(org.hl7.fhir.r4.model.Encounter.class, encounter.getIdElement()); + doReturn(location).when(repository).read(org.hl7.fhir.r4.model.Location.class, location.getIdElement()); + doReturn(practitioner) + .when(repository) + .read(org.hl7.fhir.r4.model.Practitioner.class, practitioner.getIdElement()); + doReturn(study).when(repository).read(org.hl7.fhir.r4.model.ResearchStudy.class, study.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + patient.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList( + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "patient"), + newPart(fhirContextR4, "Reference", "content", patient.getId())), + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "encounter"), + newPart(fhirContextR4, "Reference", "content", encounter.getId())), + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "location"), + newPart(fhirContextR4, "Reference", "content", location.getId())), + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "user"), + newPart(fhirContextR4, "Reference", "content", practitioner.getId())), + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "study"), + newPart(fhirContextR4, "Reference", "content", study.getId()))), + Arrays.asList( + (IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("patient")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Patient")))), + (IBaseExtension) new org.hl7.fhir.r4.model.Extension( + Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("encounter")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Encounter")))), + (IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("location")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Location")))), + (IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("user")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Practitioner")))), + (IBaseExtension) new org.hl7.fhir.r4.model.Extension( + Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("study")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("ResearchStudy")))))); + var actual = (org.hl7.fhir.r4.model.Parameters) resolver.getParameters(); + assertNotNull(actual); + assertEquals(11, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(patient, actual.getParameter().get(0).getResource()); + assertEquals("%patient", actual.getParameter().get(1).getName()); + assertEquals(patient, actual.getParameter().get(1).getResource()); + assertEquals("Patient", actual.getParameter().get(2).getName()); + assertEquals(patient, actual.getParameter().get(2).getResource()); + assertEquals("%encounter", actual.getParameter().get(3).getName()); + assertEquals(encounter, actual.getParameter().get(3).getResource()); + assertEquals("Encounter", actual.getParameter().get(4).getName()); + assertEquals(encounter, actual.getParameter().get(4).getResource()); + assertEquals("%location", actual.getParameter().get(5).getName()); + assertEquals(location, actual.getParameter().get(5).getResource()); + assertEquals("Location", actual.getParameter().get(6).getName()); + assertEquals(location, actual.getParameter().get(6).getResource()); + assertEquals("%user", actual.getParameter().get(7).getName()); + assertEquals(practitioner, actual.getParameter().get(7).getResource()); + assertEquals("User", actual.getParameter().get(8).getName()); + assertEquals(practitioner, actual.getParameter().get(8).getResource()); + assertEquals("%study", actual.getParameter().get(9).getName()); + assertEquals(study, actual.getParameter().get(9).getResource()); + assertEquals("Study", actual.getParameter().get(10).getName()); + assertEquals(study, actual.getParameter().get(10).getResource()); + } + + @Test + void testUserLaunchContextAsPatientR4() { + var user = new org.hl7.fhir.r4.model.Patient(); + user.setIdElement(Ids.newId(fhirContextR4, "Patient", patientId)); + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r4.model.Patient.class, user.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "user"), + newPart(fhirContextR4, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("user")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Patient")))))); + var actual = (org.hl7.fhir.r4.model.Parameters) resolver.getParameters(); + assertEquals(3, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(user, actual.getParameter().get(0).getResource()); + assertEquals("%user", actual.getParameter().get(1).getName()); + assertEquals(user, actual.getParameter().get(1).getResource()); + assertEquals("User", actual.getParameter().get(2).getName()); + assertEquals(user, actual.getParameter().get(2).getResource()); + } + + @Test + void testUserLaunchContextAsPractitionerRoleR4() { + var user = new org.hl7.fhir.r4.model.PractitionerRole(); + user.setIdElement(Ids.newId(fhirContextR4, "PractitionerRole", practitionerId)); + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r4.model.PractitionerRole.class, user.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "user"), + newPart(fhirContextR4, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("user")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("PractitionerRole")))))); + var actual = (org.hl7.fhir.r4.model.Parameters) resolver.getParameters(); + assertEquals(3, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(user, actual.getParameter().get(0).getResource()); + assertEquals("%user", actual.getParameter().get(1).getName()); + assertEquals(user, actual.getParameter().get(1).getResource()); + assertEquals("User", actual.getParameter().get(2).getName()); + assertEquals(user, actual.getParameter().get(2).getResource()); + } + + @Test + void testUserLaunchContextAsRelatedPersonR4() { + var user = new org.hl7.fhir.r4.model.RelatedPerson(); + user.setIdElement(Ids.newId(fhirContextR4, "RelatedPerson", practitionerId)); + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r4.model.RelatedPerson.class, user.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "user"), + newPart(fhirContextR4, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("user")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("RelatedPerson")))))); + var actual = (org.hl7.fhir.r4.model.Parameters) resolver.getParameters(); + assertEquals(3, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(user, actual.getParameter().get(0).getResource()); + assertEquals("%user", actual.getParameter().get(1).getName()); + assertEquals(user, actual.getParameter().get(1).getResource()); + assertEquals("User", actual.getParameter().get(2).getName()); + assertEquals(user, actual.getParameter().get(2).getResource()); + } + + @Test + void testUnsupportedLaunchContextR4() { + var user = new org.hl7.fhir.r4.model.Patient(); + user.setIdElement(Ids.newId(fhirContextR4, "Patient", patientId)); + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r4.model.Patient.class, user.getIdElement()); + assertThrows( + IllegalArgumentException.class, + () -> IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "user"), + newPart(fhirContextR4, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("user")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Observation"))))))); + } + + @Test + void testMissingLaunchContextContentR4() { + var user = new org.hl7.fhir.r4.model.Patient(); + user.setIdElement(Ids.newId(fhirContextR4, "Patient", patientId)); + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r4.model.Patient.class, user.getIdElement()); + assertThrows( + IllegalArgumentException.class, + () -> IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + null, + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r4.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("user")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Patient"))))))); + } + + @Test + void testMissingLaunchContextResourceR4() { + var patient = new org.hl7.fhir.r4.model.Patient(); + patient.setIdElement(Ids.newId(fhirContextR4, "Patient", patientId)); + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(patient).when(repository).read(org.hl7.fhir.r4.model.Patient.class, patient.getIdElement()); + assertThrows( + IllegalArgumentException.class, + () -> IInputParameterResolver.createResolver( + repository, + patient.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "user"), + newPart(fhirContextR4, "Reference", "content", practitionerId))), + Arrays.asList((IBaseExtension) new org.hl7.fhir.r4.model.Extension( + Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r4.model.Extension( + "name", new org.hl7.fhir.r4.model.Coding().setCode("user")), + new org.hl7.fhir.r4.model.Extension( + "type", new org.hl7.fhir.r4.model.CodeType("Practitioner"))))))); + } + + @Test + void testResolveParametersR5() { + var patient = new org.hl7.fhir.r5.model.Patient(); + patient.setIdElement(Ids.newId(fhirContextR5, "Patient", patientId)); + var encounter = new org.hl7.fhir.r5.model.Encounter(); + encounter.setIdElement(Ids.newId(fhirContextR5, "Encounter", encounterId)); + var location = new org.hl7.fhir.r5.model.Location(); + location.setIdElement(Ids.newId(fhirContextR5, locationId)); + var practitioner = new org.hl7.fhir.r5.model.Practitioner(); + practitioner.setIdElement(Ids.newId(fhirContextR5, "Practitioner", practitionerId)); + var study = new org.hl7.fhir.r5.model.ResearchStudy(); + study.setIdElement(Ids.newId(fhirContextR5, "ResearchStudy", studyId)); + doReturn(fhirContextR5).when(repository).fhirContext(); + doReturn(patient).when(repository).read(org.hl7.fhir.r5.model.Patient.class, patient.getIdElement()); + doReturn(encounter).when(repository).read(org.hl7.fhir.r5.model.Encounter.class, encounter.getIdElement()); + doReturn(location).when(repository).read(org.hl7.fhir.r5.model.Location.class, location.getIdElement()); + doReturn(practitioner) + .when(repository) + .read(org.hl7.fhir.r5.model.Practitioner.class, practitioner.getIdElement()); + doReturn(study).when(repository).read(org.hl7.fhir.r5.model.ResearchStudy.class, study.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + patient.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList( + newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "patient"), + newPart(fhirContextR5, "Reference", "content", patient.getId())), + newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "encounter"), + newPart(fhirContextR5, "Reference", "content", encounter.getId())), + newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "location"), + newPart(fhirContextR5, "Reference", "content", location.getId())), + newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "user"), + newPart(fhirContextR5, "Reference", "content", practitioner.getId())), + newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "study"), + newPart(fhirContextR5, "Reference", "content", study.getId()))), + Arrays.asList( + (IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("patient")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Patient")))), + (IBaseExtension) new org.hl7.fhir.r5.model.Extension( + Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("encounter")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Encounter")))), + (IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("location")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Location")))), + (IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("user")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Practitioner")))), + (IBaseExtension) new org.hl7.fhir.r5.model.Extension( + Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("study")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("ResearchStudy")))))); + var actual = (org.hl7.fhir.r5.model.Parameters) resolver.getParameters(); + assertNotNull(actual); + assertEquals(11, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(patient, actual.getParameter().get(0).getResource()); + assertEquals("%patient", actual.getParameter().get(1).getName()); + assertEquals(patient, actual.getParameter().get(1).getResource()); + assertEquals("Patient", actual.getParameter().get(2).getName()); + assertEquals(patient, actual.getParameter().get(2).getResource()); + assertEquals("%encounter", actual.getParameter().get(3).getName()); + assertEquals(encounter, actual.getParameter().get(3).getResource()); + assertEquals("Encounter", actual.getParameter().get(4).getName()); + assertEquals(encounter, actual.getParameter().get(4).getResource()); + assertEquals("%location", actual.getParameter().get(5).getName()); + assertEquals(location, actual.getParameter().get(5).getResource()); + assertEquals("Location", actual.getParameter().get(6).getName()); + assertEquals(location, actual.getParameter().get(6).getResource()); + assertEquals("%user", actual.getParameter().get(7).getName()); + assertEquals(practitioner, actual.getParameter().get(7).getResource()); + assertEquals("User", actual.getParameter().get(8).getName()); + assertEquals(practitioner, actual.getParameter().get(8).getResource()); + assertEquals("%study", actual.getParameter().get(9).getName()); + assertEquals(study, actual.getParameter().get(9).getResource()); + assertEquals("Study", actual.getParameter().get(10).getName()); + assertEquals(study, actual.getParameter().get(10).getResource()); + } + + @Test + void testUserLaunchContextAsPatientR5() { + var user = new org.hl7.fhir.r5.model.Patient(); + user.setIdElement(Ids.newId(fhirContextR5, "Patient", patientId)); + doReturn(fhirContextR5).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r5.model.Patient.class, user.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "user"), + newPart(fhirContextR5, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("user")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Patient")))))); + var actual = (org.hl7.fhir.r5.model.Parameters) resolver.getParameters(); + assertEquals(3, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(user, actual.getParameter().get(0).getResource()); + assertEquals("%user", actual.getParameter().get(1).getName()); + assertEquals(user, actual.getParameter().get(1).getResource()); + assertEquals("User", actual.getParameter().get(2).getName()); + assertEquals(user, actual.getParameter().get(2).getResource()); + } + + @Test + void testUserLaunchContextAsPractitionerRoleR5() { + var user = new org.hl7.fhir.r5.model.PractitionerRole(); + user.setIdElement(Ids.newId(fhirContextR5, "PractitionerRole", practitionerId)); + doReturn(fhirContextR5).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r5.model.PractitionerRole.class, user.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "user"), + newPart(fhirContextR5, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("user")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("PractitionerRole")))))); + var actual = (org.hl7.fhir.r5.model.Parameters) resolver.getParameters(); + assertEquals(3, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(user, actual.getParameter().get(0).getResource()); + assertEquals("%user", actual.getParameter().get(1).getName()); + assertEquals(user, actual.getParameter().get(1).getResource()); + assertEquals("User", actual.getParameter().get(2).getName()); + assertEquals(user, actual.getParameter().get(2).getResource()); + } + + @Test + void testUserLaunchContextAsRelatedPersonR5() { + var user = new org.hl7.fhir.r5.model.RelatedPerson(); + user.setIdElement(Ids.newId(fhirContextR5, "RelatedPerson", practitionerId)); + doReturn(fhirContextR5).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r5.model.RelatedPerson.class, user.getIdElement()); + var resolver = IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "user"), + newPart(fhirContextR5, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("user")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("RelatedPerson")))))); + var actual = (org.hl7.fhir.r5.model.Parameters) resolver.getParameters(); + assertEquals(3, actual.getParameter().size()); + assertEquals("%subject", actual.getParameter().get(0).getName()); + assertEquals(user, actual.getParameter().get(0).getResource()); + assertEquals("%user", actual.getParameter().get(1).getName()); + assertEquals(user, actual.getParameter().get(1).getResource()); + assertEquals("User", actual.getParameter().get(2).getName()); + assertEquals(user, actual.getParameter().get(2).getResource()); + } + + @Test + void testUnsupportedLaunchContextR5() { + var user = new org.hl7.fhir.r5.model.Patient(); + user.setIdElement(Ids.newId(fhirContextR5, "Patient", patientId)); + doReturn(fhirContextR5).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r5.model.Patient.class, user.getIdElement()); + assertThrows( + IllegalArgumentException.class, + () -> IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "user"), + newPart(fhirContextR5, "Reference", "content", user.getId()))), + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("user")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Observation"))))))); + } + + @Test + void testMissingLaunchContextContentR5() { + var user = new org.hl7.fhir.r5.model.Patient(); + user.setIdElement(Ids.newId(fhirContextR5, "Patient", patientId)); + doReturn(fhirContextR5).when(repository).fhirContext(); + doReturn(user).when(repository).read(org.hl7.fhir.r5.model.Patient.class, user.getIdElement()); + assertThrows( + IllegalArgumentException.class, + () -> IInputParameterResolver.createResolver( + repository, + user.getIdElement(), + null, + null, + null, + true, + null, + null, + Arrays.asList((IBaseExtension) + new org.hl7.fhir.r5.model.Extension(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("user")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Patient"))))))); + } + + @Test + void testMissingLaunchContextResourceR5() { + var patient = new org.hl7.fhir.r5.model.Patient(); + patient.setIdElement(Ids.newId(fhirContextR5, "Patient", patientId)); + doReturn(fhirContextR5).when(repository).fhirContext(); + doReturn(patient).when(repository).read(org.hl7.fhir.r5.model.Patient.class, patient.getIdElement()); + assertThrows( + IllegalArgumentException.class, + () -> IInputParameterResolver.createResolver( + repository, + patient.getIdElement(), + null, + null, + null, + true, + null, + Arrays.asList(newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "user"), + newPart(fhirContextR5, "Reference", "content", practitionerId))), + Arrays.asList((IBaseExtension) new org.hl7.fhir.r5.model.Extension( + Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT) + .setExtension(Arrays.asList( + new org.hl7.fhir.r5.model.Extension( + "name", new org.hl7.fhir.r5.model.Coding().setCode("user")), + new org.hl7.fhir.r5.model.Extension( + "type", new org.hl7.fhir.r5.model.CodeType("Practitioner"))))))); + } +} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/LibraryProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/LibraryProcessorTests.java index 550a7f4b5..e4570cf9d 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/LibraryProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/LibraryProcessorTests.java @@ -9,12 +9,14 @@ import java.nio.file.Paths; import org.junit.jupiter.api.Test; import org.opencds.cqf.fhir.cql.EvaluationSettings; +import org.opencds.cqf.fhir.cr.common.DataRequirementsProcessor; import org.opencds.cqf.fhir.cr.common.PackageProcessor; +import org.opencds.cqf.fhir.cr.library.evaluate.EvaluateProcessor; import org.opencds.cqf.fhir.utility.Ids; import org.opencds.cqf.fhir.utility.monad.Eithers; import org.opencds.cqf.fhir.utility.repository.ig.IgRepository; -public class LibraryProcessorTests { +class LibraryProcessorTests { private final FhirContext fhirContextDstu3 = FhirContext.forDstu3Cached(); private final FhirContext fhirContextR4 = FhirContext.forR4Cached(); private final FhirContext fhirContextR5 = FhirContext.forR5Cached(); @@ -32,7 +34,14 @@ void processor() { var repository = new IgRepository(fhirContextR5, Paths.get(getResourcePath(this.getClass()) + "/" + CLASS_PATH + "/r5")); var packageProcessor = new PackageProcessor(repository); - var processor = new LibraryProcessor(repository, EvaluationSettings.getDefault(), packageProcessor); + var dataRequirementsProcessor = new DataRequirementsProcessor(repository); + var evaluateProcessor = new EvaluateProcessor(repository, EvaluationSettings.getDefault()); + var processor = new LibraryProcessor( + repository, + EvaluationSettings.getDefault(), + packageProcessor, + dataRequirementsProcessor, + evaluateProcessor); assertNotNull(processor.evaluationSettings()); var result = processor.resolveLibrary(Eithers.forMiddle3( Ids.newId(repository.fhirContext(), "Library", "OutpatientPriorAuthorizationPrepopulation"))); @@ -73,4 +82,71 @@ void packageR5() { .thenPackage() .hasEntry(2); } + + @Test + void dataRequirementsDstu3() { + given().repositoryFor(fhirContextDstu3, "dstu3") + .when() + .libraryId("OutpatientPriorAuthorizationPrepopulation") + .thenDataRequirements() + .hasDataRequirements(29); + } + + @Test + void dataRequirementsR4() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .libraryId("OutpatientPriorAuthorizationPrepopulation") + .thenDataRequirements() + .hasDataRequirements(30); + } + + @Test + void dataRequirementsR5() { + given().repositoryFor(fhirContextR5, "r5") + .when() + .libraryId("OutpatientPriorAuthorizationPrepopulation") + .thenDataRequirements() + .hasDataRequirements(30); + } + + @Test + void evaluateException() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .libraryId("BadLibrary") + .subjectId("OPA-Patient1") + .thenEvaluate() + .hasOperationOutcome(); + } + + @Test + void evaluateDstu3() { + given().repositoryFor(fhirContextDstu3, "dstu3") + .when() + .libraryId("OutpatientPriorAuthorizationPrepopulation") + .subjectId("OPA-Patient1") + .thenEvaluate() + .hasResults(47); + } + + @Test + void evaluateR4() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .libraryId("OutpatientPriorAuthorizationPrepopulation") + .subjectId("OPA-Patient1") + .thenEvaluate() + .hasResults(50); + } + + @Test + void evaluateR5() { + given().repositoryFor(fhirContextR5, "r5") + .when() + .libraryId("OutpatientPriorAuthorizationPrepopulation") + .subjectId("OPA-Patient1") + .thenEvaluate() + .hasResults(48); + } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/TestLibrary.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/TestLibrary.java index 6ca348e8a..08e741667 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/TestLibrary.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/library/TestLibrary.java @@ -1,9 +1,12 @@ package org.opencds.cqf.fhir.cr.library; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.opencds.cqf.fhir.test.Resources.getResourcePath; import static org.opencds.cqf.fhir.utility.BundleHelper.addEntry; import static org.opencds.cqf.fhir.utility.BundleHelper.newBundle; import static org.opencds.cqf.fhir.utility.BundleHelper.newEntryWithResource; +import static org.opencds.cqf.fhir.utility.SearchHelper.readRepository; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; @@ -11,26 +14,31 @@ import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; +import java.util.List; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseOperationOutcome; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; +import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.EvaluationSettings; import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings.SEARCH_FILTER_MODE; import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings.TERMINOLOGY_FILTER_MODE; import org.opencds.cqf.fhir.cql.engine.terminology.TerminologySettings.VALUESET_EXPANSION_MODE; import org.opencds.cqf.fhir.cr.TestOperationProvider; +import org.opencds.cqf.fhir.cr.helpers.DataRequirementsLibrary; import org.opencds.cqf.fhir.cr.helpers.GeneratedPackage; import org.opencds.cqf.fhir.cr.plandefinition.PlanDefinition; import org.opencds.cqf.fhir.utility.Ids; +import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache; import org.opencds.cqf.fhir.utility.monad.Eithers; import org.opencds.cqf.fhir.utility.repository.InMemoryFhirRepository; import org.opencds.cqf.fhir.utility.repository.ig.IgRepository; public class TestLibrary { - // Borrowing resources from PlanDefinition - public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/plandefinition"; + public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/shared"; private static InputStream open(String asset) { return PlanDefinition.class.getResourceAsStream(asset); @@ -100,7 +108,8 @@ public static class When { private String libraryId; private String subjectId; - private Boolean useServerData; + private List expression; + private boolean useServerData; private Repository dataRepository; private Repository contentRepository; private Repository terminologyRepository; @@ -125,7 +134,12 @@ public When subjectId(String id) { return this; } - public When useServerData(Boolean value) { + public When expression(List value) { + expression = value; + return this; + } + + public When useServerData(boolean value) { useServerData = value; return this; } @@ -152,7 +166,7 @@ private void loadAdditionalData(IBaseResource resource) { var fhirVersion = repository.fhirContext().getVersion().getVersion(); additionalData = resource.getIdElement().getResourceType().equals("Bundle") ? (IBaseBundle) resource - : addEntry(newBundle(fhirVersion), newEntryWithResource(fhirVersion, resource)); + : addEntry(newBundle(fhirVersion), newEntryWithResource(resource)); } public When additionalData(String dataAssetName) { @@ -190,5 +204,63 @@ public GeneratedPackage thenPackage() { repository.fhirContext()); } } + + public DataRequirementsLibrary thenDataRequirements() { + return new DataRequirementsLibrary(processor.dataRequirements( + Eithers.forMiddle3(Ids.newId(repository.fhirContext(), "Library", libraryId)), parameters)); + } + + public Evaluation thenEvaluate() { + if (additionalDataId != null) { + loadAdditionalData(readRepository(repository, additionalDataId)); + } + return new Evaluation( + repository, + processor.evaluate( + Eithers.forMiddle3(Ids.newId(repository.fhirContext(), "Library", libraryId)), + subjectId, + expression, + parameters, + useServerData, + additionalData, + null, + dataRepository, + contentRepository, + terminologyRepository)); + } + } + + public static class Evaluation { + final Repository repository; + final IBaseParameters result; + final IParser jsonParser; + final ModelResolver modelResolver; + final List parameter; + + @SuppressWarnings("unchecked") + public Evaluation(Repository repository, IBaseParameters result) { + this.repository = repository; + this.result = result; + jsonParser = this.repository.fhirContext().newJsonParser().setPrettyPrint(true); + modelResolver = FhirModelResolverCache.resolverForVersion( + this.repository.fhirContext().getVersion().getVersion()); + parameter = ((List) modelResolver.resolvePath(result, "parameter")); + } + + public Evaluation hasResults(Integer count) { + assertEquals(count, parameter.size()); + return this; + } + + public Evaluation hasOperationOutcome() { + assertTrue(modelResolver.resolvePath(parameter.get(0), "resource") instanceof IBaseOperationOutcome); + return this; + } + + public Evaluation resultHasValue(Integer index, IBase value) { + var actual = parameter.get(index); + assertEquals(value, actual); + return this; + } } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinition.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinition.java index 1a1a0d20d..9c941c1e2 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinition.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinition.java @@ -1,6 +1,7 @@ package org.opencds.cqf.fhir.cr.plandefinition; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import static org.opencds.cqf.fhir.test.Resources.getResourcePath; @@ -14,15 +15,25 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBundle; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; import org.json.JSONException; import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.api.Repository; @@ -31,6 +42,7 @@ import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings.TERMINOLOGY_FILTER_MODE; import org.opencds.cqf.fhir.cql.engine.terminology.TerminologySettings.VALUESET_EXPANSION_MODE; import org.opencds.cqf.fhir.cr.TestOperationProvider; +import org.opencds.cqf.fhir.cr.helpers.DataRequirementsLibrary; import org.opencds.cqf.fhir.cr.helpers.GeneratedPackage; import org.opencds.cqf.fhir.utility.Ids; import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache; @@ -40,10 +52,16 @@ import org.skyscreamer.jsonassert.JSONAssert; public class PlanDefinition { - public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/plandefinition"; + public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/shared"; private static InputStream open(String asset) { - return PlanDefinition.class.getResourceAsStream(asset); + var path = Paths.get(getResourcePath(PlanDefinition.class) + "/" + CLASS_PATH + "/" + asset); + var file = path.toFile(); + try { + return new FileInputStream(file); + } catch (FileNotFoundException e) { + return null; + } } public static String load(InputStream asset) throws IOException { @@ -113,14 +131,14 @@ public static class When { private String encounterId; private String practitionerId; private String organizationId; - private Boolean useServerData; + private boolean useServerData; private Repository dataRepository; private Repository contentRepository; private Repository terminologyRepository; private IBaseBundle additionalData; private IIdType additionalDataId; private IBaseParameters parameters; - private Boolean isPackagePut; + private boolean isPackagePut; public When(Repository repository, PlanDefinitionProcessor processor) { this.repository = repository; @@ -153,7 +171,7 @@ public When organizationId(String id) { return this; } - public When useServerData(Boolean value) { + public When useServerData(boolean value) { useServerData = value; return this; } @@ -180,7 +198,7 @@ private void loadAdditionalData(IBaseResource resource) { var fhirVersion = repository.fhirContext().getVersion().getVersion(); additionalData = resource.getIdElement().getResourceType().equals("Bundle") ? (IBaseBundle) resource - : addEntry(newBundle(fhirVersion), newEntryWithResource(fhirVersion, resource)); + : addEntry(newBundle(fhirVersion), newEntryWithResource(resource)); } public When additionalData(String dataAssetName) { @@ -199,7 +217,7 @@ public When parameters(IBaseParameters params) { return this; } - public When isPut(Boolean value) { + public When isPut(boolean value) { isPackagePut = value; return this; } @@ -259,7 +277,7 @@ public GeneratedCarePlan thenApply() { } public GeneratedPackage thenPackage() { - if (isPackagePut == null) { + if (isPackagePut) { return new GeneratedPackage( processor.packagePlanDefinition(Eithers.forMiddle3( Ids.newId(repository.fhirContext(), "PlanDefinition", planDefinitionId))), @@ -273,6 +291,12 @@ public GeneratedPackage thenPackage() { repository.fhirContext()); } } + + public DataRequirementsLibrary thenDataRequirements() { + return new DataRequirementsLibrary(processor.dataRequirements( + Eithers.forMiddle3(Ids.newId(repository.fhirContext(), "PlanDefinition", planDefinitionId)), + parameters)); + } } public static class GeneratedBundle { @@ -280,6 +304,8 @@ public static class GeneratedBundle { final IBaseBundle generatedBundle; final IParser jsonParser; final ModelResolver modelResolver; + IBaseResource questionnaire; + Map items; public GeneratedBundle(Repository repository, IBaseBundle generatedBundle) { this.repository = repository; @@ -287,6 +313,40 @@ public GeneratedBundle(Repository repository, IBaseBundle generatedBundle) { jsonParser = this.repository.fhirContext().newJsonParser().setPrettyPrint(true); modelResolver = FhirModelResolverCache.resolverForVersion( this.repository.fhirContext().getVersion().getVersion()); + var questionnaireResponse = getEntryResources(this.generatedBundle).stream() + .filter(r -> r.fhirType().equals("QuestionnaireResponse")) + .findFirst() + .orElse(null); + questionnaire = questionnaireResponse == null + ? null + : ((IDomainResource) questionnaireResponse) + .getContained().stream() + .filter(c -> c.fhirType().equals("Questionnaire")) + .findFirst() + .orElse(null); + if (questionnaireResponse != null) { + items = new HashMap<>(); + populateItems(getItems(questionnaireResponse)); + } + } + + @SuppressWarnings("unchecked") + private List getItems(IBase base) { + var pathResult = modelResolver.resolvePath(base, "item"); + return pathResult instanceof List ? (List) pathResult : new ArrayList<>(); + } + + private void populateItems(List itemList) { + for (var item : itemList) { + @SuppressWarnings("unchecked") + var linkIdPath = (IPrimitiveType) modelResolver.resolvePath(item, "linkId"); + var linkId = linkIdPath == null ? null : linkIdPath.getValue(); + items.put(linkId, item); + var childItems = getItems(item); + if (!childItems.isEmpty()) { + populateItems(childItems); + } + } } public GeneratedBundle isEqualsTo(String expectedBundleAssetName) { @@ -326,8 +386,23 @@ public GeneratedBundle hasCommunicationRequestPayload() { } public GeneratedBundle hasQuestionnaire() { - assertTrue(getEntryResources(generatedBundle).stream() - .anyMatch(r -> r.fhirType().equals("Questionnaire"))); + assertNotNull(questionnaire); + return this; + } + + @SuppressWarnings("unchecked") + public GeneratedBundle hasQuestionnaireResponseItemValue(String linkId, String value) { + var answerPath = modelResolver.resolvePath(items.get(linkId), "answer"); + var answers = answerPath instanceof List + ? ((List) answerPath) + .stream() + .map(a -> (IPrimitiveType) modelResolver.resolvePath(a, "value")) + .collect(Collectors.toList()) + : null; + assertNotNull(answers); + assertTrue( + answers.stream().anyMatch(a -> a.getValue().equals(value)), + "expected answer to contain value: " + value); return this; } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessorTests.java index b19b7028c..107842c96 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/PlanDefinitionProcessorTests.java @@ -13,6 +13,7 @@ import org.junit.jupiter.api.Test; import org.opencds.cqf.fhir.cql.EvaluationSettings; import org.opencds.cqf.fhir.cr.activitydefinition.apply.IRequestResolverFactory; +import org.opencds.cqf.fhir.cr.common.DataRequirementsProcessor; import org.opencds.cqf.fhir.cr.common.PackageProcessor; import org.opencds.cqf.fhir.cr.plandefinition.apply.ApplyProcessor; import org.opencds.cqf.fhir.utility.BundleHelper; @@ -42,12 +43,14 @@ void processor() { var activityProcessor = new org.opencds.cqf.fhir.cr.activitydefinition.apply.ApplyProcessor( repository, IRequestResolverFactory.getDefault(FhirVersionEnum.R5)); var packageProcessor = new PackageProcessor(repository); + var dataRequirementsProcessor = new DataRequirementsProcessor(repository); var requestResolverFactory = IRequestResolverFactory.getDefault(FhirVersionEnum.R5); var processor = new PlanDefinitionProcessor( repository, EvaluationSettings.getDefault(), new ApplyProcessor(repository, modelResolver, activityProcessor), packageProcessor, + dataRequirementsProcessor, activityProcessor, requestResolverFactory); assertNotNull(processor.evaluationSettings()); @@ -340,6 +343,7 @@ void questionnaireResponseDstu3() { .when() .planDefinitionId(planDefinitionID) .subjectId(patientID) + .useServerData(false) .additionalData(data) .content(content) .parameters(parameters) @@ -365,7 +369,7 @@ void questionnaireResponseR4() { .additionalDataId(dataId) .parameters(parameters) .thenApply() - .hasContained(3); + .hasContained(2); given().repositoryFor(fhirContextR4, "r4") .when() .planDefinitionId(planDefinitionID) @@ -373,7 +377,7 @@ void questionnaireResponseR4() { .additionalDataId(dataId) .parameters(parameters) .thenApplyR5() - .hasEntry(3); + .hasEntry(2); } @Test @@ -395,7 +399,7 @@ void questionnaireResponseR5() { .content(content) .parameters(parameters) .thenApplyR5() - .hasEntry(3); + .hasEntry(2); } @Test @@ -410,7 +414,7 @@ void generateQuestionnaireDstu3() { .subjectId(patientID) .parameters(parameters) .thenApply() - .hasContained(3) + .hasContained(4) .hasQuestionnaire(); } @@ -427,7 +431,13 @@ void generateQuestionnaireR4() { .parameters(parameters) .thenApplyR5() .hasEntry(3) - .hasQuestionnaire(); + .hasQuestionnaire() + .hasQuestionnaireResponseItemValue("1.1", "Claim/OPA-Claim1") + .hasQuestionnaireResponseItemValue("2.1", "Acme Clinic") + .hasQuestionnaireResponseItemValue("2.2.2", "1407071236") + .hasQuestionnaireResponseItemValue("3.4.2", "12345") + .hasQuestionnaireResponseItemValue("4.1.2", "1245319599") + .hasQuestionnaireResponseItemValue("4.2.2", "456789"); } @Test @@ -523,4 +533,31 @@ void nestedDefinitionErrorShouldReturnOperationOutcome() { .hasEntry(2) .entryHasOperationOutcome(1); } + + @Test + void dataRequirementsDstu3() { + given().repositoryFor(fhirContextDstu3, "dstu3") + .when() + .planDefinitionId("route-one") + .thenDataRequirements() + .hasDataRequirements(29); + } + + @Test + void dataRequirementsR4() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .planDefinitionId("route-one") + .thenDataRequirements() + .hasDataRequirements(30); + } + + @Test + void dataRequirementsR5() { + given().repositoryFor(fhirContextR5, "r5") + .when() + .planDefinitionId("route-one") + .thenDataRequirements() + .hasDataRequirements(30); + } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequestTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequestTests.java index ba1e189e8..65d745bcf 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequestTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ApplyRequestTests.java @@ -9,6 +9,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.helpers.RequestHelpers; import org.opencds.cqf.fhir.cr.inputparameters.IInputParameterResolver; @@ -19,13 +20,16 @@ class ApplyRequestTests { @Mock private LibraryEngine libraryEngine; + @Mock + private ModelResolver modelResolver; + @Mock private IInputParameterResolver inputParameterResolver; @Test void invalidVersionReturnsNull() { - var request = - RequestHelpers.newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, inputParameterResolver); + var request = RequestHelpers.newPDApplyRequestForVersion( + FhirVersionEnum.R4B, libraryEngine, modelResolver, inputParameterResolver); var activityDef = new org.hl7.fhir.r4.model.ActivityDefinition(); assertNull(request.transformRequestParameters(activityDef)); } @@ -36,8 +40,8 @@ void transformRequestParametersDstu3() { .addParameter(org.opencds.cqf.fhir.utility.dstu3.Parameters.part("param", "true")); var bundle = new org.hl7.fhir.dstu3.model.Bundle(); var request = RequestHelpers.newPDApplyRequestForVersion( - FhirVersionEnum.DSTU3, libraryEngine, inputParameterResolver) - .setBundle(bundle); + FhirVersionEnum.DSTU3, libraryEngine, null, inputParameterResolver) + .setData(bundle); var activityDef = new org.hl7.fhir.dstu3.model.ActivityDefinition(); doReturn(params).when(inputParameterResolver).getParameters(); var result = request.transformRequestParameters(activityDef); @@ -50,8 +54,8 @@ void transformRequestParametersR4() { .addParameter(org.opencds.cqf.fhir.utility.r4.Parameters.part("param", "true")); var bundle = new org.hl7.fhir.r4.model.Bundle(); var request = RequestHelpers.newPDApplyRequestForVersion( - FhirVersionEnum.R4, libraryEngine, inputParameterResolver) - .setBundle(bundle); + FhirVersionEnum.R4, libraryEngine, null, inputParameterResolver) + .setData(bundle); var activityDef = new org.hl7.fhir.r4.model.ActivityDefinition(); doReturn(params).when(inputParameterResolver).getParameters(); var result = request.transformRequestParameters(activityDef); @@ -64,8 +68,8 @@ void transformRequestParametersR5() { .addParameter(org.opencds.cqf.fhir.utility.r5.Parameters.part("param", "true")); var bundle = new org.hl7.fhir.r5.model.Bundle(); var request = RequestHelpers.newPDApplyRequestForVersion( - FhirVersionEnum.R5, libraryEngine, inputParameterResolver) - .setBundle(bundle); + FhirVersionEnum.R5, libraryEngine, null, inputParameterResolver) + .setData(bundle); var activityDef = new org.hl7.fhir.r5.model.ActivityDefinition(); doReturn(params).when(inputParameterResolver).getParameters(); var result = request.transformRequestParameters(activityDef); diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessActionTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessActionTests.java index 5128b95fd..4229f33a6 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessActionTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessActionTests.java @@ -14,6 +14,7 @@ import org.mockito.Mock; import org.mockito.Spy; import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateProcessor; @@ -26,6 +27,9 @@ class ProcessActionTests { @Mock LibraryEngine libraryEngine; + @Mock + ModelResolver modelResolver; + @Mock ApplyProcessor applyProcessor; @@ -44,7 +48,7 @@ void setup() { @Test void unsupportedVersionShouldReturnNull() { doReturn(FhirContext.forR4BCached()).when(repository).fhirContext(); - var request = newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, null); + var request = newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, modelResolver); var action = new org.hl7.fhir.r4b.model.PlanDefinition.PlanDefinitionActionComponent(); var requestAction = fixture.generateRequestAction(request, action); assertNull(requestAction); diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessGoalTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessGoalTests.java index 3e94ac793..a50cead99 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessGoalTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessGoalTests.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.LibraryEngine; @@ -25,6 +26,9 @@ class ProcessGoalTests { @Mock LibraryEngine libraryEngine; + @Mock + ModelResolver modelResolver; + ProcessGoal fixture = new ProcessGoal(); @BeforeEach @@ -35,7 +39,7 @@ void setup() { @Test void unsupportedVersionShouldReturnNull() { doReturn(FhirContext.forR4BCached()).when(repository).fhirContext(); - var request = newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, null); + var request = newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, modelResolver); var goalElement = new org.hl7.fhir.r4b.model.PlanDefinition.PlanDefinitionGoalComponent(); var result = fixture.convertGoal(request, goalElement); assertNull(result); diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequestTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequestTests.java index ae42e7eb3..b84ed6757 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequestTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/plandefinition/apply/ProcessRequestTests.java @@ -12,8 +12,10 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.cr.questionnaire.populate.IPopulateProcessor; @ExtendWith(MockitoExtension.class) class ProcessRequestTests { @@ -23,7 +25,13 @@ class ProcessRequestTests { @Mock LibraryEngine libraryEngine; - ProcessRequest fixture = new ProcessRequest(); + @Mock + ModelResolver modelResolver; + + @Mock + IPopulateProcessor populateProcessor; + + ProcessRequest fixture = new ProcessRequest(populateProcessor); @BeforeEach void setup() { @@ -33,7 +41,7 @@ void setup() { @Test void unsupportedVersionShouldReturnNull() { doReturn(FhirContext.forR4BCached()).when(repository).fhirContext(); - var request = newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, null); + var request = newPDApplyRequestForVersion(FhirVersionEnum.R4B, libraryEngine, modelResolver); var requestOrchestration = fixture.generateRequestOrchestration(request); assertNull(requestOrchestration); var carePlan = fixture.generateCarePlan(request, requestOrchestration); diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessorTests.java index fba40aa8c..6197f5bb3 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/QuestionnaireProcessorTests.java @@ -5,17 +5,21 @@ import static org.opencds.cqf.fhir.cr.questionnaire.TestQuestionnaire.CLASS_PATH; import static org.opencds.cqf.fhir.cr.questionnaire.TestQuestionnaire.given; import static org.opencds.cqf.fhir.test.Resources.getResourcePath; -import static org.opencds.cqf.fhir.utility.r4.Parameters.parameters; -import static org.opencds.cqf.fhir.utility.r4.Parameters.stringPart; +import static org.opencds.cqf.fhir.utility.Parameters.newParameters; +import static org.opencds.cqf.fhir.utility.Parameters.newPart; +import static org.opencds.cqf.fhir.utility.Parameters.newStringPart; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import java.nio.file.Paths; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cr.common.PackageProcessor; import org.opencds.cqf.fhir.cr.questionnaire.generate.GenerateProcessor; import org.opencds.cqf.fhir.cr.questionnaire.populate.PopulateProcessor; +import org.opencds.cqf.fhir.cr.questionnaireresponse.TestQuestionnaireResponse; import org.opencds.cqf.fhir.utility.Ids; import org.opencds.cqf.fhir.utility.repository.ig.IgRepository; @@ -30,76 +34,6 @@ class QuestionnaireProcessorTests { private final Repository repositoryR5 = new IgRepository(fhirContextR5, Paths.get(getResourcePath(this.getClass()) + "/" + CLASS_PATH + "/r5")); - @Test - void prePopulateDstu3() { - given().repository(repositoryDstu3) - .when() - .questionnaireId(Ids.newId(fhirContextDstu3, "Questionnaire", "OutpatientPriorAuthorizationRequest")) - .subjectId("OPA-Patient1") - .parameters(org.opencds.cqf.fhir.utility.dstu3.Parameters.parameters( - org.opencds.cqf.fhir.utility.dstu3.Parameters.stringPart("ClaimId", "OPA-Claim1"))) - .thenPrepopulate(true) - .isEqualsToExpected(org.hl7.fhir.dstu3.model.Questionnaire.class); - } - - @Test - void prePopulateR4() { - given().repository(repositoryR4) - .when() - .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "OutpatientPriorAuthorizationRequest")) - .subjectId("OPA-Patient1") - .parameters(parameters(stringPart("ClaimId", "OPA-Claim1"))) - .thenPrepopulate(true) - .isEqualsToExpected(org.hl7.fhir.r4.model.Questionnaire.class); - } - - @Test - void prePopulateR5() { - // R5 CQL evaluation is failing with model errors from the engine - // Using this to test building the request in the processor - given().repository(repositoryR5) - .when() - .questionnaireId(Ids.newId(fhirContextR5, "Questionnaire", "OutpatientPriorAuthorizationRequest")) - .subjectId("OPA-Patient1") - .parameters(org.opencds.cqf.fhir.utility.r5.Parameters.parameters( - org.opencds.cqf.fhir.utility.r5.Parameters.stringPart("ClaimId", "OPA-Claim1"))) - .thenPrepopulate(false); - } - - @Test - void prePopulateNoLibrary() { - given().repository(repositoryR4) - .when() - .questionnaireId( - Ids.newId(fhirContextR4, "Questionnaire", "OutpatientPriorAuthorizationRequest-noLibrary")) - .subjectId("OPA-Patient1") - .parameters(parameters(stringPart("ClaimId", "OPA-Claim1"))) - .thenPrepopulate(true) - .isEqualsToExpected(org.hl7.fhir.r4.model.Questionnaire.class); - } - - @Test - void prePopulateHasErrors() { - given().repository(repositoryR4) - .when() - .questionnaireId( - Ids.newId(fhirContextR4, "Questionnaire", "OutpatientPriorAuthorizationRequest-Errors")) - .subjectId("OPA-Patient1") - .parameters(parameters(stringPart("ClaimId", "OPA-Claim1"))) - .thenPrepopulate(true) - .hasErrors(); - } - - @Test - void prePopulateNoQuestionnaireThrowsException() { - assertThrows(ResourceNotFoundException.class, () -> { - given().repository(repositoryR4) - .when() - .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "null")) - .thenPrepopulate(true); - }); - } - @Test void populateDstu3() { given().repository(repositoryDstu3) @@ -118,9 +52,19 @@ void populateR4() { .when() .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "OutpatientPriorAuthorizationRequest")) .subjectId("OPA-Patient1") - .parameters(parameters(stringPart("ClaimId", "OPA-Claim1"))) + .parameters(newParameters(fhirContextR4, newStringPart(fhirContextR4, "ClaimId", "OPA-Claim1"))) .thenPopulate(true) .isEqualsToExpected(org.hl7.fhir.r4.model.QuestionnaireResponse.class); + + given().repository(repositoryR4) + .when() + .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "definition")) + .subjectId("OPA-Patient1") + .parameters(newParameters(fhirContextR4, newStringPart(fhirContextR4, "ClaimId", "OPA-Claim1"))) + .thenPopulate(true) + .hasItems(2) + .itemHasAnswerValue("1.1", new org.hl7.fhir.r4.model.StringType("Acme Clinic")) + .hasNoErrors(); } @Test @@ -131,8 +75,7 @@ void populateR5() { .when() .questionnaireId(Ids.newId(fhirContextR5, "Questionnaire", "OutpatientPriorAuthorizationRequest")) .subjectId("OPA-Patient1") - .parameters(org.opencds.cqf.fhir.utility.r5.Parameters.parameters( - org.opencds.cqf.fhir.utility.r5.Parameters.stringPart("ClaimId", "OPA-Claim1"))) + .parameters(newParameters(fhirContextR5, newStringPart(fhirContextR5, "ClaimId", "OPA-Claim1"))) .thenPopulate(false); } @@ -143,7 +86,7 @@ void populateNoLibrary() { .questionnaireId( Ids.newId(fhirContextR4, "Questionnaire", "OutpatientPriorAuthorizationRequest-noLibrary")) .subjectId("OPA-Patient1") - .parameters(parameters(stringPart("ClaimId", "OPA-Claim1"))) + .parameters(newParameters(fhirContextR4, newStringPart(fhirContextR4, "ClaimId", "OPA-Claim1"))) .thenPopulate(true) .isEqualsToExpected(org.hl7.fhir.r4.model.QuestionnaireResponse.class); } @@ -155,7 +98,7 @@ void populateHasErrors() { .questionnaireId( Ids.newId(fhirContextR4, "Questionnaire", "OutpatientPriorAuthorizationRequest-Errors")) .subjectId("OPA-Patient1") - .parameters(parameters(stringPart("ClaimId", "OPA-Claim1"))) + .parameters(newParameters(fhirContextR4, newStringPart(fhirContextR4, "ClaimId", "OPA-Claim1"))) .thenPopulate(true) .hasErrors(); } @@ -180,6 +123,61 @@ void populateNoSubjectThrowsException() { }); } + @Test + void populateWithLaunchContextResolvesParametersR4() { + given().repository(repositoryR4) + .when() + .questionnaireId(Ids.newId( + fhirContextR4, "Questionnaire", "questionnaire-sdc-test-fhirpath-prepop-initialexpression")) + .subjectId("OPA-Patient1") + .context(Arrays.asList( + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "user"), + newPart(fhirContextR4, "Reference", "content", "Practitioner/OPA-AttendingPhysician1")), + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "patient"), + newPart(fhirContextR4, "Reference", "content", "Patient/OPA-Patient1")))) + .thenPopulate(true) + .hasItems(14) + .itemHasAnswer("family-name") + .itemHasAnswer("provider-name") + .hasNoErrors(); + } + + @Test + @Disabled("R5 CQL evaluation currently fails") + void populateWithLaunchContextResolvesParametersR5() { + given().repository(repositoryR5) + .when() + .questionnaireId(Ids.newId( + fhirContextR5, "Questionnaire", "questionnaire-sdc-test-fhirpath-prepop-initialexpression")) + .subjectId("OPA-Patient1") + .context(Arrays.asList( + newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "user"), + newPart(fhirContextR5, "Reference", "content", "Practitioner/OPA-AttendingPhysician1")), + newPart( + fhirContextR5, + "context", + newStringPart(fhirContextR5, "name", "patient"), + newPart( + fhirContextR5, + "Reference", + "content", + "Practitioner/OPA-AttendingPhysician1")))) + .thenPopulate(true) + .hasItems(14) + .itemHasAnswer("family-name") + .itemHasAnswer("provider-name") + .hasNoErrors(); + } + @Test void questionnairePackageDstu3() { given().repository(repositoryDstu3) @@ -211,19 +209,30 @@ void questionnairePackageR5() { } @Test - void pa_aslp_PrePopulate() { - given().repositoryFor(fhirContextR4, "r4/pa-aslp") + void dataRequirementsDstu3() { + given().repositoryFor(fhirContextDstu3, "dstu3") .when() - .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "ASLPA1")) - .subjectId("positive") - .parameters(parameters( - stringPart("Service Request Id", "SleepStudy"), - stringPart("Service Request Id", "SleepStudy2"), - stringPart("Coverage Id", "Coverage-positive"))) - .thenPrepopulate(true) - .hasItems(13) - .itemHasInitial("1") - .itemHasInitial("2"); + .questionnaireId(Ids.newId(fhirContextDstu3, "Questionnaire", "OutpatientPriorAuthorizationRequest")) + .thenDataRequirements() + .hasDataRequirements(29); + } + + @Test + void dataRequirementsR4() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "OutpatientPriorAuthorizationRequest")) + .thenDataRequirements() + .hasDataRequirements(30); + } + + @Test + void dataRequirementsR5() { + given().repositoryFor(fhirContextR5, "r5") + .when() + .questionnaireId(Ids.newId(fhirContextR5, "Questionnaire", "OutpatientPriorAuthorizationRequest")) + .thenDataRequirements() + .hasDataRequirements(30); } @Test @@ -232,12 +241,13 @@ void pa_aslp_Populate() { .when() .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "ASLPA1")) .subjectId("positive") - .parameters(parameters( - stringPart("Service Request Id", "SleepStudy"), - stringPart("Service Request Id", "SleepStudy2"), - stringPart("Coverage Id", "Coverage-positive"))) + .parameters(newParameters( + fhirContextR4, + newStringPart(fhirContextR4, "Service Request Id", "SleepStudy"), + newStringPart(fhirContextR4, "Service Request Id", "SleepStudy2"), + newStringPart(fhirContextR4, "Coverage Id", "Coverage-positive"))) .thenPopulate(true) - .hasItems(13) + .hasItems(10) .itemHasAnswer("1") .itemHasAuthorExt("1") .itemHasAnswer("2") @@ -268,4 +278,51 @@ void processors() { .getBundle(); assertNotNull(bundle); } + + @Test + void testItemContextPopulationWithoutDefinition() { + given().repository(repositoryR4) + .when() + .questionnaireId(Ids.newId(fhirContextR4, "Questionnaire", "observation")) + .subjectId("Patient1") + .thenPopulate(true) + .hasItems(2) + .itemHasAnswerValue("1", new org.hl7.fhir.r4.model.IntegerType(50)); + } + + @Test + @Disabled("Currently failing due to an issue in the CHF CQL") + void testIntegration() { + var questionnaire = given().repository(repositoryR4) + .when() + .profileId(Ids.newId(fhirContextR4, "StructureDefinition", "chf-bodyweight-change")) + .thenGenerate() + .questionnaire; + var questionnaireResponse = given().repository(repositoryR4) + .when() + .questionnaire(questionnaire) + .subjectId("chf-scenario1-patient") + .context(Arrays.asList( + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "patient"), + newPart(fhirContextR4, "Reference", "content", "Patient/chf-scenario1-patient")), + newPart( + fhirContextR4, + "context", + newStringPart(fhirContextR4, "name", "encounter"), + newPart(fhirContextR4, "Reference", "content", "Encounter/chf-scenario1-encounter")))) + .thenPopulate(true) + .hasItems(11) + // .itemHasAnswerValue("1.2.1", "-1.4") + .itemHasAuthorExt("1.2.1") + .questionnaireResponse; + TestQuestionnaireResponse.given() + .repository(repositoryR4) + .when() + .questionnaireResponse(questionnaireResponse) + .extract() + .hasEntry(1); + } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestItemGenerator.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestItemGenerator.java index 9292eaf06..bdf775ec3 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestItemGenerator.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestItemGenerator.java @@ -13,9 +13,15 @@ import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -23,13 +29,14 @@ import org.json.JSONException; import org.opencds.cqf.cql.engine.model.ModelResolver; import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.utility.Constants; import org.opencds.cqf.fhir.utility.model.FhirModelResolverCache; import org.opencds.cqf.fhir.utility.monad.Eithers; import org.opencds.cqf.fhir.utility.repository.ig.IgRepository; import org.skyscreamer.jsonassert.JSONAssert; public class TestItemGenerator { - public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/questionnaire"; + public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/shared"; private static InputStream open(String asset) { return TestItemGenerator.class.getResourceAsStream(asset); @@ -78,7 +85,7 @@ public static class When { private IBaseResource profile; private String id; private String subjectId; - private IBaseBundle bundle; + private IBaseBundle data; private IBaseParameters parameters; When(Repository repository, QuestionnaireProcessor itemGenerator) { @@ -111,8 +118,8 @@ public When subjectId(String id) { return this; } - public When bundle(IBaseBundle bundle) { - this.bundle = bundle; + public When bundle(IBaseBundle data) { + this.data = data; return this; } @@ -123,14 +130,15 @@ public When parameters(IBaseParameters params) { public GeneratedItem then() { IBaseResource result; - if (subjectId != null || parameters != null || bundle != null) { + if (subjectId != null || parameters != null || data != null) { result = processor.generateQuestionnaire( Eithers.for3(profileUrl, profileId, profile), false, true, subjectId, parameters, - bundle, + data, + true, null, id); } else if (profileUrl != null || profileId != null || profile != null) { @@ -147,6 +155,7 @@ public static class GeneratedItem { final IBaseResource questionnaire; final IParser jsonParser; final ModelResolver modelResolver; + final Map items; public GeneratedItem(Repository repository, IBaseResource questionnaire) { this.repository = repository; @@ -154,6 +163,27 @@ public GeneratedItem(Repository repository, IBaseResource questionnaire) { jsonParser = this.repository.fhirContext().newJsonParser().setPrettyPrint(true); modelResolver = FhirModelResolverCache.resolverForVersion( this.repository.fhirContext().getVersion().getVersion()); + items = new HashMap<>(); + populateItems(getItems(questionnaire)); + } + + @SuppressWarnings("unchecked") + private List getItems(IBase base) { + var pathResult = modelResolver.resolvePath(base, "item"); + return pathResult instanceof List ? (List) pathResult : new ArrayList<>(); + } + + private void populateItems(List itemList) { + for (var item : itemList) { + @SuppressWarnings("unchecked") + var linkIdPath = (IPrimitiveType) modelResolver.resolvePath(item, "linkId"); + var linkId = linkIdPath == null ? null : linkIdPath.getValue(); + items.put(linkId, item); + var childItems = getItems(item); + if (!childItems.isEmpty()) { + populateItems(childItems); + } + } } public void isEqualsTo(String expectedItemAssetName) { @@ -179,17 +209,30 @@ public void isEqualsTo(IIdType expectedQuestionnaireId) { } public GeneratedItem hasItemCount(int count) { - var item = ((List) modelResolver.resolvePath(questionnaire, "item")).get(0); + assertEquals(count, items.size()); + return this; + } + + public GeneratedItem itemHasInitialValue(String linkId) { + var item = items.get(linkId); assertNotNull(item); - var childItem = (List) modelResolver.resolvePath(item, "item"); - assertEquals(count, childItem.size()); + assertNotNull(modelResolver.resolvePath(item, "initial")); return this; } - public GeneratedItem itemHasInitialValue() { - var item = ((List) modelResolver.resolvePath(questionnaire, "item")).get(0); - var childItem = (List) modelResolver.resolvePath(item, "item"); - assertTrue(childItem.stream().anyMatch(i -> modelResolver.resolvePath(i, "initial") != null)); + public GeneratedItem itemHasHiddenValueExtension(String linkId) { + var item = items.get(linkId); + assertNotNull(item); + assertTrue( + item.getExtension().stream().anyMatch(e -> e.getUrl().equals(Constants.SDC_QUESTIONNAIRE_HIDDEN))); + return this; + } + + public GeneratedItem itemHasInitialExpression(String linkId) { + var item = items.get(linkId); + assertNotNull(item); + assertTrue(item.getExtension().stream() + .anyMatch(e -> e.getUrl().equals(Constants.SDC_QUESTIONNAIRE_INITIAL_EXPRESSION))); return this; } @@ -197,5 +240,25 @@ public GeneratedItem hasId(String expectedId) { assertEquals(expectedId, questionnaire.getIdElement().getIdPart()); return this; } + + @SuppressWarnings({"rawtypes", "unchecked"}) + public GeneratedItem hasLaunchContextExtension(int count) { + var pathResult = modelResolver.resolvePath(questionnaire, "extension"); + var exts = pathResult instanceof List ? (List) pathResult : new ArrayList<>(); + var launchContextExts = exts.stream() + .filter(e -> { + var urlPathResult = modelResolver.resolvePath(e, "url"); + if (urlPathResult instanceof IPrimitiveType) { + return ((IPrimitiveType) urlPathResult) + .getValueAsString() + .equals(Constants.SDC_QUESTIONNAIRE_LAUNCH_CONTEXT); + } else { + return false; + } + }) + .collect(Collectors.toList()); + assertEquals(count, launchContextExts.size()); + return this; + } } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestQuestionnaire.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestQuestionnaire.java index fbbfe8913..e5a086eaa 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestQuestionnaire.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/TestQuestionnaire.java @@ -3,6 +3,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import static org.opencds.cqf.fhir.test.Resources.getResourcePath; @@ -11,10 +12,14 @@ import ca.uhn.fhir.parser.IParser; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; +import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseBundle; +import org.hl7.fhir.instance.model.api.IBaseExtension; import org.hl7.fhir.instance.model.api.IBaseParameters; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; @@ -26,7 +31,9 @@ import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings.SEARCH_FILTER_MODE; import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings.TERMINOLOGY_FILTER_MODE; import org.opencds.cqf.fhir.cql.engine.terminology.TerminologySettings.VALUESET_EXPANSION_MODE; +import org.opencds.cqf.fhir.cr.common.IDataRequirementsProcessor; import org.opencds.cqf.fhir.cr.common.IPackageProcessor; +import org.opencds.cqf.fhir.cr.helpers.DataRequirementsLibrary; import org.opencds.cqf.fhir.cr.helpers.GeneratedPackage; import org.opencds.cqf.fhir.cr.questionnaire.generate.IGenerateProcessor; import org.opencds.cqf.fhir.cr.questionnaire.populate.IPopulateProcessor; @@ -38,7 +45,7 @@ import org.skyscreamer.jsonassert.JSONAssert; public class TestQuestionnaire { - public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/questionnaire"; + public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/shared"; public static Given given() { return new Given(); @@ -49,6 +56,7 @@ public static class Given { private EvaluationSettings evaluationSettings; private IGenerateProcessor generateProcessor; private IPackageProcessor packageProcessor; + private IDataRequirementsProcessor dataRequirementsProcessor; private IPopulateProcessor populateProcessor; public Given repository(Repository repository) { @@ -77,6 +85,11 @@ public Given packageProcessor(IPackageProcessor packageProcessor) { return this; } + public Given dataRequirementsProcessor(IDataRequirementsProcessor dataRequirementsProcessor) { + this.dataRequirementsProcessor = dataRequirementsProcessor; + return this; + } + public Given populateProcessor(IPopulateProcessor populateProcessor) { this.populateProcessor = populateProcessor; return this; @@ -95,7 +108,12 @@ public QuestionnaireProcessor buildProcessor(Repository repository) { .setValuesetExpansionMode(VALUESET_EXPANSION_MODE.PERFORM_NAIVE_EXPANSION); } return new QuestionnaireProcessor( - repository, evaluationSettings, generateProcessor, packageProcessor, populateProcessor); + repository, + evaluationSettings, + generateProcessor, + packageProcessor, + dataRequirementsProcessor, + populateProcessor); } public When when() { @@ -110,27 +128,33 @@ public static class When { private IIdType questionnaireId; private IBaseResource questionnaire; private String subjectId; - private IBaseBundle bundle; + private List context; + private IBaseExtension launchContext; + private boolean useServerData; + private IBaseBundle data; private IBaseParameters parameters; private Boolean isPut; + private IIdType profileId; When(Repository repository, QuestionnaireProcessor processor) { this.repository = repository; this.processor = processor; + useServerData = true; } private FhirContext fhirContext() { return repository.fhirContext(); } - private PopulateRequest buildRequest(String operationName) { + private PopulateRequest buildRequest() { return new PopulateRequest( - operationName, processor.resolveQuestionnaire(Eithers.for3(questionnaireUrl, questionnaireId, questionnaire)), Ids.newId(fhirContext(), "Patient", subjectId), + context, + launchContext, parameters, - bundle, - true, + data, + useServerData, new LibraryEngine(repository, processor.evaluationSettings), processor.modelResolver); } @@ -155,8 +179,23 @@ public When subjectId(String id) { return this; } - public When additionalData(IBaseBundle bundle) { - this.bundle = bundle; + public When context(List context) { + this.context = context; + return this; + } + + public When launchContext(IBaseExtension extension) { + launchContext = extension; + return this; + } + + public When useServerData(boolean value) { + useServerData = value; + return this; + } + + public When additionalData(IBaseBundle data) { + this.data = data; return this; } @@ -170,33 +209,20 @@ public When isPut(Boolean value) { return this; } - public GeneratedQuestionnaire thenPrepopulate(Boolean buildRequest) { - if (buildRequest) { - var populateRequest = buildRequest("prepopulate"); - return new GeneratedQuestionnaire(repository, populateRequest, processor.prePopulate(populateRequest)); - } else { - return new GeneratedQuestionnaire( - repository, - null, - processor.prePopulate( - Eithers.for3(questionnaireUrl, questionnaireId, questionnaire), - subjectId, - parameters, - bundle, - true, - (IBaseResource) null, - null, - null)); - } + public When profileId(IIdType id) { + profileId = id; + return this; } public IBaseResource runPopulate() { return processor.populate( Eithers.for3(questionnaireUrl, questionnaireId, questionnaire), subjectId, + context, + launchContext, parameters, - bundle, - true, + data, + useServerData, (IBaseResource) null, null, null); @@ -204,7 +230,7 @@ public IBaseResource runPopulate() { public GeneratedQuestionnaireResponse thenPopulate(Boolean buildRequest) { if (buildRequest) { - var populateRequest = buildRequest("populate"); + var populateRequest = buildRequest(); return new GeneratedQuestionnaireResponse( repository, populateRequest, processor.populate(populateRequest)); } else { @@ -220,13 +246,23 @@ public GeneratedPackage thenPackage() { : processor.packageQuestionnaire(param, isPut), fhirContext()); } + + public GeneratedQuestionnaire thenGenerate() { + return new GeneratedQuestionnaire( + repository, null, processor.generateQuestionnaire(Eithers.for3(null, profileId, null))); + } + + public DataRequirementsLibrary thenDataRequirements() { + var param = Eithers.for3(questionnaireUrl, questionnaireId, questionnaire); + return new DataRequirementsLibrary(processor.dataRequirements(param, parameters)); + } } public static class GeneratedQuestionnaire { + public IBaseResource questionnaire; Repository repository; IParser jsonParser; PopulateRequest request; - IBaseResource questionnaire; List items; IIdType expectedQuestionnaireId; @@ -301,12 +337,15 @@ public static class GeneratedQuestionnaireResponse { IParser jsonParser; PopulateRequest request; IBaseResource questionnaireResponse; - List items; + Map items; IIdType expectedId; private void populateItems(List itemList) { for (var item : itemList) { - items.add(item); + @SuppressWarnings("unchecked") + var linkIdPath = (IPrimitiveType) request.resolvePath(item, "linkId"); + var linkId = linkIdPath == null ? null : linkIdPath.getValue(); + items.put(linkId, item); var childItems = request.getItems(item); if (!childItems.isEmpty()) { populateItems(childItems); @@ -320,7 +359,7 @@ public GeneratedQuestionnaireResponse( this.request = request; this.questionnaireResponse = questionnaireResponse; jsonParser = this.repository.fhirContext().newJsonParser().setPrettyPrint(true); - items = new ArrayList<>(); + items = new HashMap<>(); if (request != null) { populateItems(request.getItems(questionnaireResponse)); expectedId = Ids.newId( @@ -350,25 +389,29 @@ public GeneratedQuestionnaireResponse hasItems(int expectedItemCount) { return this; } - public GeneratedQuestionnaireResponse itemHasAnswer(String theLinkId) { - var matchingItems = items.stream() - .filter(i -> request.getItemLinkId(i).equals(theLinkId)) - .collect(Collectors.toList()); - for (var item : matchingItems) { - assertFalse(request.resolvePathList(item, "answer").isEmpty()); - } + public GeneratedQuestionnaireResponse itemHasAnswer(String linkId) { + assertTrue(!request.resolvePathList(items.get(linkId), "answer").isEmpty()); + return this; + } + public GeneratedQuestionnaireResponse itemHasAnswerValue(String linkId, IBase value) { + var answer = request.resolvePathList(items.get(linkId), "answer", IBase.class); + var answers = + answer.stream().map(a -> request.resolvePath(a, "value")).collect(Collectors.toList()); + assertNotNull(answers); + assertTrue( + answers.stream().anyMatch(a -> a.toString().equals(value.toString())), + "expected answer to contain value: " + value); return this; } - public GeneratedQuestionnaireResponse itemHasAuthorExt(String theLinkId) { - var matchingItems = items.stream() - .filter(i -> request.getItemLinkId(i).equals(theLinkId)) - .collect(Collectors.toList()); - for (var item : matchingItems) { - assertNotNull(request.getExtensionByUrl(item, Constants.QUESTIONNAIRE_RESPONSE_AUTHOR)); - } + public GeneratedQuestionnaireResponse itemHasAuthorExt(String linkId) { + assertNotNull(request.getExtensionByUrl(items.get(linkId), Constants.QUESTIONNAIRE_RESPONSE_AUTHOR)); + return this; + } + public GeneratedQuestionnaireResponse itemHasNoAuthorExt(String linkId) { + assertNull(request.getExtensionByUrl(items.get(linkId), Constants.QUESTIONNAIRE_RESPONSE_AUTHOR)); return this; } @@ -380,5 +423,13 @@ public GeneratedQuestionnaireResponse hasErrors() { return this; } + + public GeneratedQuestionnaireResponse hasNoErrors() { + assertFalse(request.hasExtension(questionnaireResponse, Constants.EXT_CRMI_MESSAGES)); + assertTrue(request.getContained(questionnaireResponse).stream() + .noneMatch(r -> r.fhirType().equals("OperationOutcome"))); + + return this; + } } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementProcessorTests.java index 88eb88a08..c7f542b21 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ElementProcessorTests.java @@ -1,10 +1,8 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.doReturn; import static org.opencds.cqf.fhir.cr.helpers.RequestHelpers.newGenerateRequestForVersion; import static org.opencds.cqf.fhir.cr.questionnaire.generate.IElementProcessor.createInitial; @@ -12,10 +10,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; -import java.util.Collections; import org.hl7.fhir.r4.model.BooleanType; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; @@ -25,8 +20,6 @@ import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; -import org.opencds.cqf.fhir.utility.Constants; -import org.opencds.cqf.fhir.utility.CqfExpression; @ExtendWith(MockitoExtension.class) class ElementProcessorTests { @@ -221,26 +214,27 @@ void createInitialShouldReturnNullForUnsupportedVersion() { assertNull(initial); } - @Test - void elementWithCqfExpressionWithResourceResult() { - doReturn(repository).when(libraryEngine).getRepository(); - doReturn(fhirContextR4).when(repository).fhirContext(); - var request = newGenerateRequestForVersion(FhirVersionEnum.R4, libraryEngine); - var cqfExpression = new CqfExpression(); - var expectedResource = new Patient().setId("test"); - var item = new QuestionnaireItemComponent() - .setLinkId("test") - .setType(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.REFERENCE); - doReturn(cqfExpression) - .when(expressionProcessor) - .getCqfExpression(request, Collections.emptyList(), Constants.CQF_EXPRESSION); - doReturn(Collections.singletonList(expectedResource)) - .when(expressionProcessor) - .getExpressionResult(request, cqfExpression); - var actual = (QuestionnaireItemComponent) - new ElementHasCqfExpression(expressionProcessor).addProperties(request, Collections.emptyList(), item); - assertNotNull(actual); - assertTrue(actual.hasInitial()); - assertEquals("test", actual.getInitial().get(0).getValueReference().getReference()); - } + // @Test + // void elementWithCqfExpressionWithResourceResult() { + // doReturn(repository).when(libraryEngine).getRepository(); + // doReturn(fhirContextR4).when(repository).fhirContext(); + // var request = newGenerateRequestForVersion(FhirVersionEnum.R4, libraryEngine); + // var cqfExpression = new CqfExpression(); + // var expectedResource = new Patient().setId("test"); + // var item = new QuestionnaireItemComponent() + // .setLinkId("test") + // .setType(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.REFERENCE); + // doReturn(cqfExpression) + // .when(expressionProcessor) + // .getCqfExpression(request, Collections.emptyList(), Constants.CQF_EXPRESSION); + // doReturn(Collections.singletonList(expectedResource)) + // .when(expressionProcessor) + // .getExpressionResult(request, cqfExpression); + // var actual = (QuestionnaireItemComponent) + // new ElementHasCqfExpression(expressionProcessor).addProperties(request, Collections.emptyList(), + // item); + // assertNotNull(actual); + // assertTrue(actual.hasInitial()); + // assertEquals("test", actual.getInitial().get(0).getValueReference().getReference()); + // } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGeneratorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGeneratorTests.java index 4a4ee5de9..90ad2361e 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGeneratorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/generate/ItemGeneratorTests.java @@ -1,27 +1,23 @@ package org.opencds.cqf.fhir.cr.questionnaire.generate; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.spy; import static org.opencds.cqf.fhir.cr.questionnaire.TestItemGenerator.given; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.r4.model.StructureDefinition; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; import org.mockito.Mock; -import org.mockito.Spy; import org.mockito.junit.jupiter.MockitoExtension; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.LibraryEngine; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; import org.opencds.cqf.fhir.cr.helpers.RequestHelpers; import org.opencds.cqf.fhir.utility.CqfExpression; import org.opencds.cqf.fhir.utility.Ids; @@ -41,43 +37,27 @@ class ItemGeneratorTests { @Mock Repository repository; - @Mock - IElementProcessor elementProcessor; - @Mock LibraryEngine libraryEngine; - @InjectMocks - @Spy ItemGenerator fixture; @Test - void generateShouldCatchAndNotFailOnFeatureExpressionException() throws ResolveExpressionException { + void generateShouldCatchAndNotFailOnFeatureExpressionException() { doReturn(repository).when(libraryEngine).getRepository(); doReturn(fhirContextR4).when(repository).fhirContext(); + fixture = spy(new ItemGenerator(repository)); var profile = new StructureDefinition(); var request = RequestHelpers.newGenerateRequestForVersion(FhirVersionEnum.R4, libraryEngine, profile); var groupItem = new QuestionnaireItemComponent(); doReturn(groupItem).when(fixture).createQuestionnaireItem(request, null); var cqfExpression = new CqfExpression(); doReturn(cqfExpression).when(fixture).getFeatureExpression(request); - var resultException = new ResolveExpressionException("Expression exception"); + var resultException = new UnprocessableEntityException("Expression exception"); doThrow(resultException).when(fixture).getFeatureExpressionResults(request, cqfExpression, null); fixture.generate(request); } - @Test - void generateShouldReturnErrorItemOnException() { - doReturn(repository).when(libraryEngine).getRepository(); - doReturn(fhirContextR4).when(repository).fhirContext(); - var profile = new StructureDefinition(); - var request = RequestHelpers.newGenerateRequestForVersion(FhirVersionEnum.R4, libraryEngine, profile); - var result = (QuestionnaireItemComponent) fixture.generate(request); - assertNotNull(result); - assertEquals("DISPLAY", result.getType().name()); - assertTrue(result.getText().contains("An error occurred during item creation: ")); - } - /* Tests using TestItemGenerator class */ @Test @@ -87,8 +67,7 @@ void generateItemDstu3() { .subjectId(ROUTE_ONE_PATIENT) .profileUrl(new StringType(ROUTE_ONE_PATIENT_PROFILE)) .then() - .hasItemCount(4) - .itemHasInitialValue(); + .hasItemCount(6); } @Test @@ -98,8 +77,10 @@ void generateItemR4() { .subjectId(ROUTE_ONE_PATIENT) .profileUrl(new CanonicalType(ROUTE_ONE_PATIENT_PROFILE)) .then() - .hasItemCount(4) - .itemHasInitialValue(); + .hasItemCount(9) + .itemHasInitialValue("1.4.1") + .itemHasHiddenValueExtension("1.4.1") + .itemHasInitialExpression("1.1.1"); } @Test @@ -109,8 +90,10 @@ void generateItemR5() { .subjectId(ROUTE_ONE_PATIENT) .profileUrl(new org.hl7.fhir.r5.model.CanonicalType(ROUTE_ONE_PATIENT_PROFILE)) .then() - .hasItemCount(4) - .itemHasInitialValue(); + .hasItemCount(9) + .itemHasInitialValue("1.4.1") + .itemHasHiddenValueExtension("1.4.1") + .itemHasInitialExpression("1.1.1"); } @Test @@ -120,7 +103,7 @@ void sleepStudyOrderR4() { .profileUrl(new CanonicalType(SLEEP_STUDY_PROFILE)) .subjectId(SLEEP_STUDY_PATIENT) .then() - .hasItemCount(2) + .hasItemCount(3) .hasId("aslp-sleep-study-order"); } @@ -131,7 +114,7 @@ void sleepStudyOrderR5() { .profileUrl(new org.hl7.fhir.r5.model.CanonicalType(SLEEP_STUDY_PROFILE)) .subjectId(SLEEP_STUDY_PATIENT) .then() - .hasItemCount(2) + .hasItemCount(3) .hasId("aslp-sleep-study-order"); } @@ -147,7 +130,7 @@ void generateItemForElementWithChildren() { .profileId(Ids.newId(fhirContextR4, "sigmoidoscopy-complication-casefeature-definition")) .subjectId(ROUTE_ONE_PATIENT) .then() - .hasItemCount(2); + .hasItemCount(6); } @Test @@ -157,6 +140,27 @@ void generateHiddenItem() { .profileId(Ids.newId(fhirContextR4, "sigmoidoscopy-complication-casefeature-definition2")) .subjectId(ROUTE_ONE_PATIENT) .then() - .hasItemCount(2); + .hasItemCount(3); + } + + @Test + void generate() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .profileId(Ids.newId(fhirContextR4, "chf-bodyweight-change")) + .subjectId(ROUTE_ONE_PATIENT) + .then() + .hasItemCount(11); + } + + @Test + void generateWithLaunchContexts() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .profileId(Ids.newId(fhirContextR4, "LaunchContexts")) + .subjectId(ROUTE_ONE_PATIENT) + .then() + .hasItemCount(3) + .hasLaunchContextExtension(5); } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessorTests.java index 34c29c991..7a59a6933 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/PopulateProcessorTests.java @@ -16,7 +16,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.OperationOutcome; import org.hl7.fhir.r4.model.Questionnaire; -import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; +import org.hl7.fhir.r4.model.QuestionnaireResponse; import org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -55,9 +55,7 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsDstu3() final PopulateRequest request = newPopulateRequestForVersion(FhirVersionEnum.DSTU3, libraryEngine, originalQuestionnaire); final var expectedResponses = getExpectedResponses(request); - final var expectedItems = getExpectedItems(request); - doReturn(expectedItems).when(fixture).processItems(request, Collections.emptyList()); - doReturn(expectedResponses).when(fixture).processResponseItems(request, expectedItems); + doReturn(expectedResponses).when(fixture).processItems(request, Collections.emptyList()); // execute final IBaseResource actual = fixture.populate(request); // validate @@ -66,11 +64,13 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsDstu3() actual.getIdElement().getIdPart()); assertContainedResources(request, actual, null, originalQuestionnaire); assertEquals( - questionnaireUrl, + "#" + prePopulatedQuestionnaireId, request.resolvePath(actual, "questionnaire", IBaseReference.class) .getReferenceElement() .getValue()); - // assertEquals(QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS, actual.getStatus()); + assertEquals( + org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS, + ((org.hl7.fhir.dstu3.model.QuestionnaireResponse) actual).getStatus()); assertEquals( "Patient/" + PATIENT_ID, request.resolvePath(actual, "subject", IBaseReference.class) @@ -78,7 +78,6 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsDstu3() .getValue()); assertEquals(expectedResponses, request.getItems(actual)); verify(fixture).processItems(request, Collections.emptyList()); - verify(fixture).processResponseItems(request, expectedItems); } @Test @@ -93,9 +92,7 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsR4() { final PopulateRequest request = newPopulateRequestForVersion(FhirVersionEnum.R4, libraryEngine, originalQuestionnaire); final var expectedResponses = getExpectedResponses(request); - final var expectedItems = getExpectedItems(request); - doReturn(expectedItems).when(fixture).processItems(request, Collections.emptyList()); - doReturn(expectedResponses).when(fixture).processResponseItems(request, expectedItems); + doReturn(expectedResponses).when(fixture).processItems(request, Collections.emptyList()); // execute final IBaseResource actual = fixture.populate(request); // validate @@ -103,8 +100,10 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsR4() { prePopulatedQuestionnaireId + "-" + PATIENT_ID, actual.getIdElement().getIdPart()); assertContainedResources(request, actual, null, originalQuestionnaire); - assertEquals(questionnaireUrl, request.resolvePathString(actual, "questionnaire")); - // assertEquals(QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS, actual.getStatus()); + assertEquals("#" + prePopulatedQuestionnaireId, request.resolvePathString(actual, "questionnaire")); + assertEquals( + QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS, + ((QuestionnaireResponse) actual).getStatus()); assertEquals( "Patient/" + PATIENT_ID, request.resolvePath(actual, "subject", IBaseReference.class) @@ -112,7 +111,6 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsR4() { .getValue()); assertEquals(expectedResponses, request.getItems(actual)); verify(fixture).processItems(request, Collections.emptyList()); - verify(fixture).processResponseItems(request, expectedItems); } @Test @@ -127,9 +125,7 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsR5() { final PopulateRequest request = newPopulateRequestForVersion(FhirVersionEnum.R5, libraryEngine, originalQuestionnaire); final var expectedResponses = getExpectedResponses(request); - final var expectedItems = getExpectedItems(request); - doReturn(expectedItems).when(fixture).processItems(request, Collections.emptyList()); - doReturn(expectedResponses).when(fixture).processResponseItems(request, expectedItems); + doReturn(expectedResponses).when(fixture).processItems(request, Collections.emptyList()); // execute final IBaseResource actual = fixture.populate(request); // validate @@ -137,8 +133,10 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsR5() { prePopulatedQuestionnaireId + "-" + PATIENT_ID, actual.getIdElement().getIdPart()); assertContainedResources(request, actual, null, originalQuestionnaire); - assertEquals(questionnaireUrl, request.resolvePathString(actual, "questionnaire")); - // assertEquals(QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS, actual.getStatus()); + assertEquals("#" + prePopulatedQuestionnaireId, request.resolvePathString(actual, "questionnaire")); + assertEquals( + org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseStatus.INPROGRESS, + ((org.hl7.fhir.r5.model.QuestionnaireResponse) actual).getStatus()); assertEquals( "Patient/" + PATIENT_ID, request.resolvePath(actual, "subject", IBaseReference.class) @@ -146,7 +144,6 @@ void populateShouldReturnQuestionnaireResponseResourceWithPopulatedFieldsR5() { .getValue()); assertEquals(expectedResponses, request.getItems(actual)); verify(fixture).processItems(request, Collections.emptyList()); - verify(fixture).processResponseItems(request, expectedItems); } private List getExpectedResponses(PopulateRequest request) { @@ -172,29 +169,6 @@ private List getExpectedResponses(PopulateRequest request) } } - private List getExpectedItems(PopulateRequest request) { - switch (request.getFhirVersion()) { - case DSTU3: - return List.of( - new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(), - new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(), - new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent()); - case R4: - return List.of( - new QuestionnaireItemComponent(), - new QuestionnaireItemComponent(), - new QuestionnaireItemComponent()); - case R5: - return List.of( - new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(), - new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(), - new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent()); - - default: - return null; - } - } - private void assertContainedResources( PopulateRequest request, IBaseResource actual, diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemTests.java index 23100c297..58a4b962a 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemTests.java @@ -19,15 +19,11 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; import org.mockito.Mock; -import org.mockito.Spy; import org.mockito.junit.jupiter.MockitoExtension; import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.cql.LibraryEngine; import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; -import org.opencds.cqf.fhir.cr.common.ResolveExpressionException; -import org.opencds.cqf.fhir.utility.Constants; import org.opencds.cqf.fhir.utility.CqfExpression; @ExtendWith(MockitoExtension.class) @@ -36,108 +32,114 @@ class ProcessItemTests { private Repository repository; @Mock - private ExpressionProcessor expressionProcessorService; + private ExpressionProcessor expressionProcessor; @Mock private LibraryEngine libraryEngine; - @Spy - @InjectMocks - private ProcessItem fixture; + private ProcessItem processItem; @BeforeEach void setup() { + processItem = new ProcessItem(expressionProcessor); doReturn(repository).when(libraryEngine).getRepository(); } @AfterEach void tearDown() { - verifyNoMoreInteractions(expressionProcessorService); + verifyNoMoreInteractions(expressionProcessor); verifyNoMoreInteractions(libraryEngine); } @Test - void processItemShouldReturnQuestionnaireItemComponentDstu3() throws ResolveExpressionException { + void processItemShouldReturnQuestionnaireResponseItemComponentDstu3() { // setup final org.hl7.fhir.dstu3.model.Questionnaire questionnaire = new org.hl7.fhir.dstu3.model.Questionnaire(); doReturn(FhirContext.forDstu3Cached()).when(repository).fhirContext(); - final PopulateRequest prePopulateRequest = + final PopulateRequest populateRequest = newPopulateRequestForVersion(FhirVersionEnum.DSTU3, libraryEngine, questionnaire); final IBaseBackboneElement originalQuestionnaireItemComponent = - new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); - final IBaseBackboneElement populatedQuestionnaireItemComponent = - new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); + new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent().setLinkId("1"); + final CqfExpression expression = withExpression(); final List expressionResults = withExpressionResults(FhirVersionEnum.DSTU3); - doReturn(populatedQuestionnaireItemComponent).when(fixture).copyItem(originalQuestionnaireItemComponent); + doReturn(expression) + .when(expressionProcessor) + .getItemInitialExpression(populateRequest, originalQuestionnaireItemComponent); doReturn(expressionResults) - .when(fixture) - .getExpressionResults(prePopulateRequest, originalQuestionnaireItemComponent); + .when(expressionProcessor) + .getExpressionResultForItem(populateRequest, expression, "1"); // execute - final IBaseBackboneElement actual = fixture.processItem(prePopulateRequest, originalQuestionnaireItemComponent); + final IBaseBackboneElement actual = + processItem.processItem(populateRequest, originalQuestionnaireItemComponent); // validate - verify(fixture).getExpressionResults(prePopulateRequest, originalQuestionnaireItemComponent); - verify(fixture).copyItem(originalQuestionnaireItemComponent); - final var extensions = prePopulateRequest.getExtensionsByUrl(actual, Constants.QUESTIONNAIRE_RESPONSE_AUTHOR); - assertEquals(1, extensions.size()); - final var initial = prePopulateRequest.resolvePath(actual, "initial"); - assertEquals(expressionResults.get(0), initial); + // verify(processItem).getInitialValue(populateRequest, originalQuestionnaireItemComponent); + // final var extensions = populateRequest.getExtensionsByUrl(actual, Constants.QUESTIONNAIRE_RESPONSE_AUTHOR); + // assertEquals(1, extensions.size()); + final var answers = populateRequest.resolvePathList(actual, "answer", IBaseBackboneElement.class); + assertEquals(1, answers.size()); + for (int i = 0; i < answers.size(); i++) { + assertEquals(expressionResults.get(i), populateRequest.resolvePath(answers.get(i), "value")); + } } @Test - void processItemShouldReturnQuestionnaireItemComponentR4() throws ResolveExpressionException { + void processItemShouldReturnQuestionnaireResponseItemComponentR4() { // setup final Questionnaire questionnaire = new Questionnaire(); doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); - final PopulateRequest prePopulateRequest = + final PopulateRequest populateRequest = newPopulateRequestForVersion(FhirVersionEnum.R4, libraryEngine, questionnaire); - final IBaseBackboneElement originalQuestionnaireItemComponent = new QuestionnaireItemComponent(); - final IBaseBackboneElement populatedQuestionnaireItemComponent = new QuestionnaireItemComponent(); + final IBaseBackboneElement originalQuestionnaireItemComponent = new QuestionnaireItemComponent().setLinkId("1"); + final CqfExpression expression = withExpression(); final List expressionResults = withExpressionResults(FhirVersionEnum.R4); - doReturn(populatedQuestionnaireItemComponent).when(fixture).copyItem(originalQuestionnaireItemComponent); + doReturn(expression) + .when(expressionProcessor) + .getItemInitialExpression(populateRequest, originalQuestionnaireItemComponent); doReturn(expressionResults) - .when(fixture) - .getExpressionResults(prePopulateRequest, originalQuestionnaireItemComponent); + .when(expressionProcessor) + .getExpressionResultForItem(populateRequest, expression, "1"); // execute - final IBaseBackboneElement actual = fixture.processItem(prePopulateRequest, originalQuestionnaireItemComponent); + final IBaseBackboneElement actual = + processItem.processItem(populateRequest, originalQuestionnaireItemComponent); // validate - verify(fixture).getExpressionResults(prePopulateRequest, originalQuestionnaireItemComponent); - verify(fixture).copyItem(originalQuestionnaireItemComponent); - final var extensions = prePopulateRequest.getExtensionsByUrl(actual, Constants.QUESTIONNAIRE_RESPONSE_AUTHOR); - assertEquals(1, extensions.size()); - final var initials = prePopulateRequest.resolvePathList(actual, "initial", IBaseBackboneElement.class); - assertEquals(3, initials.size()); - for (int i = 0; i < initials.size(); i++) { - assertEquals(expressionResults.get(i), prePopulateRequest.resolvePath(initials.get(i), "value")); + // verify(processItem).getInitialValue(populateRequest, originalQuestionnaireItemComponent); + // final var extensions = populateRequest.getExtensionsByUrl(actual, Constants.QUESTIONNAIRE_RESPONSE_AUTHOR); + // assertEquals(1, extensions.size()); + final var answers = populateRequest.resolvePathList(actual, "answer", IBaseBackboneElement.class); + assertEquals(3, answers.size()); + for (int i = 0; i < answers.size(); i++) { + assertEquals(expressionResults.get(i), populateRequest.resolvePath(answers.get(i), "value")); } } @Test - void processItemShouldReturnQuestionnaireItemComponentR5() throws ResolveExpressionException { + void processItemShouldReturnQuestionnaireResponseItemComponentR5() { // setup final org.hl7.fhir.r5.model.Questionnaire questionnaire = new org.hl7.fhir.r5.model.Questionnaire(); doReturn(FhirContext.forR5Cached()).when(repository).fhirContext(); - final PopulateRequest prePopulateRequest = + final PopulateRequest populateRequest = newPopulateRequestForVersion(FhirVersionEnum.R5, libraryEngine, questionnaire); final IBaseBackboneElement originalQuestionnaireItemComponent = - new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(); - final IBaseBackboneElement populatedQuestionnaireItemComponent = - new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(); + new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent().setLinkId("1"); + final CqfExpression expression = withExpression(); final List expressionResults = withExpressionResults(FhirVersionEnum.R5); - doReturn(populatedQuestionnaireItemComponent).when(fixture).copyItem(originalQuestionnaireItemComponent); + doReturn(expression) + .when(expressionProcessor) + .getItemInitialExpression(populateRequest, originalQuestionnaireItemComponent); doReturn(expressionResults) - .when(fixture) - .getExpressionResults(prePopulateRequest, originalQuestionnaireItemComponent); + .when(expressionProcessor) + .getExpressionResultForItem(populateRequest, expression, "1"); // execute - final IBaseBackboneElement actual = fixture.processItem(prePopulateRequest, originalQuestionnaireItemComponent); + final IBaseBackboneElement actual = + processItem.processItem(populateRequest, originalQuestionnaireItemComponent); // validate - verify(fixture).getExpressionResults(prePopulateRequest, originalQuestionnaireItemComponent); - verify(fixture).copyItem(originalQuestionnaireItemComponent); - final var extensions = prePopulateRequest.getExtensionsByUrl(actual, Constants.QUESTIONNAIRE_RESPONSE_AUTHOR); - assertEquals(1, extensions.size()); - final var initials = prePopulateRequest.resolvePathList(actual, "initial", IBaseBackboneElement.class); - assertEquals(3, initials.size()); - for (int i = 0; i < initials.size(); i++) { - assertEquals(expressionResults.get(i), prePopulateRequest.resolvePath(initials.get(i), "value")); + // verify(processItem).getInitialValue(populateRequest, originalQuestionnaireItemComponent); + // final var extensions = populateRequest.getExtensionsByUrl(actual, Constants.QUESTIONNAIRE_RESPONSE_AUTHOR); + // assertEquals(1, extensions.size()); + final var answers = populateRequest.resolvePathList(actual, "answer", IBaseBackboneElement.class); + assertEquals(3, answers.size()); + for (int i = 0; i < answers.size(); i++) { + assertEquals(expressionResults.get(i), populateRequest.resolvePath(answers.get(i), "value")); } } @@ -162,7 +164,7 @@ private List withExpressionResults(FhirVersionEnum fhirVersion) { } @Test - void getExpressionResultsShouldReturnEmptyListIfInitialExpressionIsNull() throws ResolveExpressionException { + void getExpressionResultsShouldReturnEmptyListIfInitialExpressionIsNull() { // setup final Questionnaire questionnaire = new Questionnaire(); doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); @@ -170,19 +172,18 @@ void getExpressionResultsShouldReturnEmptyListIfInitialExpressionIsNull() throws newPopulateRequestForVersion(FhirVersionEnum.R4, libraryEngine, questionnaire); final QuestionnaireItemComponent questionnaireItemComponent = new QuestionnaireItemComponent(); doReturn(null) - .when(expressionProcessorService) + .when(expressionProcessor) .getItemInitialExpression(prePopulateRequest, questionnaireItemComponent); // execute - final List actual = fixture.getExpressionResults(prePopulateRequest, questionnaireItemComponent); + final List actual = processItem.getInitialValue(prePopulateRequest, questionnaireItemComponent); // validate assertTrue(actual.isEmpty()); - verify(expressionProcessorService).getItemInitialExpression(prePopulateRequest, questionnaireItemComponent); - verify(expressionProcessorService, never()).getExpressionResultForItem(prePopulateRequest, null, "linkId"); + verify(expressionProcessor).getItemInitialExpression(prePopulateRequest, questionnaireItemComponent); + verify(expressionProcessor, never()).getExpressionResultForItem(prePopulateRequest, null, "linkId"); } @Test - void getExpressionResultsShouldReturnListOfResourcesIfInitialExpressionIsNotNull() - throws ResolveExpressionException { + void getExpressionResultsShouldReturnListOfResourcesIfInitialExpressionIsNotNull() { // setup final List expected = withExpressionResults(FhirVersionEnum.R4); final Questionnaire questionnaire = new Questionnaire(); @@ -193,17 +194,17 @@ void getExpressionResultsShouldReturnListOfResourcesIfInitialExpressionIsNotNull questionnaireItemComponent.setLinkId("linkId"); final CqfExpression expression = withExpression(); doReturn(expression) - .when(expressionProcessorService) + .when(expressionProcessor) .getItemInitialExpression(prePopulateRequest, questionnaireItemComponent); doReturn(expected) - .when(expressionProcessorService) + .when(expressionProcessor) .getExpressionResultForItem(prePopulateRequest, expression, "linkId"); // execute - final List actual = fixture.getExpressionResults(prePopulateRequest, questionnaireItemComponent); + final List actual = processItem.getInitialValue(prePopulateRequest, questionnaireItemComponent); // validate assertEquals(expected, actual); - verify(expressionProcessorService).getItemInitialExpression(prePopulateRequest, questionnaireItemComponent); - verify(expressionProcessorService).getExpressionResultForItem(prePopulateRequest, expression, "linkId"); + verify(expressionProcessor).getItemInitialExpression(prePopulateRequest, questionnaireItemComponent); + verify(expressionProcessor).getExpressionResultForItem(prePopulateRequest, expression, "linkId"); } private CqfExpression withExpression() { diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemWithContextTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemWithContextTests.java new file mode 100644 index 000000000..288463537 --- /dev/null +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessItemWithContextTests.java @@ -0,0 +1,77 @@ +package org.opencds.cqf.fhir.cr.questionnaire.populate; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.opencds.cqf.fhir.cr.helpers.RequestHelpers.newPopulateRequestForVersion; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; +import java.util.Arrays; +import java.util.List; +import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.r4.model.Extension; +import org.hl7.fhir.r4.model.OperationOutcome; +import org.hl7.fhir.r4.model.Questionnaire; +import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; +import org.hl7.fhir.r4.model.StringType; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; +import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.CqfExpression; + +@ExtendWith(MockitoExtension.class) +class ProcessItemWithContextTests { + @Mock + private Repository repository; + + @Mock + private ExpressionProcessor expressionProcessor; + + @Mock + private LibraryEngine libraryEngine; + + private ProcessItemWithContext processItemWithContext; + + @BeforeEach + void setup() { + processItemWithContext = new ProcessItemWithContext(expressionProcessor); + doReturn(repository).when(libraryEngine).getRepository(); + } + + @AfterEach + void tearDown() { + verifyNoMoreInteractions(expressionProcessor); + verifyNoMoreInteractions(libraryEngine); + } + + @Test + void testMissingProfileLogsException() { + var questionnaire = new Questionnaire(); + doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); + var populateRequest = newPopulateRequestForVersion(FhirVersionEnum.R4, libraryEngine, questionnaire); + var questionnaireItem = new QuestionnaireItemComponent().setLinkId("1").setDefinition("missing"); + var extensions = Arrays.asList(new Extension(Constants.SDC_QUESTIONNAIRE_ITEM_POPULATION_CONTEXT)); + questionnaireItem.setExtension(extensions); + var expression = new CqfExpression().setLanguage("text/cql").setExpression("%subject.name.given[0]"); + List expressionResults = Arrays.asList(new StringType("test")); + doReturn(expression) + .when(expressionProcessor) + .getCqfExpression(populateRequest, extensions, Constants.SDC_QUESTIONNAIRE_ITEM_POPULATION_CONTEXT); + doReturn(expressionResults) + .when(expressionProcessor) + .getExpressionResultForItem(populateRequest, expression, "1"); + processItemWithContext.processContextItem(populateRequest, questionnaireItem); + var operationOutcome = (OperationOutcome) populateRequest.getOperationOutcome(); + assertTrue(operationOutcome.hasIssue()); + assertEquals(2, operationOutcome.getIssue().size()); + } +} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessResponseItemTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessResponseItemTests.java deleted file mode 100644 index 7eb52af97..000000000 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaire/populate/ProcessResponseItemTests.java +++ /dev/null @@ -1,288 +0,0 @@ -package org.opencds.cqf.fhir.cr.questionnaire.populate; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.verify; -import static org.opencds.cqf.fhir.cr.helpers.RequestHelpers.newPopulateRequestForVersion; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; -import java.util.List; -import java.util.stream.Collectors; -import org.hl7.fhir.instance.model.api.IBaseBackboneElement; -import org.hl7.fhir.instance.model.api.IBaseDatatype; -import org.hl7.fhir.r4.model.Extension; -import org.hl7.fhir.r4.model.Questionnaire; -import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; -import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemInitialComponent; -import org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent; -import org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent; -import org.hl7.fhir.r4.model.StringType; -import org.hl7.fhir.r4.model.Type; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mock; -import org.mockito.Spy; -import org.mockito.junit.jupiter.MockitoExtension; -import org.opencds.cqf.fhir.api.Repository; -import org.opencds.cqf.fhir.cql.LibraryEngine; -import org.opencds.cqf.fhir.utility.Constants; - -@ExtendWith(MockitoExtension.class) -class ProcessResponseItemTests { - @Mock - private Repository repository; - - @Mock - private LibraryEngine libraryEngine; - - @Spy - private final ProcessResponseItem fixture = new ProcessResponseItem(); - - private final ProcessResponseItem processResponseItem = new ProcessResponseItem(); - - @BeforeEach - void setup() { - doReturn(repository).when(libraryEngine).getRepository(); - } - - @Test - void processResponseItemShouldSetBasePropertiesOnQuestionnaireResponseItemComponent() { - // setup - final String linkId = "linkId"; - final String definition = "definition"; - final StringType textElement = new StringType("textElement"); - final Questionnaire questionnaire = new Questionnaire(); - doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); - final PopulateRequest request = newPopulateRequestForVersion(FhirVersionEnum.R4, libraryEngine, questionnaire); - final IBaseBackboneElement questionnaireItem = new QuestionnaireItemComponent() - .setLinkId(linkId) - .setDefinition(definition) - .setTextElement(textElement); - // execute - final QuestionnaireResponseItemComponent actual = - (QuestionnaireResponseItemComponent) fixture.processResponseItem(request, questionnaireItem); - // validate - assertEquals(linkId, actual.getLinkId()); - assertEquals(definition, actual.getDefinition()); - assertEquals(textElement, actual.getTextElement()); - } - - @Test - void processResponseItemShouldProcessResponseItemsRecursivelyIfQuestionnaireItemHasItems() { - // setup - final Questionnaire questionnaire = new Questionnaire(); - doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); - final PopulateRequest request = newPopulateRequestForVersion(FhirVersionEnum.R4, libraryEngine, questionnaire); - final QuestionnaireItemComponent questionnaireItem = new QuestionnaireItemComponent(); - final List nestedQuestionnaireItems = List.of( - new QuestionnaireItemComponent().setLinkId("linkId1"), - new QuestionnaireItemComponent().setLinkId("linkId2"), - new QuestionnaireItemComponent().setLinkId("linkId3")); - questionnaireItem.setItem(nestedQuestionnaireItems); - List expectedResponseItems = List.of( - new QuestionnaireResponseItemComponent(), - new QuestionnaireResponseItemComponent(), - new QuestionnaireResponseItemComponent()); - doReturn(expectedResponseItems).when(fixture).processResponseItems(request, nestedQuestionnaireItems); - // execute - final QuestionnaireResponseItemComponent actual = - (QuestionnaireResponseItemComponent) fixture.processResponseItem(request, questionnaireItem); - // validate - verify(fixture).processResponseItems(request, nestedQuestionnaireItems); - assertEquals(3, actual.getItem().size()); - for (int i = 0; i < actual.getItem().size(); i++) { - assertEquals(expectedResponseItems.get(i), actual.getItem().get(i)); - } - } - - @Test - void processResponseItemShouldSetAnswersIfTheQuestionnaireItemHasInitialValuesDstu3() { - // setup - final FhirVersionEnum fhirVersion = FhirVersionEnum.DSTU3; - final org.hl7.fhir.dstu3.model.Questionnaire questionnaire = new org.hl7.fhir.dstu3.model.Questionnaire(); - doReturn(FhirContext.forDstu3Cached()).when(repository).fhirContext(); - final PopulateRequest request = newPopulateRequestForVersion(fhirVersion, libraryEngine, questionnaire); - final List expectedValues = withTypeValues(fhirVersion); - final IBaseBackboneElement questionnaireItemComponent = - withQuestionnaireItemComponentWithInitialValues(fhirVersion, expectedValues); - // execute - final IBaseBackboneElement actual = - processResponseItem.processResponseItem(request, questionnaireItemComponent); - // validate - validateQuestionnaireResponseItemAnswers(fhirVersion, expectedValues, actual); - } - - @Test - void processResponseItemShouldSetAnswersIfTheQuestionnaireItemHasInitialValuesR4() { - // setup - final FhirVersionEnum fhirVersion = FhirVersionEnum.R4; - final Questionnaire questionnaire = new Questionnaire(); - doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); - final PopulateRequest request = newPopulateRequestForVersion(fhirVersion, libraryEngine, questionnaire); - final List expectedValues = withTypeValues(fhirVersion); - final IBaseBackboneElement questionnaireItemComponent = - withQuestionnaireItemComponentWithInitialValues(fhirVersion, expectedValues); - // execute - final IBaseBackboneElement actual = - processResponseItem.processResponseItem(request, questionnaireItemComponent); - // validate - validateQuestionnaireResponseItemAnswers(fhirVersion, expectedValues, actual); - } - - @Test - void processResponseItemShouldSetAnswersIfTheQuestionnaireItemHasInitialValuesR5() { - // setup - final FhirVersionEnum fhirVersion = FhirVersionEnum.R5; - final org.hl7.fhir.r5.model.Questionnaire questionnaire = new org.hl7.fhir.r5.model.Questionnaire(); - doReturn(FhirContext.forR5Cached()).when(repository).fhirContext(); - final PopulateRequest request = newPopulateRequestForVersion(fhirVersion, libraryEngine, questionnaire); - final List expectedValues = withTypeValues(fhirVersion); - final IBaseBackboneElement questionnaireItemComponent = - withQuestionnaireItemComponentWithInitialValues(fhirVersion, expectedValues); - // execute - final IBaseBackboneElement actual = - processResponseItem.processResponseItem(request, questionnaireItemComponent); - // validate - validateQuestionnaireResponseItemAnswers(fhirVersion, expectedValues, actual); - } - - @Test - void setAnswersForInitialShouldPopulateQuestionnaireResponseItemWithAnswers() { - // setup - final FhirVersionEnum fhirVersion = FhirVersionEnum.R4; - final Questionnaire questionnaire = new Questionnaire(); - doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); - final PopulateRequest request = newPopulateRequestForVersion(fhirVersion, libraryEngine, questionnaire); - final var expectedValues = withTypeValues(fhirVersion); - final IBaseBackboneElement questionnaireItemComponent = - withQuestionnaireItemComponentWithInitialValues(fhirVersion, expectedValues); - // execute - final QuestionnaireResponseItemComponent actual = - (QuestionnaireResponseItemComponent) fixture.setAnswersForInitial( - request, questionnaireItemComponent, new QuestionnaireResponseItemComponent()); - // validate - validateQuestionnaireResponseItemAnswers(fhirVersion, expectedValues, actual); - } - - private void validateQuestionnaireResponseItemAnswers( - FhirVersionEnum fhirVersion, List expectedValues, IBaseBackboneElement responseItem) { - switch (fhirVersion) { - case DSTU3: - var dstu3Item = (org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent) - responseItem; - assertEquals(1, dstu3Item.getAnswer().size()); - for (int i = 0; i < dstu3Item.getAnswer().size(); i++) { - final List - answers = dstu3Item.getAnswer(); - assertEquals(expectedValues.get(i), answers.get(i).getValue()); - } - break; - case R4: - var r4Item = (QuestionnaireResponseItemComponent) responseItem; - assertEquals(3, r4Item.getAnswer().size()); - for (int i = 0; i < r4Item.getAnswer().size(); i++) { - final List answers = r4Item.getAnswer(); - assertEquals(expectedValues.get(i), answers.get(i).getValue()); - } - break; - case R5: - var r5Item = - (org.hl7.fhir.r5.model.QuestionnaireResponse.QuestionnaireResponseItemComponent) responseItem; - assertEquals(3, r5Item.getAnswer().size()); - for (int i = 0; i < r5Item.getAnswer().size(); i++) { - final List - answers = r5Item.getAnswer(); - assertEquals(expectedValues.get(i), answers.get(i).getValue()); - } - break; - - default: - break; - } - } - - @Test - void processResponseItemShouldAddExtensionIfResponseExtensionPresent() { - // setup - final Questionnaire questionnaire = new Questionnaire(); - doReturn(FhirContext.forR4Cached()).when(repository).fhirContext(); - final PopulateRequest request = newPopulateRequestForVersion(FhirVersionEnum.R4, libraryEngine, questionnaire); - final QuestionnaireItemComponent questionnaireItemComponent = new QuestionnaireItemComponent(); - final Extension extension = new Extension(Constants.QUESTIONNAIRE_RESPONSE_AUTHOR, new StringType("theAuthor")); - questionnaireItemComponent.addExtension(extension); - // execute - final QuestionnaireResponseItemComponent actual = - (QuestionnaireResponseItemComponent) fixture.processResponseItem(request, questionnaireItemComponent); - // validate - assertEquals(extension, actual.getExtensionByUrl(Constants.QUESTIONNAIRE_RESPONSE_AUTHOR)); - } - - private IBaseBackboneElement withQuestionnaireItemComponentWithInitialValues( - FhirVersionEnum fhirVersion, List initialValues) { - switch (fhirVersion) { - case DSTU3: - final var dstu3QuestionnaireItemComponent = - new org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent(); - dstu3QuestionnaireItemComponent.setInitial((org.hl7.fhir.dstu3.model.Type) initialValues.get(0)); - return dstu3QuestionnaireItemComponent; - case R4: - final var r4QuestionnaireItemComponent = new QuestionnaireItemComponent(); - final var r4InitialComponents = initialValues.stream() - .map(v -> (QuestionnaireItemInitialComponent) withInitialWithValue(fhirVersion, v)) - .collect(Collectors.toList()); - r4InitialComponents.forEach(r4QuestionnaireItemComponent::addInitial); - return r4QuestionnaireItemComponent; - case R5: - final var r5QuestionnaireItemComponent = - new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent(); - final var r5InitialComponents = initialValues.stream() - .map(v -> (org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemInitialComponent) - withInitialWithValue(fhirVersion, v)) - .collect(Collectors.toList()); - r5InitialComponents.forEach(r5QuestionnaireItemComponent::addInitial); - return r5QuestionnaireItemComponent; - - default: - return null; - } - } - - private IBaseBackboneElement withInitialWithValue(FhirVersionEnum fhirVersion, IBaseDatatype value) { - switch (fhirVersion) { - case R4: - final var r4InitialComponent = new QuestionnaireItemInitialComponent(); - r4InitialComponent.setValue((Type) value); - return r4InitialComponent; - case R5: - final var r5InitialComponent = - new org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemInitialComponent(); - r5InitialComponent.setValue((org.hl7.fhir.r5.model.DataType) value); - return r5InitialComponent; - - default: - return null; - } - } - - private List withTypeValues(FhirVersionEnum fhirVersion) { - switch (fhirVersion) { - case DSTU3: - return List.of(new org.hl7.fhir.dstu3.model.StringType("sample string")); - case R4: - return List.of( - new org.hl7.fhir.r4.model.BooleanType(true), - new org.hl7.fhir.r4.model.StringType("sample string"), - new org.hl7.fhir.r4.model.IntegerType(3)); - case R5: - return List.of( - new org.hl7.fhir.r5.model.BooleanType(true), - new org.hl7.fhir.r5.model.StringType("sample string"), - new org.hl7.fhir.r5.model.IntegerType(3)); - - default: - return null; - } - } -} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessorTests.java index 4a5bc9000..4cd6fa15c 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessorTests.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/QuestionnaireResponseProcessorTests.java @@ -1,11 +1,14 @@ package org.opencds.cqf.fhir.cr.questionnaireresponse; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.opencds.cqf.fhir.cr.questionnaireresponse.TestQuestionnaireResponse.given; import ca.uhn.fhir.context.FhirContext; import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.r4.model.Organization; import org.junit.jupiter.api.Test; import org.opencds.cqf.fhir.utility.BundleHelper; import org.opencds.cqf.fhir.utility.Ids; @@ -51,7 +54,7 @@ void definitionBasedExtraction() { .when() .questionnaireResponseId(questionnaireResponseId) .extract() - .hasEntry(2); + .hasEntry(4); } @Test @@ -99,4 +102,39 @@ void extractWithHiddenItems() { assertTrue(obs.hasSubject()); assertTrue(obs.hasValueBooleanType()); } + + @Test + void extractWithQuestionnaireUnitExt() { + var questionnaireResponseId = "NumericExtract"; + given().repositoryFor(fhirContextDstu3, "dstu3") + .when() + .questionnaireResponseId(questionnaireResponseId) + .extract() + .hasEntry(2); + given().repositoryFor(fhirContextR4, "r4") + .when() + .questionnaireResponseId(questionnaireResponseId) + .extract() + .hasEntry(2); + given().repositoryFor(fhirContextR5, "r5") + .when() + .questionnaireResponseId(questionnaireResponseId) + .extract() + .hasEntry(2); + } + + @Test + void itemExtractionContextAtRoot() { + var questionnaireResponseId = "definition-OPA-Patient1"; + var bundle = given().repositoryFor(fhirContextR4, "r4") + .when() + .questionnaireResponseId(questionnaireResponseId) + .extract() + .hasEntry(1) + .getBundle(); + var organization = (Organization) BundleHelper.getEntryResourceFirstRep(bundle); + assertNotNull(organization); + assertEquals(String.format("extract-%s", questionnaireResponseId), organization.getIdPart()); + assertEquals("Acme Clinic", organization.getName()); + } } diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/TestQuestionnaireResponse.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/TestQuestionnaireResponse.java index 3016a5b2d..d2ca71d67 100644 --- a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/TestQuestionnaireResponse.java +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/TestQuestionnaireResponse.java @@ -6,6 +6,8 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.parser.IParser; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; @@ -23,10 +25,16 @@ import org.skyscreamer.jsonassert.JSONAssert; public class TestQuestionnaireResponse { - public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/questionnaireresponse"; + public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/shared"; private static InputStream open(String asset) { - return TestQuestionnaireResponse.class.getResourceAsStream(asset); + var path = Paths.get(getResourcePath(TestQuestionnaireResponse.class) + "/" + CLASS_PATH + "/" + asset); + var file = path.toFile(); + try { + return new FileInputStream(file); + } catch (FileNotFoundException e) { + return null; + } } public static String load(InputStream asset) throws IOException { diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessDefinitionItemTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessDefinitionItemTests.java new file mode 100644 index 000000000..dee6f487d --- /dev/null +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessDefinitionItemTests.java @@ -0,0 +1,172 @@ +package org.opencds.cqf.fhir.cr.questionnaireresponse.extract; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.doThrow; +import static org.opencds.cqf.fhir.cr.helpers.RequestHelpers.newExtractRequestForVersion; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.context.FhirVersionEnum; +import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import org.hl7.fhir.instance.model.api.IBase; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.CodeType; +import org.hl7.fhir.r4.model.Condition; +import org.hl7.fhir.r4.model.Expression; +import org.hl7.fhir.r4.model.Extension; +import org.hl7.fhir.r4.model.Questionnaire; +import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; +import org.hl7.fhir.r4.model.QuestionnaireResponse; +import org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent; +import org.hl7.fhir.r4.model.Reference; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; +import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.CqfExpression; +import org.opencds.cqf.fhir.utility.Ids; + +@ExtendWith(MockitoExtension.class) +class ProcessDefinitionItemTests { + private final FhirContext fhirContextR4 = FhirContext.forR4Cached(); + + @Mock + private Repository repository; + + @Mock + ExpressionProcessor expressionProcessor; + + @Mock + private LibraryEngine libraryEngine; + + private ProcessDefinitionItem fixture; + + @BeforeEach + void setup() { + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(repository).when(libraryEngine).getRepository(); + fixture = new ProcessDefinitionItem(expressionProcessor); + } + + @Test + void testItemWithNoDefinitionThrows() { + var fhirVersion = FhirVersionEnum.R4; + var item = new QuestionnaireItemComponent(); + var responseItem = new QuestionnaireResponseItemComponent(); + var questionnaire = new Questionnaire(); + var response = new QuestionnaireResponse(); + var request = newExtractRequestForVersion(fhirVersion, libraryEngine, response, questionnaire); + var resources = new ArrayList(); + var subjectId = Ids.newId(fhirVersion, "Patient", "patient1"); + assertThrows( + IllegalArgumentException.class, + () -> fixture.processDefinitionItem(request, responseItem, item, resources, new Reference(subjectId))); + } + + @Test + void testItemWithContextExtensionWithType() { + var fhirVersion = FhirVersionEnum.R4; + var item = new QuestionnaireItemComponent().setLinkId("1"); + item.addExtension(Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT, new CodeType("Condition")); + var responseItem = new QuestionnaireResponseItemComponent().setLinkId("1"); + var questionnaire = new Questionnaire(); + var response = new QuestionnaireResponse(); + var request = newExtractRequestForVersion(fhirVersion, libraryEngine, response, questionnaire); + var resources = new ArrayList(); + var subjectId = Ids.newId(fhirVersion, "Patient", "patient1"); + fixture.processDefinitionItem(request, responseItem, item, resources, new Reference(subjectId)); + assertTrue(resources.size() == 1); + assertTrue(resources.get(0).fhirType().equals("Condition")); + } + + @Test + void testItemWithContextExtensionWithExpressionFailureThrows() { + var fhirVersion = FhirVersionEnum.R4; + var patientId = "patient1"; + var expression = new CqfExpression().setLanguage("text/fhirpath").setExpression("resource"); + var item = new QuestionnaireItemComponent().setLinkId("1"); + var extension = new Extension(Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT) + .setValue(new Expression() + .setLanguage(expression.getLanguage()) + .setExpression(expression.getExpression())); + item.addExtension(extension); + var responseItem = new QuestionnaireResponseItemComponent().setLinkId("1"); + var questionnaire = new Questionnaire(); + var response = new QuestionnaireResponse(); + var request = newExtractRequestForVersion(fhirVersion, libraryEngine, response, questionnaire); + var resources = new ArrayList(); + var subjectId = Ids.newId(fhirVersion, "Patient", patientId); + doThrow(UnprocessableEntityException.class) + .when(expressionProcessor) + .getExpressionResultForItem(eq(request), any(), eq("1")); + assertThrows( + IllegalArgumentException.class, + () -> fixture.processDefinitionItem(request, responseItem, item, resources, new Reference(subjectId))); + } + + @Test + void testItemWithContextExtensionWithResource() { + var fhirVersion = FhirVersionEnum.R4; + var patientId = "patient1"; + var expression = new CqfExpression().setLanguage("text/fhirpath").setExpression("resource"); + var item = new QuestionnaireItemComponent().setLinkId("1"); + var extension = new Extension(Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT) + .setValue(new Expression() + .setLanguage(expression.getLanguage()) + .setExpression(expression.getExpression())); + item.addExtension(extension); + var responseItem = new QuestionnaireResponseItemComponent().setLinkId("1"); + var questionnaire = new Questionnaire(); + var response = new QuestionnaireResponse(); + var request = newExtractRequestForVersion(fhirVersion, libraryEngine, response, questionnaire); + var resources = new ArrayList(); + var subjectId = Ids.newId(fhirVersion, "Patient", patientId); + var expectedCondition = (IBase) new Condition(); + doReturn(Collections.singletonList(expectedCondition)) + .when(expressionProcessor) + .getExpressionResultForItem(eq(request), any(), eq("1")); + fixture.processDefinitionItem(request, responseItem, item, resources, new Reference(subjectId)); + assertTrue(resources.size() == 1); + assertEquals(expectedCondition, resources.get(0)); + } + + @Test + void testItemWithContextExtensionWithMultipleResources() { + var fhirVersion = FhirVersionEnum.R4; + var patientId = "patient1"; + var expression = new CqfExpression().setLanguage("text/fhirpath").setExpression("resource"); + var item = new QuestionnaireItemComponent().setLinkId("1"); + var extension = new Extension(Constants.SDC_QUESTIONNAIRE_ITEM_EXTRACTION_CONTEXT) + .setValue(new Expression() + .setLanguage(expression.getLanguage()) + .setExpression(expression.getExpression())); + item.addExtension(extension); + var responseItem = new QuestionnaireResponseItemComponent().setLinkId("1"); + var questionnaire = new Questionnaire(); + var response = new QuestionnaireResponse(); + var request = newExtractRequestForVersion(fhirVersion, libraryEngine, response, questionnaire); + var resources = new ArrayList(); + var subjectId = Ids.newId(fhirVersion, "Patient", patientId); + var expectedCondition1 = (IBase) new Condition(); + var expectedCondition2 = (IBase) new Condition(); + List expectedConditions = Arrays.asList(expectedCondition1, expectedCondition2); + doReturn(expectedConditions).when(expressionProcessor).getExpressionResultForItem(eq(request), any(), eq("1")); + fixture.processDefinitionItem(request, responseItem, item, resources, new Reference(subjectId)); + assertTrue(resources.size() == 2); + assertEquals(expectedCondition1, resources.get(0)); + assertEquals(expectedCondition2, resources.get(1)); + } +} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessItemTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessItemTests.java new file mode 100644 index 000000000..b26c13209 --- /dev/null +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/questionnaireresponse/extract/ProcessItemTests.java @@ -0,0 +1,35 @@ +package org.opencds.cqf.fhir.cr.questionnaireresponse.extract; + +import static org.mockito.Mockito.doReturn; + +import ca.uhn.fhir.context.FhirContext; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.LibraryEngine; +import org.opencds.cqf.fhir.cr.common.ExpressionProcessor; + +@ExtendWith(MockitoExtension.class) +class ProcessItemTests { + private final FhirContext fhirContextR4 = FhirContext.forR4Cached(); + + @Mock + private Repository repository; + + @Mock + ExpressionProcessor expressionProcessor; + + @Mock + private LibraryEngine libraryEngine; + + private ProcessItem fixture; + + @BeforeEach + void setup() { + doReturn(fhirContextR4).when(repository).fhirContext(); + doReturn(repository).when(libraryEngine).getRepository(); + fixture = new ProcessItem(); + } +} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/valueset/TestValueSet.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/valueset/TestValueSet.java new file mode 100644 index 000000000..0e0a97440 --- /dev/null +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/valueset/TestValueSet.java @@ -0,0 +1,137 @@ +package org.opencds.cqf.fhir.cr.valueset; + +import static org.opencds.cqf.fhir.test.Resources.getResourcePath; + +import ca.uhn.fhir.context.FhirContext; +import java.nio.file.Paths; +import org.hl7.fhir.instance.model.api.IBaseParameters; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.instance.model.api.IIdType; +import org.hl7.fhir.instance.model.api.IPrimitiveType; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cql.EvaluationSettings; +import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings.SEARCH_FILTER_MODE; +import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings.TERMINOLOGY_FILTER_MODE; +import org.opencds.cqf.fhir.cql.engine.terminology.TerminologySettings.VALUESET_EXPANSION_MODE; +import org.opencds.cqf.fhir.cr.common.IDataRequirementsProcessor; +import org.opencds.cqf.fhir.cr.common.IPackageProcessor; +import org.opencds.cqf.fhir.cr.helpers.DataRequirementsLibrary; +import org.opencds.cqf.fhir.cr.helpers.GeneratedPackage; +import org.opencds.cqf.fhir.utility.monad.Eithers; +import org.opencds.cqf.fhir.utility.repository.ig.IgRepository; + +public class TestValueSet { + public static final String CLASS_PATH = "org/opencds/cqf/fhir/cr/shared"; + + public static Given given() { + return new Given(); + } + + public static class Given { + private Repository repository; + private EvaluationSettings evaluationSettings; + private IPackageProcessor packageProcessor; + private IDataRequirementsProcessor dataRequirementsProcessor; + + public Given repository(Repository repository) { + this.repository = repository; + return this; + } + + public Given repositoryFor(FhirContext fhirContext, String repositoryPath) { + this.repository = new IgRepository( + fhirContext, Paths.get(getResourcePath(this.getClass()) + "/" + CLASS_PATH + "/" + repositoryPath)); + return this; + } + + public Given evaluationSettings(EvaluationSettings evaluationSettings) { + this.evaluationSettings = evaluationSettings; + return this; + } + + public Given packageProcessor(IPackageProcessor packageProcessor) { + this.packageProcessor = packageProcessor; + return this; + } + + public Given dataRequirementsProcessor(IDataRequirementsProcessor dataRequirementsProcessor) { + this.dataRequirementsProcessor = dataRequirementsProcessor; + return this; + } + + public ValueSetProcessor buildProcessor(Repository repository) { + if (evaluationSettings == null) { + evaluationSettings = EvaluationSettings.getDefault(); + evaluationSettings + .getRetrieveSettings() + .setSearchParameterMode(SEARCH_FILTER_MODE.FILTER_IN_MEMORY) + .setTerminologyParameterMode(TERMINOLOGY_FILTER_MODE.FILTER_IN_MEMORY); + + evaluationSettings + .getTerminologySettings() + .setValuesetExpansionMode(VALUESET_EXPANSION_MODE.PERFORM_NAIVE_EXPANSION); + } + return new ValueSetProcessor(repository, evaluationSettings, packageProcessor, dataRequirementsProcessor); + } + + public When when() { + return new When(repository, buildProcessor(repository)); + } + } + + public static class When { + private final Repository repository; + private final ValueSetProcessor processor; + private IPrimitiveType valueSetUrl; + private IIdType valueSetId; + private IBaseResource valueSet; + private IBaseParameters parameters; + private Boolean isPut; + + When(Repository repository, ValueSetProcessor processor) { + this.repository = repository; + this.processor = processor; + } + + private FhirContext fhirContext() { + return repository.fhirContext(); + } + + public When valueSetUrl(IPrimitiveType url) { + valueSetUrl = url; + return this; + } + + public When valueSetId(IIdType id) { + valueSetId = id; + return this; + } + + public When valueSet(IBaseResource resource) { + valueSet = resource; + return this; + } + + public When parameters(IBaseParameters params) { + parameters = params; + return this; + } + + public When isPut(Boolean value) { + isPut = value; + return this; + } + + public GeneratedPackage thenPackage() { + var param = Eithers.for3(valueSetUrl, valueSetId, valueSet); + return new GeneratedPackage( + isPut == null ? processor.packageValueSet(param) : processor.packageValueSet(param, isPut), + fhirContext()); + } + + public DataRequirementsLibrary thenDataRequirements() { + var param = Eithers.for3(valueSetUrl, valueSetId, valueSet); + return new DataRequirementsLibrary(processor.dataRequirements(param, parameters)); + } + } +} diff --git a/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/valueset/ValueSetProcessorTests.java b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/valueset/ValueSetProcessorTests.java new file mode 100644 index 000000000..054c8e034 --- /dev/null +++ b/cqf-fhir-cr/src/test/java/org/opencds/cqf/fhir/cr/valueset/ValueSetProcessorTests.java @@ -0,0 +1,98 @@ +package org.opencds.cqf.fhir.cr.valueset; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.opencds.cqf.fhir.cr.valueset.TestValueSet.CLASS_PATH; +import static org.opencds.cqf.fhir.cr.valueset.TestValueSet.given; +import static org.opencds.cqf.fhir.test.Resources.getResourcePath; + +import ca.uhn.fhir.context.FhirContext; +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.cr.common.DataRequirementsProcessor; +import org.opencds.cqf.fhir.cr.common.PackageProcessor; +import org.opencds.cqf.fhir.utility.Ids; +import org.opencds.cqf.fhir.utility.repository.ig.IgRepository; + +class ValueSetProcessorTests { + private final FhirContext fhirContextDstu3 = FhirContext.forDstu3Cached(); + private final FhirContext fhirContextR4 = FhirContext.forR4Cached(); + private final FhirContext fhirContextR5 = FhirContext.forR5Cached(); + private final Repository repositoryDstu3 = new IgRepository( + fhirContextDstu3, Paths.get(getResourcePath(this.getClass()) + "/" + CLASS_PATH + "/dstu3")); + private final Repository repositoryR4 = + new IgRepository(fhirContextR4, Paths.get(getResourcePath(this.getClass()) + "/" + CLASS_PATH + "/r4")); + private final Repository repositoryR5 = + new IgRepository(fhirContextR5, Paths.get(getResourcePath(this.getClass()) + "/" + CLASS_PATH + "/r5")); + + @Test + void processors() { + var when = given().repository(repositoryR4) + .packageProcessor(new PackageProcessor(repositoryR4)) + .dataRequirementsProcessor(new DataRequirementsProcessor(repositoryR4)) + .when() + .valueSetId(Ids.newId(fhirContextR4, "ValueSet", "AdministrativeGender")) + .isPut(Boolean.FALSE); + var bundle = when.thenPackage().getBundle(); + assertNotNull(bundle); + var library = when.thenDataRequirements().getLibrary(); + assertNotNull(library); + } + + @Test + void packageDstu3() { + given().repository(repositoryDstu3) + .when() + .valueSetId(Ids.newId(fhirContextDstu3, "ValueSet", "AdministrativeGender")) + .thenPackage() + .hasEntry(1) + .firstEntryIsType(org.hl7.fhir.dstu3.model.ValueSet.class); + } + + @Test + void packageR4() { + given().repository(repositoryR4) + .when() + .valueSetId(Ids.newId(fhirContextR4, "ValueSet", "AdministrativeGender")) + .thenPackage() + .hasEntry(1) + .firstEntryIsType(org.hl7.fhir.r4.model.ValueSet.class); + } + + @Test + void packageR5() { + given().repository(repositoryR5) + .when() + .valueSetId(Ids.newId(fhirContextR5, "ValueSet", "AdministrativeGender")) + .thenPackage() + .hasEntry(1) + .firstEntryIsType(org.hl7.fhir.r5.model.ValueSet.class); + } + + @Test + void dataRequirementsDstu3() { + given().repositoryFor(fhirContextDstu3, "dstu3") + .when() + .valueSetId(Ids.newId(fhirContextDstu3, "ValueSet", "AdministrativeGender")) + .thenDataRequirements() + .hasDataRequirements(0); + } + + @Test + void dataRequirementsR4() { + given().repositoryFor(fhirContextR4, "r4") + .when() + .valueSetId(Ids.newId(fhirContextR4, "ValueSet", "AdministrativeGender")) + .thenDataRequirements() + .hasDataRequirements(0); + } + + @Test + void dataRequirementsR5() { + given().repositoryFor(fhirContextR5, "r5") + .when() + .valueSetId(Ids.newId(fhirContextR5, "ValueSet", "AdministrativeGender")) + .thenDataRequirements() + .hasDataRequirements(0); + } +} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-SendMessageActivity.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-SendMessageActivity.json deleted file mode 100644 index 263db4882..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-SendMessageActivity.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "resourceType": "ActivityDefinition", - "id": "SendMessageActivity", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-communicationactivity" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "publishable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "structured" - } - ], - "url": "http://example.org/ActivityDefinition/SendMessageActivity", - "version": "0.1.0", - "name": "SendMessageActivity", - "title": "ActivityDefinition SendMessageActivity", - "status": "draft", - "experimental": true, - "date": "2024-01-30T10:32:32-07:00", - "publisher": "Example Publisher", - "contact": [ - { - "name": "Example Publisher", - "telecom": [ - { - "system": "url", - "value": "http://example.org/example-publisher" - } - ] - } - ], - "description": "Example Activity Definition for a recommendation to send a message", - "jurisdiction": [ - { - "coding": [ - { - "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", - "code": "001", - "display": "World" - } - ] - } - ], - "kind": "CommunicationRequest", - "profile": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-communicationrequest", - "code": { - "coding": [ - { - "system": "http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-activity-type", - "code": "send-message", - "display": "Send a message" - } - ] - }, - "intent": "proposal", - "doNotPerform": false, - "dynamicValue": [ - { - "path": "payload[0].contentString", - "expression": { - "language": "text/fhirpath", - "expression": "'Greeting: Hello! ' + %subject.name.given.first() + ' Message: ' + %context.description + ' ' + %context.kind + ' Practitioner: ' + %practitioner.name.given.first()" - } - } - ] - } \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/vocabulary/ValueSet/ValueSet-birthsex.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/vocabulary/ValueSet/ValueSet-birthsex.json deleted file mode 100644 index 51230be3a..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/vocabulary/ValueSet/ValueSet-birthsex.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "birthsex", - "text": { - "status": "generated", - "div": "

Birth Sex

Codes for assigning sex at birth as specified by the Office of the National Coordinator for Health IT (ONC)

\n

This value set includes codes from the following code systems:

  • Include these codes as defined in http://terminology.hl7.org/CodeSystem/v3-AdministrativeGender
    CodeDisplay
    FFemaleFemale
    MMaleMale
  • Include these codes as defined in http://terminology.hl7.org/CodeSystem/v3-NullFlavor
    CodeDisplay
    UNKUnknownDescription:A proper value is applicable, but not known.
    \n \n Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless:
    \n \n Those properties themselves directly translate to a semantic of "unknown". (E.g. a local code sent as a translation that conveys 'unknown')\n Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of "H" and a URL prefix of "tel:" to convey that it is the home phone number that is unknown.)
" - }, - "url": "http://hl7.org/fhir/us/core/ValueSet/birthsex", - "identifier": [ - { - "system": "urn:ietf:rfc:3986", - "value": "urn:oid:2.16.840.1.113762.1.4.1021.24" - } - ], - "version": "3.1.0", - "name": "BirthSex", - "title": "Birth Sex", - "status": "active", - "date": "2019-05-21T00:00:00+10:00", - "publisher": "HL7 US Realm Steering Committee", - "contact": [ - { - "telecom": [ - { - "system": "other", - "value": "http://hl7.org/fhir" - } - ] - } - ], - "description": "Codes for assigning sex at birth as specified by the [Office of the National Coordinator for Health IT (ONC)](https://www.healthit.gov/newsroom/about-onc)", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "compose": { - "include": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-AdministrativeGender", - "concept": [ - { - "code": "F", - "display": "Female" - }, - { - "code": "M", - "display": "Male" - } - ] - }, - { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "concept": [ - { - "code": "UNK", - "display": "Unknown" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json deleted file mode 100644 index f885604a6..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOnePatient.json deleted file mode 100644 index 16f62e903..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOnePatient.json +++ /dev/null @@ -1,2465 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOnePatient", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Base.Individuals" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "normative" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", - "valueCode": "4.0.0" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 5 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "patient" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient", - "version": "4.3.0", - "name": "RouteOnePatient", - "title": "Beneficiary Information", - "status": "active", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "purpose": "Tracking patient is the center of the healthcare process.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "cda", - "uri": "http://hl7.org/v3/cda", - "name": "CDA (R2)" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - }, - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "loinc", - "uri": "http://loinc.org", - "name": "LOINC code for the element" - } - ], - "kind": "resource", - "abstract": false, - "type": "Patient", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Patient", - "path": "Patient", - "short": "Information about an individual or animal receiving health care services", - "definition": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "alias": [ - "SubjectOfCare Client Resident" - ], - "min": 0, - "max": "*", - "base": { - "path": "Patient", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "rim", - "map": "Patient[classCode=PAT]" - }, - { - "identity": "cda", - "map": "ClinicalDocument.recordTarget.patientRole" - }, - { - "identity": "w5", - "map": "administrative.individual" - } - ] - }, - { - "id": "Patient.id", - "path": "Patient.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Patient.meta", - "path": "Patient.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Patient.implicitRules", - "path": "Patient.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Patient.language", - "path": "Patient.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Patient.text", - "path": "Patient.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Patient.contained", - "path": "Patient.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Patient" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.extension", - "path": "Patient.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.modifierExtension", - "path": "Patient.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "short": "An identifier for this patient", - "definition": "An identifier for this patient.", - "requirements": "Patients are almost always assigned specific numerical identifiers.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.identifier" - }, - { - "identity": "v2", - "map": "PID-3" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": ".id" - } - ] - }, - { - "id": "Patient.active", - "path": "Patient.active", - "short": "Whether this patient's record is in active use", - "definition": "Whether this patient record is in active use. \nMany systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.\n\nIt is often used to filter patient lists to exclude inactive patients\n\nDeceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", - "comment": "If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient.", - "requirements": "Need to be able to mark a patient record as not to be used because it was created in error.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.active", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element", - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labelled as a modifier because it is a status element that can indicate that a record should not be treated as valid", - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.status" - }, - { - "identity": "rim", - "map": "statusCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.name", - "path": "Patient.name", - "short": "A name associated with the patient", - "definition": "A name associated with the individual.", - "comment": "A patient may have multiple names with different uses or applicable periods. For animals, the name is a \"HumanName\" in the sense that is assigned and used by humans and has the same patterns.", - "requirements": "Need to be able to track the patient by multiple names. Examples are your official name and a partner name.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.name", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-5, PID-9" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": ".patient.name" - } - ] - }, - { - "id": "Patient.telecom", - "path": "Patient.telecom", - "short": "A contact detail for the individual", - "definition": "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", - "comment": "A Patient may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and also to help with identification. The address might not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone).", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-13, PID-14, PID-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": ".telecom" - } - ] - }, - { - "id": "Patient.gender", - "path": "Patient.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", - "comment": "The gender might not match the biological sex as determined by genetics or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than male and female, though the vast majority of systems and contexts only support male and female. Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific sex or gender aspect of interest (anatomical, chromosomal, social, etc.) However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice. Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosomal and other gender aspects. For example, an alert about a hysterectomy on a male should be handled as a warning or overridable error, not a \"hard\" error. See the Patient Gender and Sex section for additional information about communicating patient gender and sex.", - "requirements": "Needed for identification of the individual, in combination with (at least) name and birth date.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-8" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": ".patient.administrativeGenderCode" - } - ] - }, - { - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "short": "The date of birth for the individual", - "definition": "The date of birth for the individual.", - "comment": "At least an estimated year should be provided as a guess if the real DOB is unknown There is a standard extension \"patient-birthTime\" available that should be used where Time is required (such as in maternity/infant care systems).", - "requirements": "Age of the individual drives many clinical processes.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.birthDate", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "date" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-7" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime" - }, - { - "identity": "cda", - "map": ".patient.birthTime" - }, - { - "identity": "loinc", - "map": "21112-8" - } - ] - }, - { - "id": "Patient.deceased[x]", - "path": "Patient.deceased[x]", - "short": "Indicates if the individual is deceased or not", - "definition": "Indicates if the individual is deceased or not.", - "comment": "If there's no value in the instance, it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive.", - "requirements": "The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.deceased[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - }, - { - "code": "dateTime" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labeled as a modifier because once a patient is marked as deceased, the actions that are appropriate to perform on the patient may be significantly different.", - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-30 (bool) and PID-29 (datetime)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.address", - "path": "Patient.address", - "short": "An address for the individual", - "definition": "An address for the individual.", - "comment": "Patient may have multiple addresses with different uses or applicable periods.", - "requirements": "May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.address", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-11" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": ".addr" - } - ] - }, - { - "id": "Patient.maritalStatus", - "path": "Patient.maritalStatus", - "short": "Marital (civil) status of a patient", - "definition": "This field contains a patient's most recent marital (civil) status.", - "requirements": "Most, if not all systems capture it.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.maritalStatus", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "MaritalStatus" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "extensible", - "description": "The domestic partnership status of a person.", - "valueSet": "http://hl7.org/fhir/ValueSet/marital-status" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-16" - }, - { - "identity": "rim", - "map": "player[classCode=PSN]/maritalStatusCode" - }, - { - "identity": "cda", - "map": ".patient.maritalStatusCode" - } - ] - }, - { - "id": "Patient.multipleBirth[x]", - "path": "Patient.multipleBirth[x]", - "short": "Whether patient is part of a multiple birth", - "definition": "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", - "comment": "Where the valueInteger is provided, the number is the birth number in the sequence. E.g. The middle birth in triplets would be valueInteger=2 and the third born would have valueInteger=3 If a boolean value was provided for this triplets example, then all 3 patient records would have valueBoolean=true (the ordering is not indicated).", - "requirements": "For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.multipleBirth[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - }, - { - "code": "integer" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-24 (bool), PID-25 (integer)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.photo", - "path": "Patient.photo", - "short": "Image of the patient", - "definition": "Image of the patient.", - "comment": "Guidelines:\n* Use id photos, not clinical photos.\n* Limit dimensions to thumbnail.\n* Keep byte count low to ease resource updates.", - "requirements": "Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.photo", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Attachment" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "OBX-5 - needs a profile" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Contact" - } - ], - "path": "Patient.contact", - "short": "A contact party (e.g. guardian, partner, friend) for the patient", - "definition": "A contact party (e.g. guardian, partner, friend) for the patient.", - "comment": "Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact.", - "requirements": "Need to track people you can contact about the patient.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "pat-1", - "severity": "error", - "human": "SHALL at least contain a contact's details or a reference to an organization", - "expression": "name.exists() or telecom.exists() or address.exists() or organization.exists()", - "xpath": "exists(f:name) or exists(f:telecom) or exists(f:address) or exists(f:organization)", - "source": "http://hl7.org/fhir/StructureDefinition/Patient" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.id", - "path": "Patient.contact.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.extension", - "path": "Patient.contact.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.modifierExtension", - "path": "Patient.contact.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.contact.relationship", - "path": "Patient.contact.relationship", - "short": "The kind of relationship", - "definition": "The nature of the relationship between the patient and the contact person.", - "requirements": "Used to determine which contact person is the most relevant to approach, depending on circumstances.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact.relationship", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ContactRelationship" - } - ], - "strength": "extensible", - "description": "The nature of the relationship between a patient and a contact person for that patient.", - "valueSet": "http://hl7.org/fhir/ValueSet/patient-contactrelationship" - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-7, NK1-3" - }, - { - "identity": "rim", - "map": "code" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.name", - "path": "Patient.contact.name", - "short": "A name associated with the contact person", - "definition": "A name associated with the contact person.", - "requirements": "Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.name", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-2" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.telecom", - "path": "Patient.contact.telecom", - "short": "A contact detail for the person", - "definition": "A contact detail for the person, e.g. a telephone number or an email address.", - "comment": "Contact may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently, and also to help with identification.", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-5, NK1-6, NK1-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.address", - "path": "Patient.contact.address", - "short": "Address for the contact person", - "definition": "Address for the contact person.", - "requirements": "Need to keep track where the contact person can be contacted per postal mail or visited.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.address", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-4" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.gender", - "path": "Patient.contact.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", - "requirements": "Needed to address the person correctly.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-15" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.organization", - "path": "Patient.contact.organization", - "short": "Organization that is associated with the contact", - "definition": "Organization on behalf of which the contact is acting or for which the contact is working.", - "requirements": "For guardians or business related contacts, the organization is relevant.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.organization", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "condition": [ - "pat-1" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-13, NK1-30, NK1-31, NK1-32, NK1-41" - }, - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.period", - "path": "Patient.contact.period", - "short": "The period during which this contact person or organization is valid to be contacted relating to this patient", - "definition": "The period during which this contact person or organization is valid to be contacted relating to this patient.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.period", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "effectiveTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication", - "path": "Patient.communication", - "short": "A language which may be used to communicate with the patient about his or her health", - "definition": "A language which may be used to communicate with the patient about his or her health.", - "comment": "If no language is specified, this *implies* that the default local language is spoken. If you need to convey proficiency for multiple modes, then you need multiple Patient.Communication associations. For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required.", - "requirements": "If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency are important things to keep track of both for patient and other persons of interest.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.communication", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "LanguageCommunication" - }, - { - "identity": "cda", - "map": "patient.languageCommunication" - } - ] - }, - { - "id": "Patient.communication.id", - "path": "Patient.communication.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.extension", - "path": "Patient.communication.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.modifierExtension", - "path": "Patient.communication.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.communication.language", - "path": "Patient.communication.language", - "short": "The language which can be used to communicate with the patient about his or her health", - "definition": "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", - "comment": "The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.", - "requirements": "Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.communication.language", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-15, LAN-2" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code" - }, - { - "identity": "cda", - "map": ".languageCode" - } - ] - }, - { - "id": "Patient.communication.preferred", - "path": "Patient.communication.preferred", - "short": "Language preference indicator", - "definition": "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", - "comment": "This language is specifically identified for communicating healthcare information.", - "requirements": "People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.communication.preferred", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-15" - }, - { - "identity": "rim", - "map": "preferenceInd" - }, - { - "identity": "cda", - "map": ".preferenceInd" - } - ] - }, - { - "id": "Patient.generalPractitioner", - "path": "Patient.generalPractitioner", - "short": "Patient's nominated primary care provider", - "definition": "Patient's nominated care provider.", - "comment": "This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disability setting, or even organization that will provide people to perform the care provider roles. It is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources.\nMultiple GPs may be recorded against the patient for various reasons, such as a student that has his home GP listed along with the GP at university during the school semesters, or a \"fly-in/fly-out\" worker that has the onsite GP also included with his home GP to remain aware of medical issues.\n\nJurisdictions may decide that they can profile this down to 1 if desired, or 1 per type.", - "alias": [ - "careProvider" - ], - "min": 0, - "max": "*", - "base": { - "path": "Patient.generalPractitioner", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization", - "http://hl7.org/fhir/StructureDefinition/Practitioner", - "http://hl7.org/fhir/StructureDefinition/PractitionerRole" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PD1-4" - }, - { - "identity": "rim", - "map": "subjectOf.CareEvent.performer.AssignedEntity" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.managingOrganization", - "path": "Patient.managingOrganization", - "short": "Organization that is the custodian of the patient record", - "definition": "Organization that is the custodian of the patient record.", - "comment": "There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association).", - "requirements": "Need to know who recognizes this patient record, manages and updates it.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.managingOrganization", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": ".providerOrganization" - } - ] - }, - { - "id": "Patient.link", - "path": "Patient.link", - "short": "Link to another patient resource that concerns the same actual person", - "definition": "Link to another patient resource that concerns the same actual patient.", - "comment": "There is no assumption that linked patient records have mutual links.", - "requirements": "There are multiple use cases: \n\n* Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and \n* Distribution of patient information across multiple servers.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.link", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labeled as a modifier because it might not be the main Patient resource, and the referenced patient should be used instead of this Patient record. This is when the link.type value is 'replaced-by'", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "outboundLink" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.id", - "path": "Patient.link.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.extension", - "path": "Patient.link.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.modifierExtension", - "path": "Patient.link.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.link.other", - "path": "Patient.link.other", - "short": "The other patient or related person resource that the link refers to", - "definition": "The other patient resource that the link refers to.", - "comment": "Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.link.other", - "min": 1, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy", - "valueBoolean": false - } - ], - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Patient", - "http://hl7.org/fhir/StructureDefinition/RelatedPerson" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-3, MRG-1" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.type", - "path": "Patient.link.type", - "short": "replaced-by | replaces | refer | seealso", - "definition": "The type of link between this patient resource and another patient resource.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.link.type", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "LinkType" - } - ], - "strength": "required", - "description": "The type of link between this patient resource and another patient resource.", - "valueSet": "http://hl7.org/fhir/ValueSet/link-type|4.3.0" - }, - "mapping": [ - { - "identity": "rim", - "map": "typeCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "id": "Patient.name", - "path": "Patient.name", - "label": "Patient Name", - "type": [ - { - "code": "HumanName" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.name.given", - "path": "Patient.name.given", - "label": "First Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.name.family", - "path": "Patient.name.family", - "label": "Last Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "label": "Date of Birth", - "min": 1, - "type": [ - { - "code": "date" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.gender", - "path": "Patient.gender", - "label": "Gender", - "min": 1, - "type": [ - { - "code": "code" - } - ], - "binding": { - "strength": "extensible", - "valueSet": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender" - } - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Patient.identifier:MedicareID", - "path": "Patient.identifier", - "sliceName": "MedicareID", - "min": 1, - "max": "1" - }, - { - "id": "Patient.identifier:MedicareID.system", - "path": "Patient.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://medicare.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.identifier:MedicareID.value", - "path": "Patient.identifier.value", - "label": "Medicare ID", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json deleted file mode 100644 index ba82b1a92..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "OutpatientPriorAuthorizationRequest-OPA-Patient1", - "questionnaire": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "status": "completed", - "subject": { - "reference": "Patient/OPA-Patient1" - }, - "authored": "2021-12-01", - "item": [ - { - "linkId": "1", - "definition": "http://hl7.org/fhir/Organization#Organization", - "text": "Facility Information", - "item": [ - { - "linkId": "1.1", - "definition": "http://hl7.org/fhir/Organization#Organization.name", - "text": "Name", - "answer": [ - { - "valueString": "Test Facility" - } - ] - }, - { - "linkId": "1.2", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "NPI", - "answer": [] - }, - { - "linkId": "1.3", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "PTAN", - "answer": [] - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "answer": [] - } - ] - }, - { - "linkId": "2", - "definition": "http://hl7.org/fhir/Patient#Patient", - "text": "Beneficiary Information", - "item": [ - { - "linkId": "2.1", - "definition": "http://hl7.org/fhir/Patient#Patient.name.given", - "text": "First Name", - "answer": [ - { - "valueString": "Test" - } - ] - }, - { - "linkId": "2.2", - "definition": "http://hl7.org/fhir/Patient#Patient.name.family", - "text": "Last Name", - "answer": [ - { - "valueString": "Man" - } - ] - }, - { - "linkId": "2.3", - "definition": "http://hl7.org/fhir/Patient#Patient.birthDate", - "text": "Date of Birth", - "answer": [ - { - "valueDate": "1950-01-01" - } - ] - }, - { - "linkId": "2.4.0", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.system", - "answer": [ - { - "valueUri": "http://hl7.org/fhir/sid/us-medicare" - } - ] - }, - { - "linkId": "2.4", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.value", - "text": "Medicare ID", - "answer": [ - { - "valueString": "123456789" - } - ] - }, - { - "linkId": "2.5", - "definition": "http://hl7.org/fhir/Patient#Patient.gender", - "text": "Gender", - "answer": [ - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json deleted file mode 100644 index 368f36d5f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "sdc-profile-example-multi-subject", - "questionnaire": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-profile-example-multi-subject", - "status": "completed", - "subject": { - "reference": "http://example.org/fhir/Patient/12345" - }, - "authored": "2021-12-01T00:00:00-07:00", - "item": [ - { - "linkId": "1", - "text": "Mother's name", - "answer": [ - { - "valueString": "Chioma Abubakar" - } - ] - }, - { - "linkId": "2", - "code": [ - { - "system": "", - "code": "", - "display": "" - } - ], - "text": "Mother's id", - "answer": [ - { - "valueString": "12345" - } - ] - }, - { - "linkId": "3", - "code": [ - { - "system": "", - "code": "", - "display": "" - } - ], - "text": "Height", - "answer": [ - { - "valueQuantity": { - "value": 141, - "system": "http://unitsofmeasure.org", - "code": "cm" - } - } - ] - }, - { - "linkId": "4", - "code": [ - { - "system": "", - "code": "", - "display": "" - } - ], - "text": "Weight", - "answer": [ - { - "valueQuantity": { - "value": 42.3, - "system": "http://unitsofmeasure.org", - "code": "kg" - } - } - ] - }, - { - "linkId": "5", - "text": "Children", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse-isSubject", - "valueBoolean": true - } - ], - "linkId": "5.1", - "text": "Record", - "answer": [ - { - "valueReference": { - "reference": "http://example.org/fhir/Patient/123456" - } - } - ] - }, - { - "linkId": "5.2", - "text": "Name", - "answer": [ - { - "valueString": "Bolade" - } - ] - }, - { - "linkId": "5.3", - "text": "Birth date", - "answer": [ - { - "valueDate": "2020-05-17" - } - ] - }, - { - "linkId": "5.4", - "text": "Height", - "answer": [ - { - "valueQuantity": { - "value": 47, - "system": "http://unitsofmeasure.org", - "code": "cm" - } - } - ] - }, - { - "linkId": "5.5", - "text": "Weight", - "answer": [ - { - "valueQuantity": { - "value": 8.7, - "system": "http://unitsofmeasure.org", - "code": "kg" - } - } - ] - } - ] - }, - { - "linkId": "5", - "text": "Children", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse-isSubject", - "valueBoolean": true - } - ], - "linkId": "5.1", - "text": "Record", - "answer": [ - { - "valueReference": { - "reference": "http://example.org/fhir/Patient/123456" - } - } - ] - }, - { - "linkId": "5.2", - "text": "Name", - "answer": [ - { - "valueString": "Obinna" - } - ] - }, - { - "linkId": "5.3", - "text": "Birth date", - "answer": [ - { - "valueDate": "2015-11-20" - } - ] - }, - { - "linkId": "5.4", - "text": "Height", - "answer": [ - { - "valueQuantity": { - "value": 109, - "system": "http://unitsofmeasure.org", - "code": "cm" - } - } - ] - }, - { - "linkId": "5.5", - "text": "Weight", - "answer": [ - { - "valueQuantity": { - "value": 27.3, - "system": "http://unitsofmeasure.org", - "code": "kg" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/vocabulary/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/vocabulary/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/vocabulary/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/cql/FHIRHelpers.cql deleted file mode 100644 index e941c378b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/cql/FHIRHelpers.cql +++ /dev/null @@ -1,807 +0,0 @@ -library FHIRHelpers version '4.0.001' - -using FHIR version '4.0.1' - -context Patient - -define function "ToInterval"(period FHIR.Period): - if period is null then null - else Interval[period."start".value, period."end".value] - -define function "ToQuantity"(quantity FHIR.Quantity): - if quantity is null then null - else System.Quantity { value: quantity.value.value, unit: quantity.unit.value } - -define function "ToRatio"(ratio FHIR.Ratio): - if ratio is null then null - else System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -define function "ToInterval"(range FHIR.Range): - if range is null then null - else Interval[ToQuantity(range.low), ToQuantity(range.high)] - -define function "ToCode"(coding FHIR.Coding): - if coding is null then null - else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value } - -define function "ToConcept"(concept FHIR.CodeableConcept): - if concept is null then null - else System.Concept { codes: concept.coding C - return ToCode(C), display: concept.text.value } - -define function "ToString"(value AccountStatus): - value.value - -define function "ToString"(value ActionCardinalityBehavior): - value.value - -define function "ToString"(value ActionConditionKind): - value.value - -define function "ToString"(value ActionGroupingBehavior): - value.value - -define function "ToString"(value ActionParticipantType): - value.value - -define function "ToString"(value ActionPrecheckBehavior): - value.value - -define function "ToString"(value ActionRelationshipType): - value.value - -define function "ToString"(value ActionRequiredBehavior): - value.value - -define function "ToString"(value ActionSelectionBehavior): - value.value - -define function "ToString"(value ActivityDefinitionKind): - value.value - -define function "ToString"(value ActivityParticipantType): - value.value - -define function "ToString"(value AddressType): - value.value - -define function "ToString"(value AddressUse): - value.value - -define function "ToString"(value AdministrativeGender): - value.value - -define function "ToString"(value AdverseEventActuality): - value.value - -define function "ToString"(value AggregationMode): - value.value - -define function "ToString"(value AllergyIntoleranceCategory): - value.value - -define function "ToString"(value AllergyIntoleranceCriticality): - value.value - -define function "ToString"(value AllergyIntoleranceSeverity): - value.value - -define function "ToString"(value AllergyIntoleranceType): - value.value - -define function "ToString"(value AppointmentStatus): - value.value - -define function "ToString"(value AssertionDirectionType): - value.value - -define function "ToString"(value AssertionOperatorType): - value.value - -define function "ToString"(value AssertionResponseTypes): - value.value - -define function "ToString"(value AuditEventAction): - value.value - -define function "ToString"(value AuditEventAgentNetworkType): - value.value - -define function "ToString"(value AuditEventOutcome): - value.value - -define function "ToString"(value BindingStrength): - value.value - -define function "ToString"(value BiologicallyDerivedProductCategory): - value.value - -define function "ToString"(value BiologicallyDerivedProductStatus): - value.value - -define function "ToString"(value BiologicallyDerivedProductStorageScale): - value.value - -define function "ToString"(value BundleType): - value.value - -define function "ToString"(value CapabilityStatementKind): - value.value - -define function "ToString"(value CarePlanActivityKind): - value.value - -define function "ToString"(value CarePlanActivityStatus): - value.value - -define function "ToString"(value CarePlanIntent): - value.value - -define function "ToString"(value CarePlanStatus): - value.value - -define function "ToString"(value CareTeamStatus): - value.value - -define function "ToString"(value CatalogEntryRelationType): - value.value - -define function "ToString"(value ChargeItemDefinitionPriceComponentType): - value.value - -define function "ToString"(value ChargeItemStatus): - value.value - -define function "ToString"(value ClaimResponseStatus): - value.value - -define function "ToString"(value ClaimStatus): - value.value - -define function "ToString"(value ClinicalImpressionStatus): - value.value - -define function "ToString"(value CodeSearchSupport): - value.value - -define function "ToString"(value CodeSystemContentMode): - value.value - -define function "ToString"(value CodeSystemHierarchyMeaning): - value.value - -define function "ToString"(value CommunicationPriority): - value.value - -define function "ToString"(value CommunicationRequestStatus): - value.value - -define function "ToString"(value CommunicationStatus): - value.value - -define function "ToString"(value CompartmentCode): - value.value - -define function "ToString"(value CompartmentType): - value.value - -define function "ToString"(value CompositionAttestationMode): - value.value - -define function "ToString"(value CompositionStatus): - value.value - -define function "ToString"(value ConceptMapEquivalence): - value.value - -define function "ToString"(value ConceptMapGroupUnmappedMode): - value.value - -define function "ToString"(value ConditionalDeleteStatus): - value.value - -define function "ToString"(value ConditionalReadStatus): - value.value - -define function "ToString"(value ConsentDataMeaning): - value.value - -define function "ToString"(value ConsentProvisionType): - value.value - -define function "ToString"(value ConsentState): - value.value - -define function "ToString"(value ConstraintSeverity): - value.value - -define function "ToString"(value ContactPointSystem): - value.value - -define function "ToString"(value ContactPointUse): - value.value - -define function "ToString"(value ContractPublicationStatus): - value.value - -define function "ToString"(value ContractStatus): - value.value - -define function "ToString"(value ContributorType): - value.value - -define function "ToString"(value CoverageStatus): - value.value - -define function "ToString"(value CurrencyCode): - value.value - -define function "ToString"(value DayOfWeek): - value.value - -define function "ToString"(value DaysOfWeek): - value.value - -define function "ToString"(value DetectedIssueSeverity): - value.value - -define function "ToString"(value DetectedIssueStatus): - value.value - -define function "ToString"(value DeviceMetricCalibrationState): - value.value - -define function "ToString"(value DeviceMetricCalibrationType): - value.value - -define function "ToString"(value DeviceMetricCategory): - value.value - -define function "ToString"(value DeviceMetricColor): - value.value - -define function "ToString"(value DeviceMetricOperationalStatus): - value.value - -define function "ToString"(value DeviceNameType): - value.value - -define function "ToString"(value DeviceRequestStatus): - value.value - -define function "ToString"(value DeviceUseStatementStatus): - value.value - -define function "ToString"(value DiagnosticReportStatus): - value.value - -define function "ToString"(value DiscriminatorType): - value.value - -define function "ToString"(value DocumentConfidentiality): - value.value - -define function "ToString"(value DocumentMode): - value.value - -define function "ToString"(value DocumentReferenceStatus): - value.value - -define function "ToString"(value DocumentRelationshipType): - value.value - -define function "ToString"(value EligibilityRequestPurpose): - value.value - -define function "ToString"(value EligibilityRequestStatus): - value.value - -define function "ToString"(value EligibilityResponsePurpose): - value.value - -define function "ToString"(value EligibilityResponseStatus): - value.value - -define function "ToString"(value EnableWhenBehavior): - value.value - -define function "ToString"(value EncounterLocationStatus): - value.value - -define function "ToString"(value EncounterStatus): - value.value - -define function "ToString"(value EndpointStatus): - value.value - -define function "ToString"(value EnrollmentRequestStatus): - value.value - -define function "ToString"(value EnrollmentResponseStatus): - value.value - -define function "ToString"(value EpisodeOfCareStatus): - value.value - -define function "ToString"(value EventCapabilityMode): - value.value - -define function "ToString"(value EventTiming): - value.value - -define function "ToString"(value EvidenceVariableType): - value.value - -define function "ToString"(value ExampleScenarioActorType): - value.value - -define function "ToString"(value ExplanationOfBenefitStatus): - value.value - -define function "ToString"(value ExposureState): - value.value - -define function "ToString"(value ExtensionContextType): - value.value - -define function "ToString"(value FHIRAllTypes): - value.value - -define function "ToString"(value FHIRDefinedType): - value.value - -define function "ToString"(value FHIRDeviceStatus): - value.value - -define function "ToString"(value FHIRResourceType): - value.value - -define function "ToString"(value FHIRSubstanceStatus): - value.value - -define function "ToString"(value FHIRVersion): - value.value - -define function "ToString"(value FamilyHistoryStatus): - value.value - -define function "ToString"(value FilterOperator): - value.value - -define function "ToString"(value FlagStatus): - value.value - -define function "ToString"(value GoalLifecycleStatus): - value.value - -define function "ToString"(value GraphCompartmentRule): - value.value - -define function "ToString"(value GraphCompartmentUse): - value.value - -define function "ToString"(value GroupMeasure): - value.value - -define function "ToString"(value GroupType): - value.value - -define function "ToString"(value GuidanceResponseStatus): - value.value - -define function "ToString"(value GuidePageGeneration): - value.value - -define function "ToString"(value GuideParameterCode): - value.value - -define function "ToString"(value HTTPVerb): - value.value - -define function "ToString"(value IdentifierUse): - value.value - -define function "ToString"(value IdentityAssuranceLevel): - value.value - -define function "ToString"(value ImagingStudyStatus): - value.value - -define function "ToString"(value ImmunizationEvaluationStatus): - value.value - -define function "ToString"(value ImmunizationStatus): - value.value - -define function "ToString"(value InvoicePriceComponentType): - value.value - -define function "ToString"(value InvoiceStatus): - value.value - -define function "ToString"(value IssueSeverity): - value.value - -define function "ToString"(value IssueType): - value.value - -define function "ToString"(value LinkType): - value.value - -define function "ToString"(value LinkageType): - value.value - -define function "ToString"(value ListMode): - value.value - -define function "ToString"(value ListStatus): - value.value - -define function "ToString"(value LocationMode): - value.value - -define function "ToString"(value LocationStatus): - value.value - -define function "ToString"(value MeasureReportStatus): - value.value - -define function "ToString"(value MeasureReportType): - value.value - -define function "ToString"(value MediaStatus): - value.value - -define function "ToString"(value MedicationAdministrationStatus): - value.value - -define function "ToString"(value MedicationDispenseStatus): - value.value - -define function "ToString"(value MedicationKnowledgeStatus): - value.value - -define function "ToString"(value MedicationRequestIntent): - value.value - -define function "ToString"(value MedicationRequestPriority): - value.value - -define function "ToString"(value MedicationRequestStatus): - value.value - -define function "ToString"(value MedicationStatementStatus): - value.value - -define function "ToString"(value MedicationStatus): - value.value - -define function "ToString"(value MessageSignificanceCategory): - value.value - -define function "ToString"(value Messageheader_Response_Request): - value.value - -define function "ToString"(value MimeType): - value.value - -define function "ToString"(value NameUse): - value.value - -define function "ToString"(value NamingSystemIdentifierType): - value.value - -define function "ToString"(value NamingSystemType): - value.value - -define function "ToString"(value NarrativeStatus): - value.value - -define function "ToString"(value NoteType): - value.value - -define function "ToString"(value NutritiionOrderIntent): - value.value - -define function "ToString"(value NutritionOrderStatus): - value.value - -define function "ToString"(value ObservationDataType): - value.value - -define function "ToString"(value ObservationRangeCategory): - value.value - -define function "ToString"(value ObservationStatus): - value.value - -define function "ToString"(value OperationKind): - value.value - -define function "ToString"(value OperationParameterUse): - value.value - -define function "ToString"(value OrientationType): - value.value - -define function "ToString"(value ParameterUse): - value.value - -define function "ToString"(value ParticipantRequired): - value.value - -define function "ToString"(value ParticipantStatus): - value.value - -define function "ToString"(value ParticipationStatus): - value.value - -define function "ToString"(value PaymentNoticeStatus): - value.value - -define function "ToString"(value PaymentReconciliationStatus): - value.value - -define function "ToString"(value ProcedureStatus): - value.value - -define function "ToString"(value PropertyRepresentation): - value.value - -define function "ToString"(value PropertyType): - value.value - -define function "ToString"(value ProvenanceEntityRole): - value.value - -define function "ToString"(value PublicationStatus): - value.value - -define function "ToString"(value QualityType): - value.value - -define function "ToString"(value QuantityComparator): - value.value - -define function "ToString"(value QuestionnaireItemOperator): - value.value - -define function "ToString"(value QuestionnaireItemType): - value.value - -define function "ToString"(value QuestionnaireResponseStatus): - value.value - -define function "ToString"(value ReferenceHandlingPolicy): - value.value - -define function "ToString"(value ReferenceVersionRules): - value.value - -define function "ToString"(value ReferredDocumentStatus): - value.value - -define function "ToString"(value RelatedArtifactType): - value.value - -define function "ToString"(value RemittanceOutcome): - value.value - -define function "ToString"(value RepositoryType): - value.value - -define function "ToString"(value RequestIntent): - value.value - -define function "ToString"(value RequestPriority): - value.value - -define function "ToString"(value RequestStatus): - value.value - -define function "ToString"(value ResearchElementType): - value.value - -define function "ToString"(value ResearchStudyStatus): - value.value - -define function "ToString"(value ResearchSubjectStatus): - value.value - -define function "ToString"(value ResourceType): - value.value - -define function "ToString"(value ResourceVersionPolicy): - value.value - -define function "ToString"(value ResponseType): - value.value - -define function "ToString"(value RestfulCapabilityMode): - value.value - -define function "ToString"(value RiskAssessmentStatus): - value.value - -define function "ToString"(value SPDXLicense): - value.value - -define function "ToString"(value SearchComparator): - value.value - -define function "ToString"(value SearchEntryMode): - value.value - -define function "ToString"(value SearchModifierCode): - value.value - -define function "ToString"(value SearchParamType): - value.value - -define function "ToString"(value SectionMode): - value.value - -define function "ToString"(value SequenceType): - value.value - -define function "ToString"(value ServiceRequestIntent): - value.value - -define function "ToString"(value ServiceRequestPriority): - value.value - -define function "ToString"(value ServiceRequestStatus): - value.value - -define function "ToString"(value SlicingRules): - value.value - -define function "ToString"(value SlotStatus): - value.value - -define function "ToString"(value SortDirection): - value.value - -define function "ToString"(value SpecimenContainedPreference): - value.value - -define function "ToString"(value SpecimenStatus): - value.value - -define function "ToString"(value Status): - value.value - -define function "ToString"(value StrandType): - value.value - -define function "ToString"(value StructureDefinitionKind): - value.value - -define function "ToString"(value StructureMapContextType): - value.value - -define function "ToString"(value StructureMapGroupTypeMode): - value.value - -define function "ToString"(value StructureMapInputMode): - value.value - -define function "ToString"(value StructureMapModelMode): - value.value - -define function "ToString"(value StructureMapSourceListMode): - value.value - -define function "ToString"(value StructureMapTargetListMode): - value.value - -define function "ToString"(value StructureMapTransform): - value.value - -define function "ToString"(value SubscriptionChannelType): - value.value - -define function "ToString"(value SubscriptionStatus): - value.value - -define function "ToString"(value SupplyDeliveryStatus): - value.value - -define function "ToString"(value SupplyRequestStatus): - value.value - -define function "ToString"(value SystemRestfulInteraction): - value.value - -define function "ToString"(value TaskIntent): - value.value - -define function "ToString"(value TaskPriority): - value.value - -define function "ToString"(value TaskStatus): - value.value - -define function "ToString"(value TestReportActionResult): - value.value - -define function "ToString"(value TestReportParticipantType): - value.value - -define function "ToString"(value TestReportResult): - value.value - -define function "ToString"(value TestReportStatus): - value.value - -define function "ToString"(value TestScriptRequestMethodCode): - value.value - -define function "ToString"(value TriggerType): - value.value - -define function "ToString"(value TypeDerivationRule): - value.value - -define function "ToString"(value TypeRestfulInteraction): - value.value - -define function "ToString"(value UDIEntryType): - value.value - -define function "ToString"(value UnitsOfTime): - value.value - -define function "ToString"(value Use): - value.value - -define function "ToString"(value VariableType): - value.value - -define function "ToString"(value VisionBase): - value.value - -define function "ToString"(value VisionEyes): - value.value - -define function "ToString"(value VisionStatus): - value.value - -define function "ToString"(value XPathUsageType): - value.value - -define function "ToString"(value base64Binary): - value.value - -define function "ToString"(value id): - value.value - -define function "ToBoolean"(value boolean): - value.value - -define function "ToDate"(value date): - value.value - -define function "ToDateTime"(value dateTime): - value.value - -define function "ToDecimal"(value decimal): - value.value - -define function "ToDateTime"(value instant): - value.value - -define function "ToInteger"(value integer): - value.value - -define function "ToString"(value string): - value.value - -define function "ToTime"(value time): - value.value - -define function "ToString"(value uri): - value.value - -define function "ToString"(value xhtml): - value.value \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneAttending.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneAttending.json deleted file mode 100644 index 4125ae3a5..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneAttending.json +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOneAttending", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Base.Individuals" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "trial-use" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 3 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "individual" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending", - "version": "4.3.0", - "name": "RouteOneAttendingPractitioner", - "title": "Attending Physician Information", - "status": "draft", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "A person who is directly or indirectly involved in the provisioning of healthcare.", - "purpose": "Need to track doctors, staff, locums etc. for both healthcare practitioners, funders, etc.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "servd", - "uri": "http://www.omg.org/spec/ServD/1.0/", - "name": "ServD" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - } - ], - "kind": "resource", - "abstract": false, - "type": "Practitioner", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Practitioner", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Practitioner", - "path": "Practitioner", - "short": "A person with a formal responsibility in the provisioning of healthcare or related services", - "definition": "A person who is directly or indirectly involved in the provisioning of healthcare.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "v2", - "map": "PRD (as one example)" - }, - { - "identity": "rim", - "map": "Role" - }, - { - "identity": "servd", - "map": "Provider" - }, - { - "identity": "w5", - "map": "administrative.individual" - } - ] - }, - { - "id": "Practitioner.id", - "path": "Practitioner.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Practitioner.meta", - "path": "Practitioner.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Practitioner.implicitRules", - "path": "Practitioner.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Practitioner.language", - "path": "Practitioner.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Practitioner.text", - "path": "Practitioner.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Practitioner.contained", - "path": "Practitioner.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Practitioner" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.extension", - "path": "Practitioner.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.modifierExtension", - "path": "Practitioner.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.identifier", - "path": "Practitioner.identifier", - "short": "An identifier for the person as this agent", - "definition": "An identifier that applies to this person in this role.", - "requirements": "Often, specific identities are assigned for the agent.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.identifier" - }, - { - "identity": "v2", - "map": "PRD-7 (or XCN.1)" - }, - { - "identity": "rim", - "map": "./id" - }, - { - "identity": "servd", - "map": "./Identifiers" - } - ] - }, - { - "id": "Practitioner.active", - "path": "Practitioner.active", - "short": "Whether this practitioner's record is in active use", - "definition": "Whether this practitioner's record is in active use.", - "comment": "If the practitioner is not in use by one organization, then it should mark the period on the PractitonerRole with an end date (even if they are active) as they may be active in another role.", - "requirements": "Need to be able to mark a practitioner record as not to be used because it was created in error.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.active", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element", - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.status" - }, - { - "identity": "rim", - "map": "./statusCode" - } - ] - }, - { - "id": "Practitioner.name", - "path": "Practitioner.name", - "short": "The name(s) associated with the practitioner", - "definition": "The name(s) associated with the practitioner.", - "comment": "The selection of the use property should ensure that there is a single usual name specified, and others use the nickname (alias), old, or other values as appropriate. \r\rIn general, select the value to be used in the ResourceReference.display based on this:\r\r1. There is more than 1 name\r2. Use = usual\r3. Period is current to the date of the usage\r4. Use = official\r5. Other order as decided by internal business rules.", - "requirements": "The name(s) that a Practitioner is known by. Where there are multiple, the name that the practitioner is usually known as should be used in the display.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.name", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "XCN Components" - }, - { - "identity": "rim", - "map": "./name" - }, - { - "identity": "servd", - "map": "./PreferredName (GivenNames, FamilyName, TitleCode)" - } - ] - }, - { - "id": "Practitioner.telecom", - "path": "Practitioner.telecom", - "short": "A contact detail for the practitioner (that apply to all roles)", - "definition": "A contact detail for the practitioner, e.g. a telephone number or an email address.", - "comment": "Person may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and to help with identification. These typically will have home numbers, or mobile numbers that are not role specific.", - "requirements": "Need to know how to reach a practitioner independent to any roles the practitioner may have.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PRT-15, STF-10, ROL-12" - }, - { - "identity": "rim", - "map": "./telecom" - }, - { - "identity": "servd", - "map": "./ContactPoints" - } - ] - }, - { - "id": "Practitioner.address", - "path": "Practitioner.address", - "short": "Address(es) of the practitioner that are not role specific (typically home address)", - "definition": "Address(es) of the practitioner that are not role specific (typically home address). \rWork addresses are not typically entered in this property as they are usually role dependent.", - "comment": "The PractitionerRole does not have an address value on it, as it is expected that the location property be used for this purpose (which has an address).", - "requirements": "The home/mailing address of the practitioner is often required for employee administration purposes, and also for some rostering services where the start point (practitioners home) can be used in calculations.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.address", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "ORC-24, STF-11, ROL-11, PRT-14" - }, - { - "identity": "rim", - "map": "./addr" - }, - { - "identity": "servd", - "map": "./Addresses" - } - ] - }, - { - "id": "Practitioner.gender", - "path": "Practitioner.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", - "requirements": "Needed to address the person correctly.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "STF-5" - }, - { - "identity": "rim", - "map": "./administrativeGender" - }, - { - "identity": "servd", - "map": "./GenderCode" - } - ] - }, - { - "id": "Practitioner.birthDate", - "path": "Practitioner.birthDate", - "short": "The date on which the practitioner was born", - "definition": "The date of birth for the practitioner.", - "requirements": "Needed for identification.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.birthDate", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "date" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "STF-6" - }, - { - "identity": "rim", - "map": "./birthTime" - }, - { - "identity": "servd", - "map": "(not represented in ServD)" - } - ] - }, - { - "id": "Practitioner.photo", - "path": "Practitioner.photo", - "short": "Image of the person", - "definition": "Image of the person.", - "requirements": "Many EHR systems have the capability to capture an image of patients and personnel. Fits with newer social media usage too.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.photo", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Attachment" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "./subjectOf/ObservationEvent[code=\"photo\"]/value" - }, - { - "identity": "servd", - "map": "./ImageURI (only supports the URI reference)" - } - ] - }, - { - "id": "Practitioner.qualification", - "path": "Practitioner.qualification", - "short": "Certification, licenses, or training pertaining to the provision of care", - "definition": "The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.qualification", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "CER?" - }, - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].code" - }, - { - "identity": "servd", - "map": "./Qualifications" - } - ] - }, - { - "id": "Practitioner.qualification.id", - "path": "Practitioner.qualification.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Practitioner.qualification.extension", - "path": "Practitioner.qualification.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Practitioner.qualification.modifierExtension", - "path": "Practitioner.qualification.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.qualification.identifier", - "path": "Practitioner.qualification.identifier", - "short": "An identifier for this qualification for the practitioner", - "definition": "An identifier that applies to this person's qualification in this role.", - "requirements": "Often, specific identities are assigned for the qualification.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.qualification.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].id" - } - ] - }, - { - "id": "Practitioner.qualification.code", - "path": "Practitioner.qualification.code", - "short": "Coded representation of the qualification", - "definition": "Coded representation of the qualification.", - "min": 1, - "max": "1", - "base": { - "path": "Practitioner.qualification.code", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Qualification" - } - ], - "strength": "example", - "description": "Specific qualification the practitioner has to provide a service.", - "valueSet": "http://terminology.hl7.org/ValueSet/v2-2.7-0360" - }, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].code" - }, - { - "identity": "servd", - "map": "./Qualifications.Value" - } - ] - }, - { - "id": "Practitioner.qualification.period", - "path": "Practitioner.qualification.period", - "short": "Period during which the qualification is valid", - "definition": "Period during which the qualification is valid.", - "requirements": "Qualifications are often for a limited period of time, and can be revoked.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.qualification.period", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].effectiveTime" - }, - { - "identity": "servd", - "map": "./Qualifications.StartDate and ./Qualifications.EndDate" - } - ] - }, - { - "id": "Practitioner.qualification.issuer", - "path": "Practitioner.qualification.issuer", - "short": "Organization that regulates and issues the qualification", - "definition": "Organization that regulates and issues the qualification.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.qualification.issuer", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].scoper" - } - ] - }, - { - "id": "Practitioner.communication", - "path": "Practitioner.communication", - "short": "A language the practitioner can use in patient communication", - "definition": "A language the practitioner can use in patient communication.", - "comment": "The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.", - "requirements": "Knowing which language a practitioner speaks can help in facilitating communication with patients.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.communication", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-15, NK1-20, LAN-2" - }, - { - "identity": "rim", - "map": "./languageCommunication" - }, - { - "identity": "servd", - "map": "./Languages.LanguageSpokenCode" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.name.given", - "path": "Practitioner.name.given", - "label": "First Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.name.family", - "path": "Practitioner.name.family", - "label": "Last Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Practitioner.identifier", - "path": "Practitioner.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Practitioner.identifier:NPI", - "path": "Practitioner.identifier", - "sliceName": "NPI", - "min": 1, - "max": "1" - }, - { - "id": "Practitioner.identifier:yNPI.system", - "path": "Practitioner.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://npi.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.identifier:NPI.value", - "path": "Practitioner.identifier.value", - "label": "NPI", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Practitioner.identifier:PTAN", - "path": "Practitioner.identifier", - "sliceName": "PTAN", - "min": 1, - "max": "1" - }, - { - "id": "Practitioner.identifier:PTAN.system", - "path": "Practitioner.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://ptan.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.identifier:PTAN.value", - "path": "Practitioner.identifier.value", - "label": "PTAN", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOperating.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOperating.json deleted file mode 100644 index 6090434a0..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOperating.json +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOneOperating", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Base.Individuals" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "trial-use" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 3 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "individual" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating", - "version": "4.3.0", - "name": "RouteOneOperatingPractitioner", - "title": "Operation Physician Information", - "status": "draft", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "A person who is directly or indirectly involved in the provisioning of healthcare.", - "purpose": "Need to track doctors, staff, locums etc. for both healthcare practitioners, funders, etc.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "servd", - "uri": "http://www.omg.org/spec/ServD/1.0/", - "name": "ServD" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - } - ], - "kind": "resource", - "abstract": false, - "type": "Practitioner", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Practitioner", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Practitioner", - "path": "Practitioner", - "short": "A person with a formal responsibility in the provisioning of healthcare or related services", - "definition": "A person who is directly or indirectly involved in the provisioning of healthcare.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "v2", - "map": "PRD (as one example)" - }, - { - "identity": "rim", - "map": "Role" - }, - { - "identity": "servd", - "map": "Provider" - }, - { - "identity": "w5", - "map": "administrative.individual" - } - ] - }, - { - "id": "Practitioner.id", - "path": "Practitioner.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Practitioner.meta", - "path": "Practitioner.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Practitioner.implicitRules", - "path": "Practitioner.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Practitioner.language", - "path": "Practitioner.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Practitioner.text", - "path": "Practitioner.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Practitioner.contained", - "path": "Practitioner.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Practitioner" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.extension", - "path": "Practitioner.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.modifierExtension", - "path": "Practitioner.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.identifier", - "path": "Practitioner.identifier", - "short": "An identifier for the person as this agent", - "definition": "An identifier that applies to this person in this role.", - "requirements": "Often, specific identities are assigned for the agent.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.identifier" - }, - { - "identity": "v2", - "map": "PRD-7 (or XCN.1)" - }, - { - "identity": "rim", - "map": "./id" - }, - { - "identity": "servd", - "map": "./Identifiers" - } - ] - }, - { - "id": "Practitioner.active", - "path": "Practitioner.active", - "short": "Whether this practitioner's record is in active use", - "definition": "Whether this practitioner's record is in active use.", - "comment": "If the practitioner is not in use by one organization, then it should mark the period on the PractitonerRole with an end date (even if they are active) as they may be active in another role.", - "requirements": "Need to be able to mark a practitioner record as not to be used because it was created in error.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.active", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element", - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.status" - }, - { - "identity": "rim", - "map": "./statusCode" - } - ] - }, - { - "id": "Practitioner.name", - "path": "Practitioner.name", - "short": "The name(s) associated with the practitioner", - "definition": "The name(s) associated with the practitioner.", - "comment": "The selection of the use property should ensure that there is a single usual name specified, and others use the nickname (alias), old, or other values as appropriate. \r\rIn general, select the value to be used in the ResourceReference.display based on this:\r\r1. There is more than 1 name\r2. Use = usual\r3. Period is current to the date of the usage\r4. Use = official\r5. Other order as decided by internal business rules.", - "requirements": "The name(s) that a Practitioner is known by. Where there are multiple, the name that the practitioner is usually known as should be used in the display.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.name", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "XCN Components" - }, - { - "identity": "rim", - "map": "./name" - }, - { - "identity": "servd", - "map": "./PreferredName (GivenNames, FamilyName, TitleCode)" - } - ] - }, - { - "id": "Practitioner.telecom", - "path": "Practitioner.telecom", - "short": "A contact detail for the practitioner (that apply to all roles)", - "definition": "A contact detail for the practitioner, e.g. a telephone number or an email address.", - "comment": "Person may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and to help with identification. These typically will have home numbers, or mobile numbers that are not role specific.", - "requirements": "Need to know how to reach a practitioner independent to any roles the practitioner may have.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PRT-15, STF-10, ROL-12" - }, - { - "identity": "rim", - "map": "./telecom" - }, - { - "identity": "servd", - "map": "./ContactPoints" - } - ] - }, - { - "id": "Practitioner.address", - "path": "Practitioner.address", - "short": "Address(es) of the practitioner that are not role specific (typically home address)", - "definition": "Address(es) of the practitioner that are not role specific (typically home address). \rWork addresses are not typically entered in this property as they are usually role dependent.", - "comment": "The PractitionerRole does not have an address value on it, as it is expected that the location property be used for this purpose (which has an address).", - "requirements": "The home/mailing address of the practitioner is often required for employee administration purposes, and also for some rostering services where the start point (practitioners home) can be used in calculations.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.address", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "ORC-24, STF-11, ROL-11, PRT-14" - }, - { - "identity": "rim", - "map": "./addr" - }, - { - "identity": "servd", - "map": "./Addresses" - } - ] - }, - { - "id": "Practitioner.gender", - "path": "Practitioner.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", - "requirements": "Needed to address the person correctly.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "STF-5" - }, - { - "identity": "rim", - "map": "./administrativeGender" - }, - { - "identity": "servd", - "map": "./GenderCode" - } - ] - }, - { - "id": "Practitioner.birthDate", - "path": "Practitioner.birthDate", - "short": "The date on which the practitioner was born", - "definition": "The date of birth for the practitioner.", - "requirements": "Needed for identification.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.birthDate", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "date" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "STF-6" - }, - { - "identity": "rim", - "map": "./birthTime" - }, - { - "identity": "servd", - "map": "(not represented in ServD)" - } - ] - }, - { - "id": "Practitioner.photo", - "path": "Practitioner.photo", - "short": "Image of the person", - "definition": "Image of the person.", - "requirements": "Many EHR systems have the capability to capture an image of patients and personnel. Fits with newer social media usage too.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.photo", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Attachment" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "./subjectOf/ObservationEvent[code=\"photo\"]/value" - }, - { - "identity": "servd", - "map": "./ImageURI (only supports the URI reference)" - } - ] - }, - { - "id": "Practitioner.qualification", - "path": "Practitioner.qualification", - "short": "Certification, licenses, or training pertaining to the provision of care", - "definition": "The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner. For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.qualification", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "CER?" - }, - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].code" - }, - { - "identity": "servd", - "map": "./Qualifications" - } - ] - }, - { - "id": "Practitioner.qualification.id", - "path": "Practitioner.qualification.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Practitioner.qualification.extension", - "path": "Practitioner.qualification.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Practitioner.qualification.modifierExtension", - "path": "Practitioner.qualification.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Practitioner.qualification.identifier", - "path": "Practitioner.qualification.identifier", - "short": "An identifier for this qualification for the practitioner", - "definition": "An identifier that applies to this person's qualification in this role.", - "requirements": "Often, specific identities are assigned for the qualification.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.qualification.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].id" - } - ] - }, - { - "id": "Practitioner.qualification.code", - "path": "Practitioner.qualification.code", - "short": "Coded representation of the qualification", - "definition": "Coded representation of the qualification.", - "min": 1, - "max": "1", - "base": { - "path": "Practitioner.qualification.code", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Qualification" - } - ], - "strength": "example", - "description": "Specific qualification the practitioner has to provide a service.", - "valueSet": "http://terminology.hl7.org/ValueSet/v2-2.7-0360" - }, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].code" - }, - { - "identity": "servd", - "map": "./Qualifications.Value" - } - ] - }, - { - "id": "Practitioner.qualification.period", - "path": "Practitioner.qualification.period", - "short": "Period during which the qualification is valid", - "definition": "Period during which the qualification is valid.", - "requirements": "Qualifications are often for a limited period of time, and can be revoked.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.qualification.period", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].effectiveTime" - }, - { - "identity": "servd", - "map": "./Qualifications.StartDate and ./Qualifications.EndDate" - } - ] - }, - { - "id": "Practitioner.qualification.issuer", - "path": "Practitioner.qualification.issuer", - "short": "Organization that regulates and issues the qualification", - "definition": "Organization that regulates and issues the qualification.", - "min": 0, - "max": "1", - "base": { - "path": "Practitioner.qualification.issuer", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".playingEntity.playingRole[classCode=QUAL].scoper" - } - ] - }, - { - "id": "Practitioner.communication", - "path": "Practitioner.communication", - "short": "A language the practitioner can use in patient communication", - "definition": "A language the practitioner can use in patient communication.", - "comment": "The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.", - "requirements": "Knowing which language a practitioner speaks can help in facilitating communication with patients.", - "min": 0, - "max": "*", - "base": { - "path": "Practitioner.communication", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-15, NK1-20, LAN-2" - }, - { - "identity": "rim", - "map": "./languageCommunication" - }, - { - "identity": "servd", - "map": "./Languages.LanguageSpokenCode" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.name.given", - "path": "Practitioner.name.given", - "label": "First Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.name.family", - "path": "Practitioner.name.family", - "label": "Last Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Practitioner.identifier", - "path": "Practitioner.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Practitioner.identifier:NPI", - "path": "Practitioner.identifier", - "sliceName": "NPI", - "min": 1, - "max": "1" - }, - { - "id": "Practitioner.identifier:yNPI.system", - "path": "Practitioner.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://npi.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.identifier:NPI.value", - "path": "Practitioner.identifier.value", - "label": "NPI", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Practitioner.identifier:PTAN", - "path": "Practitioner.identifier", - "sliceName": "PTAN", - "min": 1, - "max": "1" - }, - { - "id": "Practitioner.identifier:PTAN.system", - "path": "Practitioner.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://ptan.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Practitioner.identifier:PTAN.value", - "path": "Practitioner.identifier.value", - "label": "PTAN", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOrganization.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOrganization.json deleted file mode 100644 index 33daa518b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOrganization.json +++ /dev/null @@ -1,1461 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOneOrganization", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Base.Entities" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "trial-use" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 3 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "business" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization", - "version": "4.3.0", - "name": "RouteOneOrganization", - "title": "Facility Information", - "status": "draft", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "servd", - "uri": "http://www.omg.org/spec/ServD/1.0/", - "name": "ServD" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - } - ], - "kind": "resource", - "abstract": false, - "type": "Organization", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Organization", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Organization", - "path": "Organization", - "short": "A grouping of people or organizations with a common purpose", - "definition": "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.", - "min": 0, - "max": "*", - "base": { - "path": "Organization", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "org-1", - "severity": "error", - "human": "The organization SHALL at least have a name or an identifier, and possibly more than one", - "expression": "(identifier.count() + name.count()) > 0", - "xpath": "count(f:identifier | f:name) > 0", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "v2", - "map": "(also see master files messages)" - }, - { - "identity": "rim", - "map": "Organization(classCode=ORG, determinerCode=INST)" - }, - { - "identity": "servd", - "map": "Organization" - }, - { - "identity": "w5", - "map": "administrative.group" - } - ] - }, - { - "id": "Organization.id", - "path": "Organization.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Organization.meta", - "path": "Organization.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Organization.implicitRules", - "path": "Organization.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Organization.language", - "path": "Organization.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Organization.text", - "path": "Organization.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Organization.contained", - "path": "Organization.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.extension", - "path": "Organization.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.modifierExtension", - "path": "Organization.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.identifier", - "path": "Organization.identifier", - "short": "Identifies this organization across multiple systems", - "definition": "Identifier for the organization that is used to identify the organization across multiple disparate systems.", - "requirements": "Organizations are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the organization.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "condition": [ - "org-1" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.identifier" - }, - { - "identity": "v2", - "map": "XON.10 / XON.3" - }, - { - "identity": "rim", - "map": ".scopes[Role](classCode=IDENT)" - }, - { - "identity": "servd", - "map": "./Identifiers" - } - ] - }, - { - "id": "Organization.active", - "path": "Organization.active", - "short": "Whether the organization's record is still in active use", - "definition": "Whether the organization's record is still in active use.", - "comment": "This active flag is not intended to be used to mark an organization as temporarily closed or under construction. Instead the Location(s) within the Organization should have the suspended status. If further details of the reason for the suspension are required, then an extension on this element should be used.\n\nThis element is labeled as a modifier because it may be used to mark that the resource was created in error.", - "requirements": "Need a flag to indicate a record is no longer to be used and should generally be hidden for the user in the UI.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.active", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element", - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labelled as a modifier because it is a status element that can indicate that a record should not be treated as valid", - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.status" - }, - { - "identity": "v2", - "map": "No equivalent in HL7 v2" - }, - { - "identity": "rim", - "map": ".status" - }, - { - "identity": "servd", - "map": "./Status (however this concept in ServD more covers why the organization is active or not, could be delisted, deregistered, not operational yet) this could alternatively be derived from ./StartDate and ./EndDate and given a context date." - } - ] - }, - { - "id": "Organization.type", - "path": "Organization.type", - "short": "Kind of organization", - "definition": "The kind(s) of organization that this is.", - "comment": "Organizations can be corporations, wards, sections, clinical teams, government departments, etc. Note that code is generally a classifier of the type of organization; in many applications, codes are used to identity a particular organization (say, ward) as opposed to another of the same type - these are identifiers, not codes\n\nWhen considering if multiple types are appropriate, you should evaluate if child organizations would be a more appropriate use of the concept, as different types likely are in different sub-areas of the organization. This is most likely to be used where type values have orthogonal values, such as a religious, academic and medical center.\n\nWe expect that some jurisdictions will profile this optionality to be a single cardinality.", - "requirements": "Need to be able to track the kind of organization that this is - different organization types have different uses.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.type", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "OrganizationType" - } - ], - "strength": "example", - "description": "Used to categorize the organization.", - "valueSet": "http://hl7.org/fhir/ValueSet/organization-type" - }, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.class" - }, - { - "identity": "v2", - "map": "No equivalent in v2" - }, - { - "identity": "rim", - "map": ".code" - }, - { - "identity": "servd", - "map": "n/a" - } - ] - }, - { - "id": "Organization.name", - "path": "Organization.name", - "short": "Name used for the organization", - "definition": "A name associated with the organization.", - "comment": "If the name of an organization changes, consider putting the old name in the alias column so that it can still be located through searches.", - "requirements": "Need to use the name as the label of the organization.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.name", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "string" - } - ], - "condition": [ - "org-1" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "XON.1" - }, - { - "identity": "rim", - "map": ".name" - }, - { - "identity": "servd", - "map": ".PreferredName/Name" - } - ] - }, - { - "id": "Organization.alias", - "path": "Organization.alias", - "short": "A list of alternate names that the organization is known as, or was known as in the past", - "definition": "A list of alternate names that the organization is known as, or was known as in the past.", - "comment": "There are no dates associated with the alias/historic names, as this is not intended to track when names were used, but to assist in searching so that older names can still result in identifying the organization.", - "requirements": "Over time locations and organizations go through many changes and can be known by different names.\n\nFor searching knowing previous names that the organization was known by can be very useful.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.alias", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "string" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".name" - } - ] - }, - { - "id": "Organization.telecom", - "path": "Organization.telecom", - "short": "A contact detail for the organization", - "definition": "A contact detail for the organization.", - "comment": "The use code 'home' is not to be used. Note that these contacts are not the contact details of people who are employed by or represent the organization, but official contacts for the organization itself.", - "requirements": "Human contact for the organization.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "condition": [ - "org-3" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "org-3", - "severity": "error", - "human": "The telecom of an organization can never be of use 'home'", - "expression": "where(use = 'home').empty()", - "xpath": "count(f:use[@value='home']) = 0", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "ORC-22?" - }, - { - "identity": "rim", - "map": ".telecom" - }, - { - "identity": "servd", - "map": "./ContactPoints" - } - ] - }, - { - "id": "Organization.address", - "path": "Organization.address", - "short": "An address for the organization", - "definition": "An address for the organization.", - "comment": "Organization may have multiple addresses with different uses or applicable periods. The use code 'home' is not to be used.", - "requirements": "May need to keep track of the organization's addresses for contacting, billing or reporting requirements.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.address", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Address" - } - ], - "condition": [ - "org-2" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "org-2", - "severity": "error", - "human": "An address of an organization can never be of use 'home'", - "expression": "where(use = 'home').empty()", - "xpath": "count(f:use[@value='home']) = 0", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "ORC-23?" - }, - { - "identity": "rim", - "map": ".address" - }, - { - "identity": "servd", - "map": "./PrimaryAddress and ./OtherAddresses" - } - ] - }, - { - "id": "Organization.partOf", - "path": "Organization.partOf", - "short": "The organization of which this organization forms a part", - "definition": "The organization of which this organization forms a part.", - "requirements": "Need to be able to track the hierarchy of organizations within an organization.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.partOf", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy", - "valueBoolean": true - } - ], - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "No equivalent in HL7 v2" - }, - { - "identity": "rim", - "map": ".playedBy[classCode=Part].scoper" - }, - { - "identity": "servd", - "map": "n/a" - } - ] - }, - { - "id": "Organization.contact", - "path": "Organization.contact", - "short": "Contact for the organization for a certain purpose", - "definition": "Contact for the organization for a certain purpose.", - "comment": "Where multiple contacts for the same purpose are provided there is a standard extension that can be used to determine which one is the preferred contact to use.", - "requirements": "Need to keep track of assigned contact points within bigger organization.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.contact", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".contactParty" - } - ] - }, - { - "id": "Organization.contact.id", - "path": "Organization.contact.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Organization.contact.extension", - "path": "Organization.contact.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Organization.contact.modifierExtension", - "path": "Organization.contact.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.contact.purpose", - "path": "Organization.contact.purpose", - "short": "The type of contact", - "definition": "Indicates a purpose for which the contact can be reached.", - "requirements": "Need to distinguish between multiple contact persons.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.contact.purpose", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ContactPartyType" - } - ], - "strength": "extensible", - "description": "The purpose for which you would contact a contact party.", - "valueSet": "http://hl7.org/fhir/ValueSet/contactentity-type" - }, - "mapping": [ - { - "identity": "rim", - "map": "./type" - } - ] - }, - { - "id": "Organization.contact.name", - "path": "Organization.contact.name", - "short": "A name associated with the contact", - "definition": "A name associated with the contact.", - "requirements": "Need to be able to track the person by name.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.contact.name", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-5, PID-9" - }, - { - "identity": "rim", - "map": "./name" - } - ] - }, - { - "id": "Organization.contact.telecom", - "path": "Organization.contact.telecom", - "short": "Contact details (telephone, email, etc.) for a contact", - "definition": "A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.contact.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-13, PID-14" - }, - { - "identity": "rim", - "map": "./telecom" - } - ] - }, - { - "id": "Organization.contact.address", - "path": "Organization.contact.address", - "short": "Visiting or postal addresses for the contact", - "definition": "Visiting or postal addresses for the contact.", - "requirements": "May need to keep track of a contact party's address for contacting, billing or reporting requirements.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.contact.address", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-11" - }, - { - "identity": "rim", - "map": "./addr" - } - ] - }, - { - "id": "Organization.endpoint", - "path": "Organization.endpoint", - "short": "Technical endpoints providing access to services operated for the organization", - "definition": "Technical endpoints providing access to services operated for the organization.", - "requirements": "Organizations have multiple systems that provide various services and need to be able to define the technical connection details for how to connect to them, and for what purpose.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.endpoint", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Endpoint" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Organization.name", - "path": "Organization.name", - "label": "Name", - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Organization.identifier", - "path": "Organization.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Organization.identifier:FacilityNPI", - "path": "Organization.identifier", - "sliceName": "FacilityNPI", - "min": 1, - "max": "1" - }, - { - "id": "Organization.identifier:FacilityNPI.system", - "path": "Organization.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://npi.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Organization.identifier:FacilityNPI.value", - "path": "Organization.identifier.value", - "label": "Facility NPI", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Organization.identifier:FacilityPTAN", - "path": "Organization.identifier", - "sliceName": "FacilityPTAN", - "min": 1, - "max": "1" - }, - { - "id": "Organization.identifier:FacilityPTAN.system", - "path": "Organization.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://ptan.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Organization.identifier:FacilityPTAN.value", - "path": "Organization.identifier.value", - "label": "Facility PTAN", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/FHIRHelpers.cql deleted file mode 100644 index 2201f0e28..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/FHIRHelpers.cql +++ /dev/null @@ -1,791 +0,0 @@ -library FHIRHelpers version '3.0.1' - -using FHIR version '3.0.1' - -define function ToInterval(period FHIR.Period): - if period is null then null - else if period."start" is null then Interval[period."start".value, period."end".value] - else Interval[period."start".value, period."end".value] - -define function ToCalendarUnit(unit System.String): - case unit - when 'ms' then 'millisecond' - when 's' then 'second' - when 'min' then 'minute' - when 'h' then 'hour' - when 'd' then 'day' - when 'wk' then 'week' - when 'mo' then 'month' - when 'a' then 'year' - else unit end - -define function ToQuantity(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.comparator is not null then Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.') - when quantity.system is null - or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end - -define function ToQuantityIgnoringComparator(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.system is null - or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end - -define function ToInterval(quantity FHIR.Quantity): - if quantity is null then null - else case quantity.comparator.value - when '<' then Interval[null, ToQuantityIgnoringComparator(quantity) ) - when '<=' then Interval[null, ToQuantityIgnoringComparator(quantity)] - when '>=' then Interval[ToQuantityIgnoringComparator(quantity), null] - when '>' then Interval ( ToQuantityIgnoringComparator(quantity), null] - else Interval[ToQuantity(quantity), ToQuantity(quantity)]end - -define function ToRatio(ratio FHIR.Ratio): - if ratio is null then null - else System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -define function ToInterval(range FHIR.Range): - if range is null then null - else Interval[ToQuantity(range.low), ToQuantity(range.high)] - -define function ToCode(coding FHIR.Coding): - if coding is null then null - else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value } - -define function ToConcept(concept FHIR.CodeableConcept): - if concept is null then null - else System.Concept { codes: concept.coding C - return ToCode(C), display: concept.text.value } - -define function ToBoolean(value FHIR.boolean): - value.value - -define function ToDate(value FHIR.date): - value.value - -define function ToDateTime(value FHIR.instant): - value.value - -define function ToDateTime(value FHIR.dateTime): - value.value - -define function ToDecimal(value FHIR.decimal): - value.value - -define function ToInteger(value FHIR.positiveInt): - value.value - -define function ToInteger(value FHIR.unsignedInt): - value.value - -define function ToInteger(value FHIR.integer): - value.value - -define function ToTime(value FHIR.time): - value.value - -define function ToString(value FHIR.string): - value.value - -define function ToString(value FHIR.id): - value.value - -define function ToString(value FHIR.code): - value.value - -define function ToString(value FHIR.markdown): - value.value - -define function ToString(value FHIR.oid): - value.value - -define function ToString(value FHIR.uri): - value.value - -define function ToString(value FHIR.uuid): - value.value - -define function ToString(value FHIR.base64Binary): - value.value - -define function ToString(value AccountStatus): - value.value - -define function ToString(value ActionCardinalityBehavior): - value.value - -define function ToString(value ActionConditionKind): - value.value - -define function ToString(value ActionGroupingBehavior): - value.value - -define function ToString(value ActionList): - value.value - -define function ToString(value ActionParticipantType): - value.value - -define function ToString(value ActionPrecheckBehavior): - value.value - -define function ToString(value ActionRelationshipType): - value.value - -define function ToString(value ActionRequiredBehavior): - value.value - -define function ToString(value ActionSelectionBehavior): - value.value - -define function ToString(value ActivityDefinitionKind): - value.value - -define function ToString(value ActivityParticipantType): - value.value - -define function ToString(value AddressType): - value.value - -define function ToString(value AddressUse): - value.value - -define function ToString(value AdministrativeGender): - value.value - -define function ToString(value AdverseEventCategory): - value.value - -define function ToString(value AdverseEventCausality): - value.value - -define function ToString(value AggregationMode): - value.value - -define function ToString(value AllergyIntoleranceCategory): - value.value - -define function ToString(value AllergyIntoleranceClinicalStatus): - value.value - -define function ToString(value AllergyIntoleranceCriticality): - value.value - -define function ToString(value AllergyIntoleranceSeverity): - value.value - -define function ToString(value AllergyIntoleranceType): - value.value - -define function ToString(value AllergyIntoleranceVerificationStatus): - value.value - -define function ToString(value AppointmentStatus): - value.value - -define function ToString(value AssertionDirectionType): - value.value - -define function ToString(value AssertionOperatorType): - value.value - -define function ToString(value AssertionResponseTypes): - value.value - -define function ToString(value AuditEventAction): - value.value - -define function ToString(value AuditEventAgentNetworkType): - value.value - -define function ToString(value AuditEventOutcome): - value.value - -define function ToString(value BindingStrength): - value.value - -define function ToString(value BundleType): - value.value - -define function ToString(value CapabilityStatementKind): - value.value - -define function ToString(value CarePlanActivityStatus): - value.value - -define function ToString(value CarePlanIntent): - value.value - -define function ToString(value CarePlanStatus): - value.value - -define function ToString(value CareTeamStatus): - value.value - -define function ToString(value ChargeItemStatus): - value.value - -define function ToString(value ClaimResponseStatus): - value.value - -define function ToString(value ClaimStatus): - value.value - -define function ToString(value ClinicalImpressionStatus): - value.value - -define function ToString(value CodeSystemContentMode): - value.value - -define function ToString(value CodeSystemHierarchyMeaning): - value.value - -define function ToString(value CommunicationPriority): - value.value - -define function ToString(value CommunicationRequestStatus): - value.value - -define function ToString(value CommunicationStatus): - value.value - -define function ToString(value CompartmentCode): - value.value - -define function ToString(value CompartmentType): - value.value - -define function ToString(value CompositionAttestationMode): - value.value - -define function ToString(value CompositionStatus): - value.value - -define function ToString(value ConceptMapEquivalence): - value.value - -define function ToString(value ConceptMapGroupUnmappedMode): - value.value - -define function ToString(value ConditionClinicalStatus): - value.value - -define function ToString(value ConditionVerificationStatus): - value.value - -define function ToString(value ConditionalDeleteStatus): - value.value - -define function ToString(value ConditionalReadStatus): - value.value - -define function ToString(value ConsentDataMeaning): - value.value - -define function ToString(value ConsentExceptType): - value.value - -define function ToString(value ConsentState): - value.value - -define function ToString(value ConstraintSeverity): - value.value - -define function ToString(value ContactPointSystem): - value.value - -define function ToString(value ContactPointUse): - value.value - -define function ToString(value ContentType): - value.value - -define function ToString(value ContractStatus): - value.value - -define function ToString(value ContributorType): - value.value - -define function ToString(value CoverageStatus): - value.value - -define function ToString(value DataElementStringency): - value.value - -define function ToString(value DayOfWeek): - value.value - -define function ToString(value DaysOfWeek): - value.value - -define function ToString(value DetectedIssueSeverity): - value.value - -define function ToString(value DetectedIssueStatus): - value.value - -define function ToString(value DeviceMetricCalibrationState): - value.value - -define function ToString(value DeviceMetricCalibrationType): - value.value - -define function ToString(value DeviceMetricCategory): - value.value - -define function ToString(value DeviceMetricColor): - value.value - -define function ToString(value DeviceMetricOperationalStatus): - value.value - -define function ToString(value DeviceRequestStatus): - value.value - -define function ToString(value DeviceUseStatementStatus): - value.value - -define function ToString(value DiagnosticReportStatus): - value.value - -define function ToString(value DigitalMediaType): - value.value - -define function ToString(value DiscriminatorType): - value.value - -define function ToString(value DocumentConfidentiality): - value.value - -define function ToString(value DocumentMode): - value.value - -define function ToString(value DocumentReferenceStatus): - value.value - -define function ToString(value DocumentRelationshipType): - value.value - -define function ToString(value EligibilityRequestStatus): - value.value - -define function ToString(value EligibilityResponseStatus): - value.value - -define function ToString(value EncounterLocationStatus): - value.value - -define function ToString(value EncounterStatus): - value.value - -define function ToString(value EndpointStatus): - value.value - -define function ToString(value EnrollmentRequestStatus): - value.value - -define function ToString(value EnrollmentResponseStatus): - value.value - -define function ToString(value EpisodeOfCareStatus): - value.value - -define function ToString(value EventCapabilityMode): - value.value - -define function ToString(value EventTiming): - value.value - -define function ToString(value ExplanationOfBenefitStatus): - value.value - -define function ToString(value ExtensionContext): - value.value - -define function ToString(value FHIRAllTypes): - value.value - -define function ToString(value FHIRDefinedType): - value.value - -define function ToString(value FHIRDeviceStatus): - value.value - -define function ToString(value FHIRSubstanceStatus): - value.value - -define function ToString(value FamilyHistoryStatus): - value.value - -define function ToString(value FilterOperator): - value.value - -define function ToString(value FlagStatus): - value.value - -define function ToString(value GoalStatus): - value.value - -define function ToString(value GraphCompartmentRule): - value.value - -define function ToString(value GroupType): - value.value - -define function ToString(value GuidanceResponseStatus): - value.value - -define function ToString(value GuideDependencyType): - value.value - -define function ToString(value GuidePageKind): - value.value - -define function ToString(value HTTPVerb): - value.value - -define function ToString(value IdentifierUse): - value.value - -define function ToString(value IdentityAssuranceLevel): - value.value - -define function ToString(value ImmunizationStatus): - value.value - -define function ToString(value InstanceAvailability): - value.value - -define function ToString(value IssueSeverity): - value.value - -define function ToString(value IssueType): - value.value - -define function ToString(value LinkType): - value.value - -define function ToString(value LinkageType): - value.value - -define function ToString(value ListMode): - value.value - -define function ToString(value ListStatus): - value.value - -define function ToString(value LocationMode): - value.value - -define function ToString(value LocationStatus): - value.value - -define function ToString(value MeasmntPrinciple): - value.value - -define function ToString(value MeasureReportStatus): - value.value - -define function ToString(value MeasureReportType): - value.value - -define function ToString(value MedicationAdministrationStatus): - value.value - -define function ToString(value MedicationDispenseStatus): - value.value - -define function ToString(value MedicationRequestIntent): - value.value - -define function ToString(value MedicationRequestPriority): - value.value - -define function ToString(value MedicationRequestStatus): - value.value - -define function ToString(value MedicationStatementStatus): - value.value - -define function ToString(value MedicationStatementTaken): - value.value - -define function ToString(value MedicationStatus): - value.value - -define function ToString(value MessageSignificanceCategory): - value.value - -define function ToString(value MimeType): - value.value - -define function ToString(value NameUse): - value.value - -define function ToString(value NamingSystemIdentifierType): - value.value - -define function ToString(value NamingSystemType): - value.value - -define function ToString(value NarrativeStatus): - value.value - -define function ToString(value NutritionOrderStatus): - value.value - -define function ToString(value ObservationRelationshipType): - value.value - -define function ToString(value ObservationStatus): - value.value - -define function ToString(value OperationKind): - value.value - -define function ToString(value OperationParameterUse): - value.value - -define function ToString(value ParameterUse): - value.value - -define function ToString(value ParticipantRequired): - value.value - -define function ToString(value ParticipantStatus): - value.value - -define function ToString(value ParticipationStatus): - value.value - -define function ToString(value PaymentNoticeStatus): - value.value - -define function ToString(value PaymentReconciliationStatus): - value.value - -define function ToString(value ProcedureRequestIntent): - value.value - -define function ToString(value ProcedureRequestPriority): - value.value - -define function ToString(value ProcedureRequestStatus): - value.value - -define function ToString(value ProcedureStatus): - value.value - -define function ToString(value ProcessRequestStatus): - value.value - -define function ToString(value ProcessResponseStatus): - value.value - -define function ToString(value PropertyRepresentation): - value.value - -define function ToString(value PropertyType): - value.value - -define function ToString(value ProvenanceEntityRole): - value.value - -define function ToString(value PublicationStatus): - value.value - -define function ToString(value QuantityComparator): - value.value - -define function ToString(value QuestionnaireItemType): - value.value - -define function ToString(value QuestionnaireResponseStatus): - value.value - -define function ToString(value ReferenceHandlingPolicy): - value.value - -define function ToString(value ReferenceVersionRules): - value.value - -define function ToString(value ReferralCategory): - value.value - -define function ToString(value ReferralPriority): - value.value - -define function ToString(value ReferralRequestStatus): - value.value - -define function ToString(value ReferredDocumentStatus): - value.value - -define function ToString(value RelatedArtifactType): - value.value - -define function ToString(value RequestIntent): - value.value - -define function ToString(value RequestPriority): - value.value - -define function ToString(value RequestStatus): - value.value - -define function ToString(value ResearchStudyStatus): - value.value - -define function ToString(value ResearchSubjectStatus): - value.value - -define function ToString(value ResourceType): - value.value - -define function ToString(value ResourceVersionPolicy): - value.value - -define function ToString(value ResponseType): - value.value - -define function ToString(value RestfulCapabilityMode): - value.value - -define function ToString(value RiskAssessmentStatus): - value.value - -define function ToString(value SearchComparator): - value.value - -define function ToString(value SearchEntryMode): - value.value - -define function ToString(value SearchModifierCode): - value.value - -define function ToString(value SearchParamType): - value.value - -define function ToString(value SectionMode): - value.value - -define function ToString(value SlicingRules): - value.value - -define function ToString(value SlotStatus): - value.value - -define function ToString(value SpecimenStatus): - value.value - -define function ToString(value StructureDefinitionKind): - value.value - -define function ToString(value StructureMapContextType): - value.value - -define function ToString(value StructureMapGroupTypeMode): - value.value - -define function ToString(value StructureMapInputMode): - value.value - -define function ToString(value StructureMapModelMode): - value.value - -define function ToString(value StructureMapSourceListMode): - value.value - -define function ToString(value StructureMapTargetListMode): - value.value - -define function ToString(value StructureMapTransform): - value.value - -define function ToString(value SubscriptionChannelType): - value.value - -define function ToString(value SubscriptionStatus): - value.value - -define function ToString(value SupplyDeliveryStatus): - value.value - -define function ToString(value SupplyRequestStatus): - value.value - -define function ToString(value SystemRestfulInteraction): - value.value - -define function ToString(value SystemVersionProcessingMode): - value.value - -define function ToString(value TaskIntent): - value.value - -define function ToString(value TaskPriority): - value.value - -define function ToString(value TaskStatus): - value.value - -define function ToString(value TestReportActionResult): - value.value - -define function ToString(value TestReportParticipantType): - value.value - -define function ToString(value TestReportResult): - value.value - -define function ToString(value TestReportStatus): - value.value - -define function ToString(value TestScriptRequestMethodCode): - value.value - -define function ToString(value TriggerType): - value.value - -define function ToString(value TypeDerivationRule): - value.value - -define function ToString(value TypeRestfulInteraction): - value.value - -define function ToString(value UDIEntryType): - value.value - -define function ToString(value UnitsOfTime): - value.value - -define function ToString(value UnknownContentCode): - value.value - -define function ToString(value Use): - value.value - -define function ToString(value VisionBase): - value.value - -define function ToString(value VisionEyes): - value.value - -define function ToString(value VisionStatus): - value.value - -define function ToString(value XPathUsageType): - value.value - -define function ToString(value qualityType): - value.value - -define function ToString(value repositoryType): - value.value \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql deleted file mode 100644 index 949391e87..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql +++ /dev/null @@ -1,237 +0,0 @@ -library OutpatientPriorAuthorizationPrepopulation version '1.0.0' - -using FHIR version '3.0.1' - -include FHIRHelpers version '3.0.1' called FHIRHelpers -// valueset "AAN MCI Encounters Outpt and Care Plan": 'https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1040' - -/* parameter EncounterId String */ - - - -parameter ClaimId String default '14703' - -context Patient - -define ClaimResource: - First([Claim] C - where C.id = ClaimId - ) - -define OrganizationFacility: - First([Organization] O - where EndsWith(ClaimResource.provider.reference, O.id) - ) - -define "FacilityName": - OrganizationFacility.name.value - -define "FacilityNPI": - ( OrganizationFacility.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define function FindPractitioner(myCode String, mySequence Integer): - //If we can't find a Primary practicioner by code, use the sequence as a fallback. - - Coalesce(First([Practitioner] P //Practitioner who is on the careteam and contains a code that equals supplied code - - where EndsWith(First(ClaimResource.careTeam CT - where exists(CT.role.coding CTCode - where CTCode.code.value = myCode - ) - ).provider.reference, P.id - ) - ), First([Practitioner] P //Practitioner who is on the careteam and is of the supplied sequence - - where EndsWith(First(ClaimResource.careTeam CT - where CT.sequence = mySequence - ).provider.reference, P.id - ) - ) - ) - -define PractitionerOperatingPhysician: - FindPractitioner('primary', 1) - -define PractitionerAttendingPhysician: - FindPractitioner('assist', 2) - -// Should probably be seperate, Utiltiy files; but just for practice: - -//PATIENT INFO - - - -define OfficialName: - First(Patient.name name - where name.use.value = 'official' - ) - -define FirstName: - Patient.name[0] - -define BeneficiaryName: - Coalesce(OfficialName, FirstName) - -define "BeneficiaryFirstName": - BeneficiaryName.given[0].value - -define "BeneficiaryLastName": - BeneficiaryName.family.value - -define "BeneficiaryDOB": - Patient.birthDate.value - -define "BeneficiaryGender": - Patient.gender.value - -define RequestCoverage: - ClaimResource.insurance - -define CoverageResource: - First([Coverage] coverage - // pull coverage resource id from the service request insurance extension - - where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) - ) - -define "BeneficiaryMedicareID": - // CoverageResource.subscriberId.value // 3.0.1 FHIR Model Info is missing subscriberId - - '525697298M' - -//OPERATING PHYSICIAN INFO - - -define "OperatingPhysicianFirstName": - PractitionerOperatingPhysician.name.given[0].value - -define "OperatingPhysicianLastName": - PractitionerOperatingPhysician.name.family.value - -define "OperatingPhysicianNPI": - ( PractitionerOperatingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define OperatingPhysicianAddress: - First(PractitionerOperatingPhysician.address address - where address.use.value = 'work' - ) - -define "OperatingPhysicianAddress1": - OperatingPhysicianAddress.line[0].value - -define "OperatingPhysicianAddress2": - OperatingPhysicianAddress.line[1].value - -define "OperatingPhysicianAddressCity": - OperatingPhysicianAddress.city.value - -define "OperatingPhysicianAddressState": - OperatingPhysicianAddress.state.value - -define "OperatingPhysicianAddressZip": - OperatingPhysicianAddress.postalCode.value - -// Attending PHYSICIAN INFO - - -define "AttendingPhysicianSame": - case - when PractitionerAttendingPhysician is not null then false - else true end - -define "AttendingPhysicianFirstName": - PractitionerAttendingPhysician.name.given[0].value - -define "AttendingPhysicianLastName": - PractitionerAttendingPhysician.name.family.value - -define "AttendingPhysicianNPI": - ( PractitionerAttendingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define AttendingPhysicianAddressWork: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'work' - ) - -define AttendingPhysicianAddressHome: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'home' - ) - -define AttendingPhysicianAddress: - Coalesce(AttendingPhysicianAddressWork, AttendingPhysicianAddressHome) - -define "AttendingPhysicianAddress1": - AttendingPhysicianAddress.line[0].value - -define "AttendingPhysicianAddress2": - AttendingPhysicianAddress.line[1].value - -define "AttendingPhysicianAddressCity": - AttendingPhysicianAddress.city.value - -define "AttendingPhysicianAddressState": - AttendingPhysicianAddress.state.value - -define "AttendingPhysicianAddressZip": - AttendingPhysicianAddress.postalCode.value - -//CLAIM INFORMATION - - -define ClaimDiagnosisReferenced: - First([Condition] C - where //First condition referenced by the Claim - exists(ClaimResource.diagnosis.diagnosis Condition - where EndsWith(Condition.reference, C.id) - ) - ).code.coding[0].code.value - -define ClaimDiagnosisCode: - ClaimResource.diagnosis.diagnosis.coding[0].code.value //TODO: Check for primary vs. secondary? - - -define "RequestDetailsPrimaryDiagnosisCode": - Coalesce(ClaimDiagnosisCode, ClaimDiagnosisReferenced) - -//PROCEDURE INFORMATION - - -define RelevantReferencedProcedures: - [Procedure] P - where P.status.value != 'completed' - and exists ( ClaimResource.procedure Procedure - where EndsWith(Procedure.procedure.reference, P.id) - ) - -define function FindProcedure(proc String): - exists ( ClaimResource.procedure.procedure.coding P - where P.code.value = proc - ) - or exists ( RelevantReferencedProcedures.code.coding coding - where coding.code.value = proc - ) - -define "RequestDetailsProcedureCode64612": - FindProcedure('64612') - -define "RequestDetailsProcedureCodeJ0586": - FindProcedure('J0586') - -define "RequestDetailsProcedureCode64615": - FindProcedure('64615') - -define "RequestDetailsProcedureCode20912": - FindProcedure('20912') - -define "RequestDetailsProcedureCode36478": - FindProcedure('36478') - -define "RequestDetailsProcedureCode22551": - FindProcedure('22551') \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-FHIRHelpers.json deleted file mode 100644 index 6a6aaad1e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-FHIRHelpers.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRHelpers", - "url": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers", - "version": "3.2.0", - "name": "FHIRHelpers", - "title": "FHIR Helpers", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRHelpers.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json deleted file mode 100644 index aaa475a6e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "resourceType": "Library", - "id": "OutpatientPriorAuthorizationPrepopulation", - "meta": { - "versionId": "4", - "lastUpdated": "2023-01-04T22:42:31.776+00:00", - "source": "#jvktlnzFIHZuPkeq" - }, - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationPrepopulation", - "title": "Outpatient Prior Authorization Prepopulation", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "relatedArtifact": [ - { - "type": "depends-on", - "resource": { - "reference": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|3.2.0" - } - } - ], - "dataRequirement": [ - { - "type": "ReferralRequest" - }, - { - "type": "Procedure" - }, - { - "type": "Claim" - }, - { - "type": "Organization" - }, - { - "type": "Practitioner" - }, - { - "type": "Coverage" - }, - { - "type": "Condition" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/OutpatientPriorAuthorizationPrepopulation.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json deleted file mode 100644 index 9ca30537a..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-Errors", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueUri": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation-Errors" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-Errors", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "FacilityName" - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "FacilityNPI" - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "FacilityPTAN" - } - ], - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "BeneficiaryFirstName" - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "BeneficiaryLastName" - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "BeneficiaryDOB" - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "BeneficiaryMedicareID" - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "BeneficiaryGender" - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianFirstName" - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianLastName" - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianNPI" - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianAddress1" - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianAddress2" - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianAddressCity" - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianAddressState" - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "OperatingPhysicianAddressZip" - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianSame" - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianFirstName" - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianLastName" - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianNPI" - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianAddress1" - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianAddress2" - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianAddressCity" - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianAddressState" - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", - "valueString": "text/cql.identifier" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueString": "AttendingPhysicianAddressZip" - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json deleted file mode 100644 index 7ffa97d4a..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ /dev/null @@ -1,463 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-library", - "valueReference": { - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation|1.0.0" - } - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.FacilityName" - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.FacilityNPI" - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryFirstName" - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryLastName" - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryDOB" - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryMedicareID" - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryGender" - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianFirstName" - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianLastName" - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianNPI" - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddress1" - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddress2" - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddressCity" - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddressState" - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddressZip" - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianSame" - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianFirstName" - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianLastName" - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianNPI" - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddress1" - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddress2" - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddressCity" - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddressState" - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddressZip" - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/StructureDefinition-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/StructureDefinition-RouteOnePatient.json deleted file mode 100644 index aa52392dc..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/StructureDefinition-RouteOnePatient.json +++ /dev/null @@ -1,1980 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOnePatient", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 5 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-library", - "valueReference": { - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient", - "name": "RouteOnePatient", - "title": "Beneficiary Information", - "status": "active", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "purpose": "Tracking patient is the center of the healthcare process.", - "fhirVersion": "3.0.2", - "mapping": [ - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "cda", - "uri": "http://hl7.org/v3/cda", - "name": "CDA (R2)" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/w5", - "name": "W5 Mapping" - }, - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "loinc", - "uri": "http://loinc.org", - "name": "LOINC code for the element" - } - ], - "kind": "resource", - "abstract": false, - "type": "Patient", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Patient", - "path": "Patient", - "short": "Information about an individual or animal receiving health care services", - "definition": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "alias": [ - "SubjectOfCare Client Resident" - ], - "min": 0, - "max": "*", - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "DomainResource" - }, - { - "key": "dom-1", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative", - "expression": "contained.text.empty()", - "xpath": "not(parent::f:contained and f:text)", - "source": "DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource", - "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()", - "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))", - "source": "DomainResource" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "rim", - "map": "Patient[classCode=PAT]" - }, - { - "identity": "cda", - "map": "ClinicalDocument.recordTarget.patientRole" - }, - { - "identity": "w5", - "map": "administrative.individual" - } - ] - }, - { - "id": "Patient.id", - "path": "Patient.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "id" - } - ], - "isSummary": true - }, - { - "id": "Patient.meta", - "path": "Patient.meta", - "short": "Metadata about the resource", - "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.", - "min": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "isSummary": true - }, - { - "id": "Patient.implicitRules", - "path": "Patient.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.", - "comment": "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. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.", - "min": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "isModifier": true, - "isSummary": true - }, - { - "id": "Patient.language", - "path": "Patient.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueReference": { - "reference": "http://hl7.org/fhir/ValueSet/all-languages" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "extensible", - "description": "A human language.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/languages" - } - } - }, - { - "id": "Patient.text", - "path": "Patient.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "A human-readable narrative that contains a summary of the resource, and may 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": "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 in formation is added later.", - "alias": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "condition": [ - "dom-1" - ], - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Patient.contained", - "path": "Patient.contained", - "short": "Contained, inline Resources", - "definition": "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": "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.", - "alias": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.extension", - "path": "Patient.extension", - "short": "Additional Content defined by implementations", - "definition": "May be used to represent additional information that is not part of the basic definition of the resource. In order 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.", - "comment": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.modifierExtension", - "path": "Patient.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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. Usually modifier elements provide negation or qualification. In order 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.", - "comment": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "isModifier": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "short": "An identifier for this patient", - "definition": "An identifier for this patient.", - "requirements": "Patients are almost always assigned specific numerical identifiers.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Identifier" - } - ], - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-3" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": ".id" - }, - { - "identity": "w5", - "map": "id" - } - ] - }, - { - "id": "Patient.active", - "path": "Patient.active", - "short": "Whether this patient's record is in active use", - "definition": "Whether this patient record is in active use.", - "comment": "Default is true. If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient\n\nThis element is labeled as a modifier because when the patient record is marked as not active it is not expected to be used/referenced without being changed back to active.", - "requirements": "Need to be able to mark a patient record as not to be used because it was created in error.", - "min": 0, - "max": "1", - "type": [ - { - "code": "boolean" - } - ], - "defaultValueBoolean": true, - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "statusCode" - }, - { - "identity": "cda", - "map": "n/a" - }, - { - "identity": "w5", - "map": "status" - } - ] - }, - { - "id": "Patient.name", - "path": "Patient.name", - "short": "A name associated with the patient", - "definition": "A name associated with the individual.", - "comment": "A patient may have multiple names with different uses or applicable periods. For animals, the name is a \"HumanName\" in the sense that is assigned and used by humans and has the same patterns.", - "requirements": "Need to be able to track the patient by multiple names. Examples are your official name and a partner name.", - "min": 0, - "max": "*", - "type": [ - { - "code": "HumanName" - } - ], - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-5, PID-9" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": ".patient.name" - } - ] - }, - { - "id": "Patient.telecom", - "path": "Patient.telecom", - "short": "A contact detail for the individual", - "definition": "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", - "comment": "A Patient may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and also to help with identification. The address may not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone).", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "type": [ - { - "code": "ContactPoint" - } - ], - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-13, PID-14, PID-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": ".telecom" - } - ] - }, - { - "id": "Patient.gender", - "path": "Patient.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", - "comment": "The gender may not match the biological sex as determined by genetics, or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than M and F, though the vast majority of systems and contexts only support M and F. Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific gender aspect of interest (anatomical, chromosonal, social, etc.) However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice. Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosonal and other gender aspects. For example, an alert about a hysterectomy on a male should be handled as a warning or overrideable error, not a \"hard\" error.", - "requirements": "Needed for identification of the individual, in combination with (at least) name and birth date. Gender of individual drives many clinical processes.", - "min": 0, - "max": "1", - "type": [ - { - "code": "code" - } - ], - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/administrative-gender" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-8" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": ".patient.administrativeGenderCode" - } - ] - }, - { - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "short": "The date of birth for the individual", - "definition": "The date of birth for the individual.", - "comment": "At least an estimated year should be provided as a guess if the real DOB is unknown There is a standard extension \"patient-birthTime\" available that should be used where Time is required (such as in maternaty/infant care systems).", - "requirements": "Age of the individual drives many clinical processes.", - "min": 0, - "max": "1", - "type": [ - { - "code": "date" - } - ], - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-7" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime" - }, - { - "identity": "cda", - "map": ".patient.birthTime" - }, - { - "identity": "loinc", - "map": "21112-8" - } - ] - }, - { - "id": "Patient.deceased[x]", - "path": "Patient.deceased[x]", - "short": "Indicates if the individual is deceased or not", - "definition": "Indicates if the individual is deceased or not.", - "comment": "If there's no value in the instance it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive.\n\nThis element is labeled as a modifier because once a patient is marked as deceased, the actions that are appropriate to perform on the patient may be significantly different.", - "requirements": "The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive.", - "min": 0, - "max": "1", - "type": [ - { - "code": "boolean" - }, - { - "code": "dateTime" - } - ], - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-30 (bool) and PID-29 (datetime)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.address", - "path": "Patient.address", - "short": "Addresses for the individual", - "definition": "Addresses for the individual.", - "comment": "Patient may have multiple addresses with different uses or applicable periods.", - "requirements": "May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Address" - } - ], - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-11" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": ".addr" - } - ] - }, - { - "id": "Patient.maritalStatus", - "path": "Patient.maritalStatus", - "short": "Marital (civil) status of a patient", - "definition": "This field contains a patient's most recent marital (civil) status.", - "requirements": "Most, if not all systems capture it.", - "min": 0, - "max": "1", - "type": [ - { - "code": "CodeableConcept" - } - ], - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "MaritalStatus" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "extensible", - "description": "The domestic partnership status of a person.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/marital-status" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-16" - }, - { - "identity": "rim", - "map": "player[classCode=PSN]/maritalStatusCode" - }, - { - "identity": "cda", - "map": ".patient.maritalStatusCode" - } - ] - }, - { - "id": "Patient.multipleBirth[x]", - "path": "Patient.multipleBirth[x]", - "short": "Whether patient is part of a multiple birth", - "definition": "Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).", - "comment": "Where the valueInteger is provided, the number is the birth number in the sequence.\nE.g. The middle birth in tripplets would be valueInteger=2 and the third born would have valueInteger=3\nIf a bool value was provided for this tripplets examle, then all 3 patient records would have valueBool=true (the ordering is not indicated).", - "requirements": "For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs.", - "min": 0, - "max": "1", - "type": [ - { - "code": "boolean" - }, - { - "code": "integer" - } - ], - "mapping": [ - { - "identity": "v2", - "map": "PID-24 (bool), PID-25 (integer)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.photo", - "path": "Patient.photo", - "short": "Image of the patient", - "definition": "Image of the patient.", - "requirements": "Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Attachment" - } - ], - "mapping": [ - { - "identity": "v2", - "map": "OBX-5 - needs a profile" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Contact" - } - ], - "path": "Patient.contact", - "short": "A contact party (e.g. guardian, partner, friend) for the patient", - "definition": "A contact party (e.g. guardian, partner, friend) for the patient.", - "comment": "Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact.", - "requirements": "Need to track people you can contact about the patient.", - "min": 0, - "max": "*", - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() | (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "Element" - }, - { - "key": "pat-1", - "severity": "error", - "human": "SHALL at least contain a contact's details or a reference to an organization", - "expression": "name.exists() or telecom.exists() or address.exists() or organization.exists()", - "xpath": "exists(f:name) or exists(f:telecom) or exists(f:address) or exists(f:organization)" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.id", - "path": "Patient.contact.id", - "representation": [ - "xmlAttr" - ], - "short": "xml:id (or equivalent in JSON)", - "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "string" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.extension", - "path": "Patient.contact.extension", - "short": "Additional Content defined by implementations", - "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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.", - "comment": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.modifierExtension", - "path": "Patient.contact.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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 that contains it. Usually modifier elements provide negation or qualification. In order 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.", - "comment": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.contact.relationship", - "path": "Patient.contact.relationship", - "short": "The kind of relationship", - "definition": "The nature of the relationship between the patient and the contact person.", - "requirements": "Used to determine which contact person is the most relevant to approach, depending on circumstances.", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ], - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ContactRelationship" - } - ], - "strength": "extensible", - "description": "The nature of the relationship between a patient and a contact person for that patient.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/v2-0131" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-7, NK1-3" - }, - { - "identity": "rim", - "map": "code" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.name", - "path": "Patient.contact.name", - "short": "A name associated with the contact person", - "definition": "A name associated with the contact person.", - "requirements": "Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person.", - "min": 0, - "max": "1", - "type": [ - { - "code": "HumanName" - } - ], - "mapping": [ - { - "identity": "v2", - "map": "NK1-2" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.telecom", - "path": "Patient.contact.telecom", - "short": "A contact detail for the person", - "definition": "A contact detail for the person, e.g. a telephone number or an email address.", - "comment": "Contact may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently, and also to help with identification.", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "type": [ - { - "code": "ContactPoint" - } - ], - "mapping": [ - { - "identity": "v2", - "map": "NK1-5, NK1-6, NK1-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.address", - "path": "Patient.contact.address", - "short": "Address for the contact person", - "definition": "Address for the contact person.", - "requirements": "Need to keep track where the contact person can be contacted per postal mail or visited.", - "min": 0, - "max": "1", - "type": [ - { - "code": "Address" - } - ], - "mapping": [ - { - "identity": "v2", - "map": "NK1-4" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.gender", - "path": "Patient.contact.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", - "requirements": "Needed to address the person correctly.", - "min": 0, - "max": "1", - "type": [ - { - "code": "code" - } - ], - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/administrative-gender" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-15" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.organization", - "path": "Patient.contact.organization", - "short": "Organization that is associated with the contact", - "definition": "Organization on behalf of which the contact is acting or for which the contact is working.", - "requirements": "For guardians or business related contacts, the organization is relevant.", - "min": 0, - "max": "1", - "type": [ - { - "code": "Reference", - "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "condition": [ - "pat-1" - ], - "mapping": [ - { - "identity": "v2", - "map": "NK1-13, NK1-30, NK1-31, NK1-32, NK1-41" - }, - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.period", - "path": "Patient.contact.period", - "short": "The period during which this contact person or organization is valid to be contacted relating to this patient", - "definition": "The period during which this contact person or organization is valid to be contacted relating to this patient.", - "min": 0, - "max": "1", - "type": [ - { - "code": "Period" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "effectiveTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.animal", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Animal" - } - ], - "path": "Patient.animal", - "short": "This patient is known to be an animal (non-human)", - "definition": "This patient is known to be an animal.", - "comment": "The animal element is labeled \"Is Modifier\" since patients may be non-human. Systems SHALL either handle patient details appropriately (e.g. inform users patient is not human) or reject declared animal records. The absense of the animal element does not imply that the patient is a human. If a system requires such a positive assertion that the patient is human, an extension will be required. (Do not use a species of homo-sapiens in animal species, as this would incorrectly infer that the patient is an animal).", - "requirements": "Many clinical systems are extended to care for animal patients as well as human.", - "min": 0, - "max": "1", - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() | (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "Element" - } - ], - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "player[classCode=ANM]" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.animal.id", - "path": "Patient.animal.id", - "representation": [ - "xmlAttr" - ], - "short": "xml:id (or equivalent in JSON)", - "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "string" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.animal.extension", - "path": "Patient.animal.extension", - "short": "Additional Content defined by implementations", - "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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.", - "comment": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.animal.modifierExtension", - "path": "Patient.animal.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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 that contains it. Usually modifier elements provide negation or qualification. In order 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.", - "comment": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.animal.species", - "path": "Patient.animal.species", - "short": "E.g. Dog, Cow", - "definition": "Identifies the high level taxonomic categorization of the kind of animal.", - "comment": "If the patient is non-human, at least a species SHALL be specified. Species SHALL be a widely recognised taxonomic classification. It may or may not be Linnaean taxonomy and may or may not be at the level of species. If the level is finer than species--such as a breed code--the code system used SHALL allow inference of the species. (The common example is that the word \"Hereford\" does not allow inference of the species Bos taurus, because there is a Hereford pig breed, but the SNOMED CT code for \"Hereford Cattle Breed\" does.).", - "requirements": "Need to know what kind of animal.", - "min": 1, - "max": "1", - "type": [ - { - "code": "CodeableConcept" - } - ], - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AnimalSpecies" - } - ], - "strength": "example", - "description": "The species of an animal.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/animal-species" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-35" - }, - { - "identity": "rim", - "map": "code" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.animal.breed", - "path": "Patient.animal.breed", - "short": "E.g. Poodle, Angus", - "definition": "Identifies the detailed categorization of the kind of animal.", - "comment": "Breed MAY be used to provide further taxonomic or non-taxonomic classification. It may involve local or proprietary designation--such as commercial strain--and/or additional information such as production type.", - "requirements": "May need to know the specific kind within the species.", - "min": 0, - "max": "1", - "type": [ - { - "code": "CodeableConcept" - } - ], - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AnimalBreed" - } - ], - "strength": "example", - "description": "The breed of an animal.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/animal-breeds" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-37" - }, - { - "identity": "rim", - "map": "playedRole[classCode=GEN]/scoper[classCode=ANM, determinerCode=KIND]/code" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.animal.genderStatus", - "path": "Patient.animal.genderStatus", - "short": "E.g. Neutered, Intact", - "definition": "Indicates the current state of the animal's reproductive organs.", - "requirements": "Gender status can affect housing and animal behavior.", - "min": 0, - "max": "1", - "type": [ - { - "code": "CodeableConcept" - } - ], - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AnimalGenderStatus" - } - ], - "strength": "example", - "description": "The state of the animal's reproductive organs.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/animal-genderstatus" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "N/A" - }, - { - "identity": "rim", - "map": "genderStatusCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication", - "path": "Patient.communication", - "short": "A list of Languages which may be used to communicate with the patient about his or her health", - "definition": "Languages which may be used to communicate with the patient about his or her health.", - "comment": "If no language is specified, this *implies* that the default local language is spoken. If you need to convey proficiency for multiple modes then you need multiple Patient.Communication associations. For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required.", - "requirements": "If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency is an important things to keep track of both for patient and other persons of interest.", - "min": 0, - "max": "*", - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() | (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "Element" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "LanguageCommunication" - }, - { - "identity": "cda", - "map": "patient.languageCommunication" - } - ] - }, - { - "id": "Patient.communication.id", - "path": "Patient.communication.id", - "representation": [ - "xmlAttr" - ], - "short": "xml:id (or equivalent in JSON)", - "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "string" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.extension", - "path": "Patient.communication.extension", - "short": "Additional Content defined by implementations", - "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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.", - "comment": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.modifierExtension", - "path": "Patient.communication.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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 that contains it. Usually modifier elements provide negation or qualification. In order 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.", - "comment": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.communication.language", - "path": "Patient.communication.language", - "short": "The language which can be used to communicate with the patient about his or her health", - "definition": "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", - "comment": "The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.", - "requirements": "Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.", - "min": 1, - "max": "1", - "type": [ - { - "code": "CodeableConcept" - } - ], - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueReference": { - "reference": "http://hl7.org/fhir/ValueSet/all-languages" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "extensible", - "description": "A human language.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/languages" - } - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-15, LAN-2" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code" - }, - { - "identity": "cda", - "map": ".languageCode" - } - ] - }, - { - "id": "Patient.communication.preferred", - "path": "Patient.communication.preferred", - "short": "Language preference indicator", - "definition": "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", - "comment": "This language is specifically identified for communicating healthcare information.", - "requirements": "People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.", - "min": 0, - "max": "1", - "type": [ - { - "code": "boolean" - } - ], - "mapping": [ - { - "identity": "v2", - "map": "PID-15" - }, - { - "identity": "rim", - "map": "preferenceInd" - }, - { - "identity": "cda", - "map": ".preferenceInd" - } - ] - }, - { - "id": "Patient.generalPractitioner", - "path": "Patient.generalPractitioner", - "short": "Patient's nominated primary care provider", - "definition": "Patient's nominated care provider.", - "comment": "This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disablity setting, or even organization that will provide people to perform the care provider roles.\n\nIt is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources.", - "alias": [ - "careProvider" - ], - "min": 0, - "max": "*", - "type": [ - { - "code": "Reference", - "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization" - }, - { - "code": "Reference", - "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner" - } - ], - "mapping": [ - { - "identity": "v2", - "map": "PD1-4" - }, - { - "identity": "rim", - "map": "subjectOf.CareEvent.performer.AssignedEntity" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.managingOrganization", - "path": "Patient.managingOrganization", - "short": "Organization that is the custodian of the patient record", - "definition": "Organization that is the custodian of the patient record.", - "comment": "There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association).", - "requirements": "Need to know who recognizes this patient record, manages and updates it.", - "min": 0, - "max": "1", - "type": [ - { - "code": "Reference", - "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": ".providerOrganization" - } - ] - }, - { - "id": "Patient.link", - "path": "Patient.link", - "short": "Link to another patient resource that concerns the same actual person", - "definition": "Link to another patient resource that concerns the same actual patient.", - "comment": "There is no assumption that linked patient records have mutual links. \n\nThis element is labelled as a modifier because it may not be the main Patient resource, and the referenced patient should be used instead of this Patient record. This is when the link.type value is 'replaced-by'.", - "requirements": "There are multiple usecases: \n\n* Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and * Distribution of patient information across multiple servers.", - "min": 0, - "max": "*", - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() | (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "Element" - } - ], - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "outboundLink" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.id", - "path": "Patient.link.id", - "representation": [ - "xmlAttr" - ], - "short": "xml:id (or equivalent in JSON)", - "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "string" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.extension", - "path": "Patient.link.extension", - "short": "Additional Content defined by implementations", - "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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.", - "comment": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.modifierExtension", - "path": "Patient.link.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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 that contains it. Usually modifier elements provide negation or qualification. In order 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.", - "comment": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "isModifier": true, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.link.other", - "path": "Patient.link.other", - "short": "The other patient or related person resource that the link refers to", - "definition": "The other patient resource that the link refers to.", - "comment": "Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual.", - "min": 1, - "max": "1", - "type": [ - { - "code": "Reference", - "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient" - }, - { - "code": "Reference", - "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson" - } - ], - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-3, MRG-1" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.type", - "path": "Patient.link.type", - "short": "replaced-by | replaces | refer | seealso - type of link", - "definition": "The type of link between this patient resource and another patient resource.", - "min": 1, - "max": "1", - "type": [ - { - "code": "code" - } - ], - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "LinkType" - } - ], - "strength": "required", - "description": "The type of link between this patient resource and another patient resource.", - "valueSetReference": { - "reference": "http://hl7.org/fhir/ValueSet/link-type" - } - }, - "mapping": [ - { - "identity": "rim", - "map": "typeCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "id": "Patient.name", - "path": "Patient.name", - "label": "Patient Name", - "type": [ - { - "code": "HumanName" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryFirstName" - } - ], - "id": "Patient.name.given", - "path": "Patient.name.given", - "label": "First Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryLastName" - } - ], - "id": "Patient.name.family", - "path": "Patient.name.family", - "label": "Last Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryDOB" - } - ], - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "label": "Date of Birth", - "min": 1, - "type": [ - { - "code": "date" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryGender" - } - ], - "id": "Patient.gender", - "path": "Patient.gender", - "label": "Gender", - "min": 1, - "type": [ - { - "code": "code" - } - ], - "binding": { - "strength": "extensible", - "valueSetUri": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender" - } - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Patient.identifier:MedicareID", - "path": "Patient.identifier", - "sliceName": "MedicareID", - "min": 1, - "max": "1", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Patient.identifier:MedicareID.system", - "path": "Patient.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "urn:oid:1.2.36.146.595.217.0.1" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryMedicareID" - } - ], - "id": "Patient.identifier:MedicareID.value", - "path": "Patient.identifier.value", - "label": "Medicare ID", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Claim-OPA-Claim1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Claim-OPA-Claim1.json deleted file mode 100644 index 1529c7aba..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Claim-OPA-Claim1.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "resourceType": "Claim", - "id": "OPA-Claim1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-levelOfServiceCode", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1338", - "code": "U", - "display": "Urgent" - } - ] - } - } - ], - "identifier": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierJurisdiction", - "valueCodeableConcept": { - "coding": [ - { - "system": "https://www.usps.com/", - "code": "MA" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierSubDepartment", - "valueString": "223412" - } - ], - "system": "http://example.org/PATIENT_EVENT_TRACE_NUMBER", - "value": "111099", - "assigner": { - "identifier": { - "system": "http://example.org/USER_ASSIGNED", - "value": "9012345678" - } - } - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/claim-type", - "code": "professional" - } - ] - }, - "use": "proposed", - "patient": { - "reference": "Patient/OPA-Patient1" - }, - "created": "2005-05-02", - "insurer": { - "reference": "Organization/OPA-PayorOrganization1" - }, - "provider": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "facility": { - "reference": "Location/OPA-Location1" - }, - "priority": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/processpriority", - "code": "normal" - } - ] - }, - "careTeam": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 1, - "provider": { - "reference": "Practitioner/OPA-OperatingPhysician1" - } - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 2, - "provider": { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - } - ], - "diagnosis": [ - { - "sequence": 123, - "diagnosisReference": { - "reference": "Condition/OPA-Condition1" - } - } - ], - "procedure": [ - { - "sequence": 1, - "procedureReference": { - "reference": "Procedure/OPA-Procedure1" - } - }, - { - "sequence": 2, - "procedureReference": { - "reference": "Procedure/OPA-Procedure2" - } - } - ], - "supportingInfo": [ - { - "sequence": 1, - "category": { - "coding": [ - { - "system": "http://hl7.org/us/davinci-pas/CodeSystem/PASSupportingInfoType", - "code": "patientEvent" - } - ] - }, - "timingPeriod": { - "start": "2015-10-01T00:00:00-07:00", - "end": "2015-10-05T00:00:00-07:00" - } - } - ], - "insurance": [ - { - "sequence": 1, - "focal": true, - "coverage": { - "reference": "Coverage/OPA-Coverage1" - } - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemTraceNumber", - "valueIdentifier": { - "system": "http://example.org/ITEM_TRACE_NUMBER", - "value": "1122334" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizationNumber", - "valueString": "1122445" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-administrationReferenceNumber", - "valueString": "9988311" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceItemRequestType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1525", - "code": "SC", - "display": "Specialty Care Review" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-certificationType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1322", - "code": "I", - "display": "Initial" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-requestedService", - "valueReference": { - "reference": "ServiceRequest/OPA-ServiceRequest1" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-epsdtIndicator", - "valueBoolean": false - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeResidentialStatus", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1345", - "code": "2", - "display": "Newly Admitted" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeLevelOfCare", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1337", - "code": "2", - "display": "Intermediate Care Facility (ICF)" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueUnitRateLimit", - "valueDecimal": 100 - } - ], - "sequence": 1, - "careTeamSequence": [ - 1 - ], - "diagnosisSequence": [ - 1 - ], - "productOrService": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1365", - "code": "3", - "display": "Consultation" - } - ] - }, - "locationCodeableConcept": { - "coding": [ - { - "system": "https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set", - "code": "11" - } - ] - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Condition-OPA-Condition1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Condition-OPA-Condition1.json deleted file mode 100644 index a0c2ca681..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Condition-OPA-Condition1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Condition", - "id": "OPA-Condition1", - "code": { - "coding": [ - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "G1221", - "display": "G1221,Amyotrophic lateral sclerosis" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Coverage-OPA-Coverage1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Coverage-OPA-Coverage1.json deleted file mode 100644 index 53802b3e9..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Coverage-OPA-Coverage1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "resourceType": "Coverage", - "id": "OPA-Coverage1", - "meta": { - "versionId": "1", - "lastUpdated": "2019-07-11T06:27:08.949+00:00", - "profile": [ - "http://hl7.org/fhir/us/davinci-deqm/STU3/StructureDefinition/coverage-deqm" - ] - }, - "identifier": [ - { - "system": "http://benefitsinc.com/certificate", - "value": "10138556" - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", - "code": "HIP", - "display": "health insurance plan policy" - } - ] - }, - "policyHolder": { - "reference": "Patient/OPA-Patient1" - }, - "subscriber": { - "reference": "Patient/OPA-Patient1" - }, - "subscriberId": "525697298M", - "beneficiary": { - "reference": "Patient/OPA-Patient1" - }, - "relationship": { - "coding": [ - { - "code": "self" - } - ] - }, - "payor": [ - { - "reference": "Organization/OPA-PayorOrganization1" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Location-OPA-Location1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Location-OPA-Location1.json deleted file mode 100644 index 39eca622e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Location-OPA-Location1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Location", - "id": "OPA-Location1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:28:20.715+00:00" - }, - "address": { - "line": [ - "100 Good St" - ], - "city": "Bedford", - "state": "MA", - "postalCode": "01730" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Organization-OPA-PayorOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Organization-OPA-PayorOrganization1.json deleted file mode 100644 index f8a998c72..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Organization-OPA-PayorOrganization1.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-PayorOrganization1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:16:05.159+00:00" - }, - "name": "Palmetto GBA", - "address": [ - { - "use": "work", - "line": [ - "111 Dogwood Ave" - ], - "city": "Columbia", - "state": "SC", - "postalCode": "29999", - "country": "US" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Organization-OPA-ProviderOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Organization-OPA-ProviderOrganization1.json deleted file mode 100644 index 4830be3b8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Organization-OPA-ProviderOrganization1.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-ProviderOrganization1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: example-organization-2

meta:

identifier: 1407071236, 121111111

active: true

type: Healthcare Provider (Details : {http://terminology.hl7.org/CodeSystem/organization-type code 'prov' = 'Healthcare Provider', given as 'Healthcare Provider'})

name: Acme Clinic

telecom: ph: (+1) 734-677-7777, customer-service@acme-clinic.org

address: 3300 Washtenaw Avenue, Suite 227 Amherst MA 01002 USA

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1407071236" - }, - { - "system": "http://example.org/fhir/sid/us-tin", - "value": "121111111" - } - ], - "active": true, - "type": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/organization-type", - "code": "prov", - "display": "Healthcare Provider" - } - ] - } - ], - "name": "Acme Clinic", - "telecom": [ - { - "system": "phone", - "value": "(+1) 734-677-7777" - }, - { - "system": "email", - "value": "customer-service@acme-clinic.org" - } - ], - "address": [ - { - "line": [ - "3300 Washtenaw Avenue, Suite 227" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002", - "country": "USA" - } - ], - "contact": [ - { - "name": { - "use": "official", - "family": "Dow", - "given": [ - "Jones" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "555-555-5555", - "use": "home" - } - ] - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Patient-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Patient-OPA-Patient1.json deleted file mode 100644 index 9dc299930..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Patient-OPA-Patient1.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "resourceType": "Patient", - "id": "OPA-Patient1", - "extension": [ - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2106-3", - "display": "White" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1002-5", - "display": "American Indian or Alaska Native" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2028-9", - "display": "Asian" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1586-7", - "display": "Shoshone" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2036-2", - "display": "Filipino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1735-0", - "display": "Alaska Native" - } - }, - { - "url": "text", - "valueString": "Mixed" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2135-2", - "display": "Hispanic or Latino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2184-0", - "display": "Dominican" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2148-5", - "display": "Mexican" - } - }, - { - "url": "text", - "valueString": "Hispanic or Latino" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", - "valueCode": "M" - } - ], - "identifier": [ - { - "use": "usual", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0203", - "code": "MR" - } - ] - }, - "system": "urn:oid:1.2.36.146.595.217.0.1", - "value": "12345", - "period": { - "start": "2001-05-06" - }, - "assigner": { - "display": "Acme Healthcare" - } - } - ], - "active": true, - "name": [ - { - "use": "official", - "family": "Chalmers", - "given": [ - "Peter", - "James" - ] - }, - { - "use": "usual", - "family": "Chalmers", - "given": [ - "Jim" - ] - }, - { - "use": "maiden", - "family": "Windsor", - "given": [ - "Peter", - "James" - ], - "period": { - "end": "2002" - } - } - ], - "telecom": [ - { - "system": "phone", - "value": "(03) 5555 6473", - "use": "work", - "rank": 1 - }, - { - "system": "phone", - "value": "(03) 3410 5613", - "use": "mobile", - "rank": 2 - }, - { - "system": "phone", - "value": "(03) 5555 8834", - "use": "old", - "period": { - "end": "2014" - } - } - ], - "gender": "male", - "birthDate": "1974-12-25", - "_birthDate": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime", - "valueDateTime": "1974-12-25T14:35:45-05:00" - } - ] - }, - "deceasedBoolean": false, - "address": [ - { - "use": "home", - "type": "both", - "text": "534 Erewhon St PeasantVille, Utah 84414", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "UT", - "postalCode": "84414", - "period": { - "start": "1974-12-25" - } - } - ], - "maritalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus", - "code": "M" - } - ] - }, - "contact": [ - { - "relationship": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0131", - "code": "N" - } - ] - } - ], - "name": { - "family": "du Marché", - "_family": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", - "valueString": "VV" - } - ] - }, - "given": [ - "Bénédicte" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "+33 (237) 998327" - } - ], - "address": { - "use": "home", - "type": "both", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "VT", - "postalCode": "3999", - "period": { - "start": "1974-12-25" - } - }, - "gender": "female", - "period": { - "start": "2012" - } - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Practitioner-OPA-AttendingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Practitioner-OPA-AttendingPhysician1.json deleted file mode 100644 index f009f2c02..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Practitioner-OPA-AttendingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-AttendingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-1

meta:

identifier: 9941339108, 25456

name: Ronald Bone

address: 1003 Healthcare Drive Amherst MA 01002 (HOME)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "9941339108" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "25456" - } - ], - "name": [ - { - "family": "Bone", - "given": [ - "Ronald" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "home", - "line": [ - "1003 Healthcare Drive" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Practitioner-OPA-OperatingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Practitioner-OPA-OperatingPhysician1.json deleted file mode 100644 index 697350aa7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Practitioner-OPA-OperatingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-OperatingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-2

meta:

identifier: 1245319599, 456789

name: Fielding Kathy

address: 1080 FIRST COLONIAL RD Virginia Beach VA 21454-2406 (WORK)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1245319599" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "456789" - } - ], - "name": [ - { - "family": "Kathy", - "given": [ - "Fielding" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "work", - "line": [ - "1080 FIRST COLONIAL RD" - ], - "city": "Virginia Beach", - "state": "VA", - "postalCode": "21454-2406" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Procedure-OPA-Procedure1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Procedure-OPA-Procedure1.json deleted file mode 100644 index ecd62e960..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Procedure-OPA-Procedure1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure1", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64612", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL NERVE, UNILATERAL (EG, FOR BLEPHAROSPASM, HEMIFACIAL SPASM)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Procedure-OPA-Procedure2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Procedure-OPA-Procedure2.json deleted file mode 100644 index 909cb9680..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Procedure-OPA-Procedure2.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure2", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64615", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL, TRIGEMINAL, CERVICAL SPINAL AND ACCESSORY NERVES, BILATERAL (EG, FOR CHRONIC MIGRAINE)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/ReferralRequest-OPA-ReferralRequest1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/ReferralRequest-OPA-ReferralRequest1.json deleted file mode 100644 index b1393653b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/ReferralRequest-OPA-ReferralRequest1.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "resourceType": "ReferralRequest", - "id": "OPA-ReferralRequest1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-crd/R4/StructureDefinition/profile-servicerequest-r4" - ] - }, - "status": "draft", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "99241", - "display": "Testing Service for Outpatient Prior Auth" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - }, - "authoredOn": "2018-08-08", - "insurance": [ - { - "reference": "Coverage/OPA-Coverage1" - } - ], - "requester": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "performer": [ - { - "reference": "Practitioner/OPA-OperatingPhysician1" - }, - { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/vocabulary/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/vocabulary/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/vocabulary/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/vocabulary/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/vocabulary/ValueSet-AdministrativeGender.json deleted file mode 100644 index 156220f9b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/vocabulary/ValueSet-AdministrativeGender.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "AdministrativeGender", - "meta": { - "versionId": "1", - "lastUpdated": "2022-02-11T20:37:50.811+00:00", - "source": "#5pAPnFaiCW12WWid" - }, - "url": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender", - "version": "1.1.0", - "name": "AdministrativeGender", - "title": "Administrative Gender", - "status": "draft", - "date": "2022-04-04T23:44:44+00:00", - "publisher": "Health Level Seven International", - "contact": [ - { - "name": "HL7 International - Public Health", - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pher" - } - ] - }, - { - "name": "Cynthia Bush, Health Scientist (Informatics), CDC/National Center for Health Statistics", - "telecom": [ - { - "system": "email", - "value": "pdz1@cdc.gov" - } - ] - }, - { - "name": "AbdulMalik Shakir, FHL7, President and Chief Informatics Scientist Hi3 Solutions", - "telecom": [ - { - "system": "email", - "value": "abdulmalik.shakir@hi3solutions.com" - } - ] - } - ], - "description": "The gender of a person used for administrative purposes.\n\n**Inter-jurisdictional Exchange (IJE) concept mapping**\n\n|VRDR IG Code | VRDR IG Display Name | IJE Code |IJE Display Name\n| -------- | -------- | -------- | --------|\n|male|Male|M|Male|\n|female|Female|F|Female|\n|UNK|unknown|U|Unknown|", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ], - "text": "US Realm" - } - ], - "compose": { - "include": [ - { - "system": "http://hl7.org/fhir/administrative-gender", - "concept": [ - { - "code": "male", - "display": "Male" - }, - { - "code": "female", - "display": "Female" - } - ] - }, - { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "concept": [ - { - "code": "UNK", - "display": "unknown" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/HelloWorld.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/HelloWorld.cql deleted file mode 100644 index 08a64478d..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/HelloWorld.cql +++ /dev/null @@ -1,29 +0,0 @@ -library HelloWorld version '1.0.0' - -using FHIR version '4.0.1' - -/* include FHIRHelpers version '4.0.1'*/ - - -context Patient - -define "Info": - 'info' - -define "Warning": - 'warning' - -define "Critical": - 'critical' - -define "Main Action Condition Expression Is True": - true - -define "Get Title": - 'Hello World!' - -define "Get Description": - 'The CDS Service is alive and communicating successfully!' - -define "Get Indicator": - 'info' \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql deleted file mode 100644 index bc45051cc..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql +++ /dev/null @@ -1,465 +0,0 @@ -library OutpatientPriorAuthorizationPrepopulation version '1.0.0' - -using FHIR version '4.0.1' - -// include FHIRCommon version '4.0.1' called FHIRCommon - - -include FHIRHelpers version '4.0.1' called FHIRHelpers - -/* parameter EncounterId String */ - - -parameter ClaimId String default '14703' - -context Patient - -define ClaimResource: - First([Claim] C - where C.id = ClaimId - ) - -define OrganizationFacility: - First([Organization] O - where EndsWith(ClaimResource.provider.reference, O.id) - ) - -define "FacilityName": - OrganizationFacility.name.value - -define "FacilityNPI": - ( OrganizationFacility.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -//This value intentionally left blank -//TODO: Consider removing from the Questionnaire? Where does this belong in a FHIR resource? - - - -define "FacilityPTAN": - null - -//This value intentionally left blank (TODO) - - -define "FacilityContractRegion": - null - -define function FindPractitioner(myCode String, mySequence Integer): - //If we can't find a Primary practicioner by code, use the sequence as a fallback. - - Coalesce(First([Practitioner] P //Practitioner who is on the careteam and contains a code that equals supplied code - - where EndsWith(First(ClaimResource.careTeam CT - where exists(CT.role.coding CTCode - where CTCode.code.value = myCode - ) - ).provider.reference, P.id - ) - ), First([Practitioner] P //Practitioner who is on the careteam and is of the supplied sequence - - where EndsWith(First(ClaimResource.careTeam CT - where CT.sequence = mySequence - ).provider.reference, P.id - ) - ) - ) - -define PractitionerOperatingPhysician: - FindPractitioner('primary', 1) - -define PractitionerAttendingPhysician: - FindPractitioner('assist', 2) - -// Should probably be seperate, Utiltiy files; but just for practice: - -//PATIENT INFO - - - -define OfficialName: - First(Patient.name name - where name.use.value = 'official' - ) - -define FirstName: - Patient.name[0] - -define BeneficiaryName: - Coalesce(OfficialName, FirstName) - -define "BeneficiaryFirstName": - BeneficiaryName.given[0].value - -define "BeneficiaryLastName": - BeneficiaryName.family.value - -define "BeneficiaryDOB": - Patient.birthDate.value - -define "BeneficiaryGender": - Patient.gender.value - -define RequestCoverage: - ClaimResource.insurance - -define CoverageResource: - First([Coverage] coverage - // pull coverage resource id from the service request insurance extension - - where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) - ) - -//Pull Medicare Number from the Patient FHIR Resource using the coding system - - -define PatientMedicareNumber: - First(Patient.identifier I - where(I.type.coding[0].system = 'http://terminology.hl7.org/CodeSystem/v2-0203' - and I.type.coding[0].code = 'MC' - ) - ).value.value - -// This first value was used in the first test case, but is probably incorrect in favor of PatientMedicareNumber -// TODO: Remove - - - -define "BeneficiaryMedicareID": - Coalesce(CoverageResource.subscriberId.value, PatientMedicareNumber) - -// OPERATING PHYSICIAN INFO - - -define "OperatingPhysicianFirstName": - PractitionerOperatingPhysician.name.given[0].value - -define "OperatingPhysicianLastName": - PractitionerOperatingPhysician.name.family.value - -define "OperatingPhysicianNPI": - ( PractitionerOperatingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -//This value intentionally left blank (TODO) - - -define "OperatingPhysicianPTAN": - null - -//Get work addres where available, then home, then just whatever you can. - - -define function FindAddress(P Practitioner): - Coalesce(First(P.address address - where address.use.value = 'work' - ), First(P.address address - where address.use.value = 'home' - ), First(P.address address) - ) - -define OperatingPhysicianAddress: - FindAddress(PractitionerOperatingPhysician) - -define "OperatingPhysicianAddress1": - OperatingPhysicianAddress.line[0].value - -define "OperatingPhysicianAddress2": - OperatingPhysicianAddress.line[1].value - -define "OperatingPhysicianAddressCity": - OperatingPhysicianAddress.city.value - -define "OperatingPhysicianAddressState": - OperatingPhysicianAddress.state.value - -define "OperatingPhysicianAddressZip": - OperatingPhysicianAddress.postalCode.value - -// Attending PHYSICIAN INFO - - -define "AttendingPhysicianSame": - case - when PractitionerAttendingPhysician is not null then false - else true end - -define "AttendingPhysicianFirstName": - PractitionerAttendingPhysician.name.given[0].value - -define "AttendingPhysicianLastName": - PractitionerAttendingPhysician.name.family.value - -define "AttendingPhysicianNPI": - ( PractitionerAttendingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -//This value intentionally left blank (TODO) - - -define "AttendingPhysicianPTAN": - null - -define AttendingPhysicianAddress: - FindAddress(PractitionerAttendingPhysician) - -define "AttendingPhysicianAddress1": - AttendingPhysicianAddress.line[0].value - -define "AttendingPhysicianAddress2": - AttendingPhysicianAddress.line[1].value - -define "AttendingPhysicianAddressCity": - AttendingPhysicianAddress.city.value - -define "AttendingPhysicianAddressState": - AttendingPhysicianAddress.state.value - -define "AttendingPhysicianAddressZip": - AttendingPhysicianAddress.postalCode.value - -//CLAIM INFORMATION - - -define ClaimDiagnosisReferenced: - First([Condition] C - where //First condition referenced by the Claim - exists(ClaimResource.diagnosis.diagnosis Condition - where EndsWith(Condition.reference, C.id) - ) - ).code.coding[0].code.value - -define ClaimDiagnosisCode: - ClaimResource.diagnosis.diagnosis.coding[0].code.value //TODO: Check for primary vs. secondary? - - -define "RequestDetailsPrimaryDiagnosisCode": - Coalesce(ClaimDiagnosisCode, ClaimDiagnosisReferenced) - -//This value intentionally left blank (TODO) - - -define "RequestDetailsSecondaryDiagnosisCode": - null - -//This value intentionally left blank (TODO) - - -define "RequestDetailsAdditionalDiagnosisCode1": - null - -//This value intentionally left blank (TODO) - - -define "RequestDetailsAdditionalDiagnosisCode2": - null - -// SUBMISSION INFORMATION -//This whole area is intentionally left blank, as one large TODO, but it also begs the same question -//Does this information belong in FHIR? Where? - - - - -define "RequestDetailsResubmition": - null - -define "RequestDetailsResubmissionUTN": - null - -define "RequestDetailsLifeThreatening": - null - -define "RequestDetailsLifeThreateningExplanation": - null - -//PROCEDURE INFORMATION - - -define RelevantReferencedProcedures: - [Procedure] P - where P.status.value != 'completed' - and exists ( ClaimResource.procedure Procedure - where EndsWith(Procedure.procedure.reference, P.id) - ) - -define function FindProcedure(proc String): - exists ( ClaimResource.procedure.procedure.coding P - where P.code.value = proc - ) - or exists ( RelevantReferencedProcedures.code.coding coding - where coding.code.value = proc - ) - -//There's gotta be a better way to do this. - - -define "RequestDetailsProcedureCode64612": - FindProcedure('64612') - -define "RequestDetailsProcedureCodeJ0585": - FindProcedure('J0585') - -define "RequestDetailsProcedureCodeJ0587": - FindProcedure('J0587') - -define "RequestDetailsProcedureCode64615": - FindProcedure('64615') - -define "RequestDetailsProcedureCodeJ0586": - FindProcedure('J0586') - -define "RequestDetailsProcedureCodeJ0588": - FindProcedure('J0588') - -define "RequestDetailsProcedureCode15820": - FindProcedure('15820') - -define "RequestDetailsProcedureCode15821": - FindProcedure('15821') - -define "RequestDetailsProcedureCode15822": - FindProcedure('15822') - -define "RequestDetailsProcedureCode15823": - FindProcedure('15823') - -define "RequestDetailsProcedureCode67900": - FindProcedure('67900') - -define "RequestDetailsProcedureCode67901": - FindProcedure('67901') - -define "RequestDetailsProcedureCode67902": - FindProcedure('67902') - -define "RequestDetailsProcedureCode67903": - FindProcedure('67903') - -define "RequestDetailsProcedureCode67904": - FindProcedure('67904') - -define "RequestDetailsProcedureCode67906": - FindProcedure('67906') - -define "RequestDetailsProcedureCode67908": - FindProcedure('67908') - -define "RequestDetailsProcedureCode22551": - FindProcedure('22551') - -define "RequestDetailsProcedureCode22552": - FindProcedure('22552') - -define "RequestDetailsProcedureCode63650": - FindProcedure('63650') - -define "RequestDetailsProcedureCode15830": - FindProcedure('15830') - -define "RequestDetailsProcedureCode15847": - FindProcedure('15847') - -define "RequestDetailsProcedureCode15877": - FindProcedure('15877') - -define "RequestDetailsProcedureCode20912": - FindProcedure('20912') - -define "RequestDetailsProcedureCode21210": - FindProcedure('21210') - -define "RequestDetailsProcedureCode30400": - FindProcedure('30400') - -define "RequestDetailsProcedureCode30410": - FindProcedure('30410') - -define "RequestDetailsProcedureCode30420": - FindProcedure('30420') - -define "RequestDetailsProcedureCode30430": - FindProcedure('30430') - -define "RequestDetailsProcedureCode30435": - FindProcedure('30435') - -define "RequestDetailsProcedureCode30450": - FindProcedure('30450') - -define "RequestDetailsProcedureCode30460": - FindProcedure('30460') - -define "RequestDetailsProcedureCode30462": - FindProcedure('30462') - -define "RequestDetailsProcedureCode30465": - FindProcedure('30465') - -define "RequestDetailsProcedureCode30520": - FindProcedure('30520') - -define "RequestDetailsProcedureCode36473": - FindProcedure('36473') - -define "RequestDetailsProcedureCode36474": - FindProcedure('36474') - -define "RequestDetailsProcedureCode36475": - FindProcedure('36475') - -define "RequestDetailsProcedureCode36476": - FindProcedure('36476') - -define "RequestDetailsProcedureCode36478": - FindProcedure('36478') - -define "RequestDetailsProcedureCode36479": - FindProcedure('36479') - -define "RequestDetailsProcedureCode36482": - FindProcedure('36482') - -define "RequestDetailsProcedureCode36483": - FindProcedure('36483') - -//This value intentionally left blank (TODO) - - -define "RequestDetailsProcedureCodeStaged": - null - -//This value intentionally left blank (TODO) - - -define "RequestDetailsProcedureCodeNumOfUnits": - null - -//REQUESTOR INFORMATION -//Again, this whole area left blank. -//I think we should probably remove these expressions from the Questionnaire altogether, but then, -//In a smart context, anyway, the 'current practitioner' is recorded, so... maybe it could be prefilled? -//Not sure. (TODO) - - - - - - -define "RequestorInformationName": - null - -define "RequestorInformationRepresentative": - null - -define "RequestorInformationPhone": - null - -define "RequestorInformationFax": - null - -define "RequestorInformationFacilityFax": - null \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-ASLPDataElements.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-ASLPDataElements.json deleted file mode 100644 index 06b7b851d..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-ASLPDataElements.json +++ /dev/null @@ -1,461 +0,0 @@ -{ - "resourceType": "Library", - "id": "ASLPDataElements", - "extension": [ - { - "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", - "valueReference": { - "reference": "Device/cqf-tooling" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Library/ASLPDataElements", - "name": "ASLPDataElements", - "relatedArtifact": [ - { - "type": "depends-on", - "display": "FHIR model information", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" - }, - { - "type": "depends-on", - "display": "Library FHIRHelpers", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRHelpers|4.1.000" - }, - { - "type": "depends-on", - "display": "Library FC", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRCommon|1.1.000" - }, - { - "type": "depends-on", - "display": "Library SC", - "resource": "http://example.org/sdh/dtr/aslp/Library/SDHCommon" - }, - { - "type": "depends-on", - "display": "Library Cs", - "resource": "http://example.org/sdh/dtr/aslp/Library/ASLPConcepts" - }, - { - "type": "depends-on", - "display": "Code system ASLP Codes", - "resource": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes" - }, - { - "type": "depends-on", - "display": "Code system ConditionVerificationStatusCodes", - "resource": "http://terminology.hl7.org/CodeSystem/condition-ver-status" - }, - { - "type": "depends-on", - "display": "Value set Diagnosis of Obstructive Sleep Apnea Codes", - "resource": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17" - }, - { - "type": "depends-on", - "display": "Value set Active Condition", - "resource": "http://fhir.org/guides/cqf/common/ValueSet/active-condition" - } - ], - "parameter": [ - { - "name": "Device Request", - "use": "in", - "min": 0, - "max": "*", - "type": "DeviceRequest" - }, - { - "name": "Device Request Id", - "use": "in", - "min": 0, - "max": "*", - "type": "string" - }, - { - "name": "Medication Request", - "use": "in", - "min": 0, - "max": "*", - "type": "MedicationRequest" - }, - { - "name": "Medication Request Id", - "use": "in", - "min": 0, - "max": "*", - "type": "string" - }, - { - "name": "Nutrition Order", - "use": "in", - "min": 0, - "max": "*", - "type": "NutritionOrder" - }, - { - "name": "Nutrition Order Id", - "use": "in", - "min": 0, - "max": "*", - "type": "string" - }, - { - "name": "Service Request", - "use": "in", - "min": 0, - "max": "*", - "type": "ServiceRequest" - }, - { - "name": "Service Request Id", - "use": "in", - "min": 0, - "max": "*", - "type": "string" - }, - { - "name": "Coverage Id", - "use": "in", - "min": 0, - "max": "*", - "type": "string" - }, - { - "name": "Patient", - "use": "out", - "min": 0, - "max": "1", - "type": "Patient" - }, - { - "name": "BMI", - "use": "out", - "min": 0, - "max": "1", - "type": "Quantity" - }, - { - "name": "Diagnosis of Obstructive Sleep Apnea", - "use": "out", - "min": 0, - "max": "1", - "type": "CodeableConcept" - }, - { - "name": "Height", - "use": "out", - "min": 0, - "max": "1", - "type": "Quantity" - }, - { - "name": "History of Diabetes", - "use": "out", - "min": 0, - "max": "1", - "type": "boolean" - }, - { - "name": "History of Hypertension", - "use": "out", - "min": 0, - "max": "1", - "type": "boolean" - }, - { - "name": "Neck Circumference", - "use": "out", - "min": 0, - "max": "1", - "type": "Quantity" - }, - { - "name": "Sleep Study", - "use": "out", - "min": 0, - "max": "*", - "type": "ServiceRequest" - }, - { - "name": "Sleep Study Code", - "use": "out", - "min": 0, - "max": "*", - "type": "CodeableConcept" - }, - { - "name": "Sleep Study Date", - "use": "out", - "min": 0, - "max": "*", - "type": "Any" - }, - { - "name": "Weight", - "use": "out", - "min": 0, - "max": "1", - "type": "Quantity" - } - ], - "dataRequirement": [ - { - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Patient" - ] - }, - { - "type": "Quantity", - "profile": [ - "http://hl7.org/fhir/Quantity" - ], - "mustSupport": [ - "value", - "comparator", - "system", - "system.value", - "value.value", - "code", - "code.value", - "unit", - "unit.value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ObservationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "Observation", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Observation" - ], - "mustSupport": [ - "code", - "status" - ], - "codeFilter": [ - { - "path": "code", - "code": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE22", - "display": "BMI" - } - ] - } - ] - }, - { - "type": "Observation", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Observation" - ], - "mustSupport": [ - "code", - "status" - ], - "codeFilter": [ - { - "path": "code", - "code": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE20", - "display": "Body height" - } - ] - } - ] - }, - { - "type": "Observation", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Observation" - ], - "mustSupport": [ - "code", - "status", - "value" - ], - "codeFilter": [ - { - "path": "code", - "code": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE19", - "display": "History of Diabetes" - } - ] - } - ] - }, - { - "type": "Observation", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Observation" - ], - "mustSupport": [ - "code", - "status" - ], - "codeFilter": [ - { - "path": "code", - "code": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE23", - "display": "Neck Circumference" - } - ] - } - ] - }, - { - "type": "Observation", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Observation" - ], - "mustSupport": [ - "code", - "status" - ], - "codeFilter": [ - { - "path": "code", - "code": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE21", - "display": "Weight" - } - ] - } - ] - }, - { - "type": "Observation", - "profile": [ - "http://hl7.org/fhir/Observation" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "Condition", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Condition" - ], - "mustSupport": [ - "code", - "clinicalStatus", - "verificationStatus" - ], - "codeFilter": [ - { - "path": "code", - "code": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE19", - "display": "History of Diabetes" - } - ] - } - ] - }, - { - "type": "Condition", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Condition" - ], - "mustSupport": [ - "code", - "clinicalStatus", - "verificationStatus" - ], - "codeFilter": [ - { - "path": "code", - "valueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17" - } - ] - }, - { - "type": "Condition", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Condition" - ], - "mustSupport": [ - "code", - "clinicalStatus", - "verificationStatus" - ], - "codeFilter": [ - { - "path": "code", - "code": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE18", - "display": "History of Hypertension" - } - ] - } - ] - }, - { - "type": "Condition", - "profile": [ - "http://hl7.org/fhir/Condition" - ], - "mustSupport": [ - "code" - ] - }, - { - "type": "Quantity", - "profile": [ - "urn:hl7-org:elm-types:r1/Quantity" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "string", - "profile": [ - "http://hl7.org/fhir/string" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "ServiceRequest", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/ServiceRequest" - ], - "mustSupport": [ - "id" - ] - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/ASLPDataElements.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Questionnaire-ASLPA1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Questionnaire-ASLPA1.json deleted file mode 100644 index 1d81612d9..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Questionnaire-ASLPA1.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "ASLPA1", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "shareable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "computable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "publishable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "structured" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://example.org/sdh/dtr/aslp/Library/ASLPDataElements" - } - ], - "url": "http://example.org/sdh/dtr/aslp/Questionnaire/ASLPA1", - "name": "ASLPA1", - "title": "ASLP.A1 Adult Sleep Studies", - "status": "active", - "experimental": false, - "description": "Adult Sleep Studies Prior Authorization Form", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Sleep Study" - } - } - ], - "linkId": "0", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order", - "text": "A sleep study procedure being ordered", - "type": "group", - "repeats": true, - "item": [ - { - "linkId": "1", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.code", - "text": "A sleep study procedure being ordered", - "type": "choice", - "required": true, - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper" - }, - { - "linkId": "2", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.occurrenceDateTime", - "text": "Date of the procedure", - "type": "dateTime", - "required": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Diagnosis of Obstructive Sleep Apnea" - } - } - ], - "linkId": "3", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-diagnosis-of-obstructive-sleep-apnea#Condition.code", - "text": "Diagnosis of Obstructive Sleep Apnea", - "type": "choice", - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "History of Hypertension" - } - } - ], - "linkId": "4", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-hypertension#Observation.value[x]", - "text": "History of Hypertension", - "type": "boolean" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "History of Diabetes" - } - } - ], - "linkId": "5", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-diabetes#Observation.value[x]", - "text": "History of Diabetes", - "type": "boolean" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Neck Circumference" - } - } - ], - "linkId": "6", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Neck circumference (in inches)", - "type": "quantity" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Height" - } - } - ], - "linkId": "7", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Height (in inches)", - "type": "quantity" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Weight" - } - } - ], - "linkId": "8", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-weight#Observation.value[x]", - "text": "Weight (in pounds)", - "type": "quantity" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BMI" - } - } - ], - "linkId": "9", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-bmi#Observation.value[x]", - "text": "Body mass index (BMI)", - "type": "quantity" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Questionnaire-ASLPA1-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Questionnaire-ASLPA1-positive.json deleted file mode 100644 index 04604d201..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Questionnaire-ASLPA1-positive.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "ASLPA1-positive", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "shareable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "computable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "publishable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "structured" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://example.org/sdh/dtr/aslp/Library/ASLPDataElements" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate-subject", - "valueReference": { - "reference": "Patient/positive" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Questionnaire/ASLPA1", - "name": "ASLPA1", - "title": "ASLP.A1 Adult Sleep Studies", - "status": "active", - "experimental": false, - "description": "Adult Sleep Studies Prior Authorization Form", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Sleep Study" - } - } - ], - "linkId": "0", - "text": "A sleep study procedure being ordered", - "type": "group", - "repeats": true, - "item": [ - { - "linkId": "1", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.code", - "text": "A sleep study procedure being ordered", - "type": "choice", - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE14", - "display": "Artificial intelligence (AI)" - } - } - ] - }, - { - "linkId": "2", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.occurrenceDateTime", - "text": "Date of the procedure", - "type": "dateTime", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueDateTime": "2023-04-15" - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Sleep Study" - } - } - ], - "linkId": "0", - "text": "A sleep study procedure being ordered", - "type": "group", - "repeats": true, - "item": [ - { - "linkId": "1", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.code", - "text": "A sleep study procedure being ordered", - "type": "choice", - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE2", - "display": "Home sleep apnea testing (HSAT)" - } - } - ] - }, - { - "linkId": "2", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.occurrenceDateTime", - "text": "Date of the procedure", - "type": "dateTime", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueDateTime": "2023-04-10" - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Diagnosis of Obstructive Sleep Apnea" - } - } - ], - "linkId": "3", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-diagnosis-of-obstructive-sleep-apnea#Condition.code", - "text": "Diagnosis of Obstructive Sleep Apnea", - "type": "choice", - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE17", - "display": "Obstructive sleep apnea (OSA)" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "History of Hypertension" - } - } - ], - "linkId": "4", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-hypertension#Observation.value[x]", - "text": "History of Hypertension", - "type": "boolean", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueBoolean": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "History of Diabetes" - } - } - ], - "linkId": "5", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-diabetes#Observation.value[x]", - "text": "History of Diabetes", - "type": "boolean", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueBoolean": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Neck Circumference" - } - } - ], - "linkId": "6", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Neck circumference (in inches)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 16, - "unit": "[in_i]", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Height" - } - } - ], - "linkId": "7", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Height (in inches)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 69, - "unit": "[in_i]", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Weight" - } - } - ], - "linkId": "8", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-weight#Observation.value[x]", - "text": "Weight (in pounds)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 185, - "unit": "[lb_av]", - "system": "http://unitsofmeasure.org", - "code": "[lb_av]" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BMI" - } - } - ], - "linkId": "9", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-bmi#Observation.value[x]", - "text": "Body mass index (BMI)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 16.2, - "unit": "kg/m2", - "system": "http://unitsofmeasure.org", - "code": "kg/m2" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json deleted file mode 100644 index a9d0f469b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json +++ /dev/null @@ -1,574 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "ASLPA1-positive-response", - "contained": [ - { - "resourceType": "Questionnaire", - "id": "ASLPA1-positive", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "shareable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "computable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "publishable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "structured" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://example.org/sdh/dtr/aslp/Library/ASLPDataElements" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate-subject", - "valueReference": { - "reference": "Patient/positive" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Questionnaire/ASLPA1", - "name": "ASLPA1", - "title": "ASLP.A1 Adult Sleep Studies", - "status": "active", - "experimental": false, - "description": "Adult Sleep Studies Prior Authorization Form", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Sleep Study" - } - } - ], - "linkId": "0", - "text": "A sleep study procedure being ordered", - "type": "group", - "repeats": true, - "item": [ - { - "linkId": "1", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.code", - "text": "A sleep study procedure being ordered", - "type": "choice", - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE14", - "display": "Artificial intelligence (AI)" - } - } - ] - }, - { - "linkId": "2", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.occurrenceDateTime", - "text": "Date of the procedure", - "type": "dateTime", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueDateTime": "2023-04-15" - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Sleep Study" - } - } - ], - "linkId": "0", - "text": "A sleep study procedure being ordered", - "type": "group", - "repeats": true, - "item": [ - { - "linkId": "1", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.code", - "text": "A sleep study procedure being ordered", - "type": "choice", - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE2", - "display": "Home sleep apnea testing (HSAT)" - } - } - ] - }, - { - "linkId": "2", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.occurrenceDateTime", - "text": "Date of the procedure", - "type": "dateTime", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueDateTime": "2023-04-10" - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Diagnosis of Obstructive Sleep Apnea" - } - } - ], - "linkId": "3", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-diagnosis-of-obstructive-sleep-apnea#Condition.code", - "text": "Diagnosis of Obstructive Sleep Apnea", - "type": "choice", - "answerValueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE17", - "display": "Obstructive sleep apnea (OSA)" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "History of Hypertension" - } - } - ], - "linkId": "4", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-hypertension#Observation.value[x]", - "text": "History of Hypertension", - "type": "boolean", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueBoolean": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "History of Diabetes" - } - } - ], - "linkId": "5", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-diabetes#Observation.value[x]", - "text": "History of Diabetes", - "type": "boolean", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueBoolean": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Neck Circumference" - } - } - ], - "linkId": "6", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Neck circumference (in inches)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 16, - "unit": "[in_i]", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Height" - } - } - ], - "linkId": "7", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Height (in inches)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 69, - "unit": "[in_i]", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Weight" - } - } - ], - "linkId": "8", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-weight#Observation.value[x]", - "text": "Weight (in pounds)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 185, - "unit": "[lb_av]", - "system": "http://unitsofmeasure.org", - "code": "[lb_av]" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BMI" - } - } - ], - "linkId": "9", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-bmi#Observation.value[x]", - "text": "Body mass index (BMI)", - "type": "quantity", - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueQuantity": { - "value": 16.2, - "unit": "kg/m2", - "system": "http://unitsofmeasure.org", - "code": "kg/m2" - } - } - ] - } - ] - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaireresponse-response", - "valueReference": { - "reference": "#ASLPA1-positive" - } - } - ], - "questionnaire": "http://example.org/sdh/dtr/aslp/Questionnaire/ASLPA1", - "status": "in-progress", - "subject": { - "reference": "Patient/positive" - }, - "item": [ - { - "linkId": "0", - "text": "A sleep study procedure being ordered", - "item": [ - { - "linkId": "1", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.code", - "text": "A sleep study procedure being ordered", - "answer": [ - { - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE14", - "display": "Artificial intelligence (AI)" - } - } - ] - }, - { - "linkId": "2", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.occurrenceDateTime", - "text": "Date of the procedure", - "answer": [ - { - "valueDateTime": "2023-04-15" - } - ] - } - ] - }, - { - "linkId": "0", - "text": "A sleep study procedure being ordered", - "item": [ - { - "linkId": "1", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.code", - "text": "A sleep study procedure being ordered", - "answer": [ - { - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE2", - "display": "Home sleep apnea testing (HSAT)" - } - } - ] - }, - { - "linkId": "2", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order#ServiceRequest.occurrenceDateTime", - "text": "Date of the procedure", - "answer": [ - { - "valueDateTime": "2023-04-10" - } - ] - } - ] - }, - { - "linkId": "3", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-diagnosis-of-obstructive-sleep-apnea#Condition.code", - "text": "Diagnosis of Obstructive Sleep Apnea", - "answer": [ - { - "valueCoding": { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE17", - "display": "Obstructive sleep apnea (OSA)" - } - } - ] - }, - { - "linkId": "4", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-hypertension#Observation.value[x]", - "text": "History of Hypertension", - "answer": [ - { - "valueBoolean": true - } - ] - }, - { - "linkId": "5", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-diabetes#Observation.value[x]", - "text": "History of Diabetes", - "answer": [ - { - "valueBoolean": true - } - ] - }, - { - "linkId": "6", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Neck circumference (in inches)", - "answer": [ - { - "valueQuantity": { - "value": 16, - "unit": "[in_i]", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } - } - ] - }, - { - "linkId": "7", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height#Observation.value[x]", - "text": "Height (in inches)", - "answer": [ - { - "valueQuantity": { - "value": 69, - "unit": "[in_i]", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } - } - ] - }, - { - "linkId": "8", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-weight#Observation.value[x]", - "text": "Weight (in pounds)", - "answer": [ - { - "valueQuantity": { - "value": 185, - "unit": "[lb_av]", - "system": "http://unitsofmeasure.org", - "code": "[lb_av]" - } - } - ] - }, - { - "linkId": "9", - "definition": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-bmi#Observation.value[x]", - "text": "Body mass index (BMI)", - "answer": [ - { - "valueQuantity": { - "value": 16.2, - "unit": "kg/m2", - "system": "http://unitsofmeasure.org", - "code": "kg/m2" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-FHIRHelpers.json deleted file mode 100644 index 001e14771..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-FHIRHelpers.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRHelpers", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "shareable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "computable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "publishable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "executable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "structured" - } - ], - "url": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers", - "version": "4.0.1", - "name": "FHIRHelpers", - "title": "FHIR Helpers", - "status": "active", - "experimental": false, - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/library-type", - "code": "logic-library" - } - ] - }, - "date": "2020-11-29T15:54:22-07:00", - "publisher": "Alphora", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://alphora.com" - } - ] - } - ], - "description": "This library defines functions to convert between FHIR data types and CQL system-defined types, as well as functions to support FHIRPath implementation. For more information, the FHIRHelpers wiki page: https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers", - "jurisdiction": [ - { - "coding": [ - { - "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", - "code": "001" - } - ] - } - ], - "copyright": "© Alphora 2019+", - "approvalDate": "2021-03-12", - "lastReviewDate": "2021-03-12", - "topic": [ - { - "text": "FHIR" - }, - { - "text": "CQL" - } - ], - "relatedArtifact": [ - { - "type": "documentation", - "display": "Using FHIR Helpers", - "url": "https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers" - }, - { - "type": "depends-on", - "display": "FHIR model information", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRHelpers.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json deleted file mode 100644 index a60305656..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "resourceType": "Library", - "id": "OutpatientPriorAuthorizationPrepopulation", - "meta": { - "versionId": "4", - "lastUpdated": "2023-01-04T22:42:31.776+00:00", - "source": "#jvktlnzFIHZuPkeq" - }, - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationPrepopulation", - "title": "Outpatient Prior Authorization Prepopulation", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "relatedArtifact": [ - { - "type": "depends-on", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1" - } - ], - "dataRequirement": [ - { - "type": "ServiceRequest" - }, - { - "type": "Procedure" - }, - { - "type": "Claim" - }, - { - "type": "Organization" - }, - { - "type": "Practitioner" - }, - { - "type": "Coverage" - }, - { - "type": "Condition" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/OutpatientPriorAuthorizationPrepopulation.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json deleted file mode 100644 index 0907728a1..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json +++ /dev/null @@ -1,568 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-Errors", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation-Errors" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-Errors", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianPTAN" - } - } - ], - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianPTAN" - } - } - ], - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json deleted file mode 100644 index 553779fff..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-noLibrary", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-noLibrary", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json deleted file mode 100644 index 339fc076e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ /dev/null @@ -1,1599 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest", - "meta": { - "versionId": "1", - "lastUpdated": "2023-04-17T19:26:50.283+00:00", - "source": "#gleANq6sb4bT35uw", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation|1.0.0" - } - ], - "url": "http://mcg.com/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityContractRegion" - } - } - ], - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianPTAN" - } - } - ], - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianPTAN" - } - } - ], - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - }, - { - "linkId": "5", - "text": "Request Details", - "type": "group", - "item": [ - { - "linkId": "5.1", - "text": "Is this a ", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsResubmition" - } - } - ], - "linkId": "5.1.1", - "text": "Resubmission?", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsResubmitionUTN" - } - } - ], - "linkId": "5.1.2", - "text": "Please provide UTN", - "type": "string", - "enableWhen": [ - { - "question": "5.1.1", - "operator": "=", - "answerBoolean": true - } - ], - "required": true - } - ] - }, - { - "linkId": "5.2", - "text": "Is this ", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsLifeThreatening" - } - } - ], - "linkId": "5.2.1", - "text": "Life Threatening?", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsLifeThreateningExplanation" - } - } - ], - "linkId": "5.2.2", - "text": "Please explain", - "type": "string", - "enableWhen": [ - { - "question": "5.2.1", - "operator": "=", - "answerBoolean": true - } - ], - "required": true - } - ] - }, - { - "linkId": "5.3", - "text": "Diagnosis", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsPrimaryDiagnosisCode" - } - } - ], - "linkId": "5.3.1", - "text": "Primary Diagnosis Code", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsSecondaryDiagnosisCode" - } - } - ], - "linkId": "5.3.2", - "text": "Secondary Diagnosis Code", - "type": "string", - "required": true - }, - { - "linkId": "5.3.3", - "text": "Additional Diagnosis Code(s)", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsAdditionalDiagnosisCode1" - } - } - ], - "linkId": "5.3.3.1", - "text": "Diagnosis Code 1", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsAdditionalDiagnosisCode2" - } - } - ], - "linkId": "5.3.3.2", - "text": "Diagnosis Code 2", - "type": "string", - "required": false - } - ] - } - ] - }, - { - "linkId": "5.4", - "text": "Procedure Codes -Please select all procedure codes for this request", - "type": "group", - "item": [ - { - "linkId": "5.4.1", - "text": "Botox", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode64612" - } - } - ], - "linkId": "5.4.1.1", - "text": "64612", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0585" - } - } - ], - "linkId": "5.4.1.2", - "text": "J0585", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0587" - } - } - ], - "linkId": "5.4.1.3", - "text": "J0587", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode64615" - } - } - ], - "linkId": "5.4.1.4", - "text": "64615", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0586" - } - } - ], - "linkId": "5.4.1.5", - "text": "J0586", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0588" - } - } - ], - "linkId": "5.4.1.6", - "text": "J0588", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.2", - "text": "Blepharoplasty", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15820" - } - } - ], - "linkId": "5.4.2.1", - "text": "15820", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15821" - } - } - ], - "linkId": "5.4.2.2", - "text": "15821", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15822" - } - } - ], - "linkId": "5.4.2.3", - "text": "15822", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15823" - } - } - ], - "linkId": "5.4.2.4", - "text": "15823", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67900" - } - } - ], - "linkId": "5.4.2.5", - "text": "67900", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67901" - } - } - ], - "linkId": "5.4.2.6", - "text": "67901", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67902" - } - } - ], - "linkId": "5.4.2.7", - "text": "67902", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67903" - } - } - ], - "linkId": "5.4.2.8", - "text": "67903", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67904" - } - } - ], - "linkId": "5.4.2.9", - "text": "67904", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67906" - } - } - ], - "linkId": "5.4.2.10", - "text": "67906", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67908" - } - } - ], - "linkId": "5.4.2.11", - "text": "67908", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.3", - "text": "Cervical Fusion with Disc Removal", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode22551" - } - } - ], - "linkId": "5.4.3.1", - "text": "22551", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode22552" - } - } - ], - "linkId": "5.4.3.2", - "text": "22552", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.4", - "text": "Implanted Spinal Neurostimulators", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode63650" - } - } - ], - "linkId": "5.4.4.1", - "text": "63650", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.5", - "text": "Panniculectomy", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15830" - } - } - ], - "linkId": "5.4.5.1", - "text": "15830", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15847" - } - } - ], - "linkId": "5.4.5.2", - "text": "15847", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15877" - } - } - ], - "linkId": "5.4.5.3", - "text": "15877", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.6", - "text": "Rhinoplasty", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode20912" - } - } - ], - "linkId": "5.4.6.1", - "text": "20912", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode21210" - } - } - ], - "linkId": "5.4.6.2", - "text": "21210", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30400" - } - } - ], - "linkId": "5.4.6.3", - "text": "30400", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30410" - } - } - ], - "linkId": "5.4.6.4", - "text": "30410", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30420" - } - } - ], - "linkId": "5.4.6.5", - "text": "30420", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30430" - } - } - ], - "linkId": "5.4.6.6", - "text": "30430", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30435" - } - } - ], - "linkId": "5.4.6.7", - "text": "30435", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30450" - } - } - ], - "linkId": "5.4.6.8", - "text": "30450", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30460" - } - } - ], - "linkId": "5.4.6.9", - "text": "30460", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30462" - } - } - ], - "linkId": "5.4.6.10", - "text": "30462", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30465" - } - } - ], - "linkId": "5.4.6.11", - "text": "30465", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30520" - } - } - ], - "linkId": "5.4.6.12", - "text": "30520", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.7", - "text": "Vein Ablation", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36473" - } - } - ], - "linkId": "5.4.7.1", - "text": "36473", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36474" - } - } - ], - "linkId": "5.4.7.2", - "text": "36474", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36475" - } - } - ], - "linkId": "5.4.7.3", - "text": "36475", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36476" - } - } - ], - "linkId": "5.4.7.4", - "text": "36476", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36478" - } - } - ], - "linkId": "5.4.7.5", - "text": "36478", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36479" - } - } - ], - "linkId": "5.4.7.6", - "text": "36479", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36482" - } - } - ], - "linkId": "5.4.7.7", - "text": "36482", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36483" - } - } - ], - "linkId": "5.4.7.8", - "text": "36483", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeStaged" - } - } - ], - "linkId": "5.4.7.9", - "text": "Staged Procedure", - "type": "boolean", - "required": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeStaged" - } - } - ], - "linkId": "5.4.8", - "text": "Number of Units Requested (Required for requests with J0585, J0586, J0587, or J0588 only)", - "type": "string", - "enableWhen": [ - { - "question": "5.4.1.2", - "operator": "=", - "answerBoolean": true - }, - { - "question": "5.4.1.3", - "operator": "=", - "answerBoolean": true - }, - { - "question": "5.4.1.5", - "operator": "exists", - "answerBoolean": true - }, - { - "question": "5.4.1.6", - "operator": "exists", - "answerBoolean": true - } - ], - "enableBehavior": "any", - "required": true - } - ] - } - ] - }, - { - "linkId": "6", - "text": "Requestor Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationName" - } - } - ], - "linkId": "6.1", - "text": "Requestor Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationRepresentative" - } - } - ], - "linkId": "6.2", - "text": "Requestor is a representative of the...", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "RequestorInformationRepresentative-Hospital", - "valueCoding": { - "code": "hospital", - "display": "Hospital Outpatient Department" - } - }, - { - "id": "RequestorInformationRepresentativePhysNpp", - "valueCoding": { - "code": "physnpp", - "display": "Physician/NPP" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationPhone" - } - } - ], - "linkId": "6.3", - "text": "Requestor Phone", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationFax" - } - } - ], - "linkId": "6.4", - "text": "Requestor Fax", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationFacilityFax" - } - } - ], - "linkId": "6.5", - "text": "Requestor Facility Fax", - "type": "string", - "required": true - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-RouteOnePatient.json deleted file mode 100644 index 12490e694..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-RouteOnePatient.json +++ /dev/null @@ -1,2470 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOnePatient", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Base.Individuals" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "normative" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", - "valueCode": "4.0.0" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 5 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "patient" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient", - "version": "4.3.0", - "name": "RouteOnePatient", - "title": "Beneficiary Information", - "status": "active", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "purpose": "Tracking patient is the center of the healthcare process.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "cda", - "uri": "http://hl7.org/v3/cda", - "name": "CDA (R2)" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - }, - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "loinc", - "uri": "http://loinc.org", - "name": "LOINC code for the element" - } - ], - "kind": "resource", - "abstract": false, - "type": "Patient", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Patient", - "path": "Patient", - "short": "Information about an individual or animal receiving health care services", - "definition": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "alias": [ - "SubjectOfCare Client Resident" - ], - "min": 0, - "max": "*", - "base": { - "path": "Patient", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "rim", - "map": "Patient[classCode=PAT]" - }, - { - "identity": "cda", - "map": "ClinicalDocument.recordTarget.patientRole" - }, - { - "identity": "w5", - "map": "administrative.individual" - } - ] - }, - { - "id": "Patient.id", - "path": "Patient.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Patient.meta", - "path": "Patient.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Patient.implicitRules", - "path": "Patient.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Patient.language", - "path": "Patient.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Patient.text", - "path": "Patient.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Patient.contained", - "path": "Patient.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Patient" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.extension", - "path": "Patient.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.modifierExtension", - "path": "Patient.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "short": "An identifier for this patient", - "definition": "An identifier for this patient.", - "requirements": "Patients are almost always assigned specific numerical identifiers.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.identifier" - }, - { - "identity": "v2", - "map": "PID-3" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": ".id" - } - ] - }, - { - "id": "Patient.active", - "path": "Patient.active", - "short": "Whether this patient's record is in active use", - "definition": "Whether this patient record is in active use. \nMany systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.\n\nIt is often used to filter patient lists to exclude inactive patients\n\nDeceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", - "comment": "If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient.", - "requirements": "Need to be able to mark a patient record as not to be used because it was created in error.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.active", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element", - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labelled as a modifier because it is a status element that can indicate that a record should not be treated as valid", - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.status" - }, - { - "identity": "rim", - "map": "statusCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.name", - "path": "Patient.name", - "short": "A name associated with the patient", - "definition": "A name associated with the individual.", - "comment": "A patient may have multiple names with different uses or applicable periods. For animals, the name is a \"HumanName\" in the sense that is assigned and used by humans and has the same patterns.", - "requirements": "Need to be able to track the patient by multiple names. Examples are your official name and a partner name.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.name", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-5, PID-9" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": ".patient.name" - } - ] - }, - { - "id": "Patient.telecom", - "path": "Patient.telecom", - "short": "A contact detail for the individual", - "definition": "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", - "comment": "A Patient may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and also to help with identification. The address might not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone).", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-13, PID-14, PID-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": ".telecom" - } - ] - }, - { - "id": "Patient.gender", - "path": "Patient.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", - "comment": "The gender might not match the biological sex as determined by genetics or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than male and female, though the vast majority of systems and contexts only support male and female. Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific sex or gender aspect of interest (anatomical, chromosomal, social, etc.) However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice. Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosomal and other gender aspects. For example, an alert about a hysterectomy on a male should be handled as a warning or overridable error, not a \"hard\" error. See the Patient Gender and Sex section for additional information about communicating patient gender and sex.", - "requirements": "Needed for identification of the individual, in combination with (at least) name and birth date.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-8" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": ".patient.administrativeGenderCode" - } - ] - }, - { - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "short": "The date of birth for the individual", - "definition": "The date of birth for the individual.", - "comment": "At least an estimated year should be provided as a guess if the real DOB is unknown There is a standard extension \"patient-birthTime\" available that should be used where Time is required (such as in maternity/infant care systems).", - "requirements": "Age of the individual drives many clinical processes.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.birthDate", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "date" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-7" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime" - }, - { - "identity": "cda", - "map": ".patient.birthTime" - }, - { - "identity": "loinc", - "map": "21112-8" - } - ] - }, - { - "id": "Patient.deceased[x]", - "path": "Patient.deceased[x]", - "short": "Indicates if the individual is deceased or not", - "definition": "Indicates if the individual is deceased or not.", - "comment": "If there's no value in the instance, it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive.", - "requirements": "The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.deceased[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - }, - { - "code": "dateTime" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labeled as a modifier because once a patient is marked as deceased, the actions that are appropriate to perform on the patient may be significantly different.", - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-30 (bool) and PID-29 (datetime)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.address", - "path": "Patient.address", - "short": "An address for the individual", - "definition": "An address for the individual.", - "comment": "Patient may have multiple addresses with different uses or applicable periods.", - "requirements": "May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.address", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-11" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": ".addr" - } - ] - }, - { - "id": "Patient.maritalStatus", - "path": "Patient.maritalStatus", - "short": "Marital (civil) status of a patient", - "definition": "This field contains a patient's most recent marital (civil) status.", - "requirements": "Most, if not all systems capture it.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.maritalStatus", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "MaritalStatus" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "extensible", - "description": "The domestic partnership status of a person.", - "valueSet": "http://hl7.org/fhir/ValueSet/marital-status" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-16" - }, - { - "identity": "rim", - "map": "player[classCode=PSN]/maritalStatusCode" - }, - { - "identity": "cda", - "map": ".patient.maritalStatusCode" - } - ] - }, - { - "id": "Patient.multipleBirth[x]", - "path": "Patient.multipleBirth[x]", - "short": "Whether patient is part of a multiple birth", - "definition": "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", - "comment": "Where the valueInteger is provided, the number is the birth number in the sequence. E.g. The middle birth in triplets would be valueInteger=2 and the third born would have valueInteger=3 If a boolean value was provided for this triplets example, then all 3 patient records would have valueBoolean=true (the ordering is not indicated).", - "requirements": "For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.multipleBirth[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - }, - { - "code": "integer" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-24 (bool), PID-25 (integer)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.photo", - "path": "Patient.photo", - "short": "Image of the patient", - "definition": "Image of the patient.", - "comment": "Guidelines:\n* Use id photos, not clinical photos.\n* Limit dimensions to thumbnail.\n* Keep byte count low to ease resource updates.", - "requirements": "Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.photo", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Attachment" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "OBX-5 - needs a profile" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Contact" - } - ], - "path": "Patient.contact", - "short": "A contact party (e.g. guardian, partner, friend) for the patient", - "definition": "A contact party (e.g. guardian, partner, friend) for the patient.", - "comment": "Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact.", - "requirements": "Need to track people you can contact about the patient.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "pat-1", - "severity": "error", - "human": "SHALL at least contain a contact's details or a reference to an organization", - "expression": "name.exists() or telecom.exists() or address.exists() or organization.exists()", - "xpath": "exists(f:name) or exists(f:telecom) or exists(f:address) or exists(f:organization)", - "source": "http://hl7.org/fhir/StructureDefinition/Patient" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.id", - "path": "Patient.contact.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.extension", - "path": "Patient.contact.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.modifierExtension", - "path": "Patient.contact.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.contact.relationship", - "path": "Patient.contact.relationship", - "short": "The kind of relationship", - "definition": "The nature of the relationship between the patient and the contact person.", - "requirements": "Used to determine which contact person is the most relevant to approach, depending on circumstances.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact.relationship", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ContactRelationship" - } - ], - "strength": "extensible", - "description": "The nature of the relationship between a patient and a contact person for that patient.", - "valueSet": "http://hl7.org/fhir/ValueSet/patient-contactrelationship" - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-7, NK1-3" - }, - { - "identity": "rim", - "map": "code" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.name", - "path": "Patient.contact.name", - "short": "A name associated with the contact person", - "definition": "A name associated with the contact person.", - "requirements": "Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.name", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-2" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.telecom", - "path": "Patient.contact.telecom", - "short": "A contact detail for the person", - "definition": "A contact detail for the person, e.g. a telephone number or an email address.", - "comment": "Contact may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently, and also to help with identification.", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-5, NK1-6, NK1-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.address", - "path": "Patient.contact.address", - "short": "Address for the contact person", - "definition": "Address for the contact person.", - "requirements": "Need to keep track where the contact person can be contacted per postal mail or visited.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.address", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-4" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.gender", - "path": "Patient.contact.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", - "requirements": "Needed to address the person correctly.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-15" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.organization", - "path": "Patient.contact.organization", - "short": "Organization that is associated with the contact", - "definition": "Organization on behalf of which the contact is acting or for which the contact is working.", - "requirements": "For guardians or business related contacts, the organization is relevant.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.organization", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "condition": [ - "pat-1" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-13, NK1-30, NK1-31, NK1-32, NK1-41" - }, - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.period", - "path": "Patient.contact.period", - "short": "The period during which this contact person or organization is valid to be contacted relating to this patient", - "definition": "The period during which this contact person or organization is valid to be contacted relating to this patient.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.period", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "effectiveTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication", - "path": "Patient.communication", - "short": "A language which may be used to communicate with the patient about his or her health", - "definition": "A language which may be used to communicate with the patient about his or her health.", - "comment": "If no language is specified, this *implies* that the default local language is spoken. If you need to convey proficiency for multiple modes, then you need multiple Patient.Communication associations. For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required.", - "requirements": "If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency are important things to keep track of both for patient and other persons of interest.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.communication", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "LanguageCommunication" - }, - { - "identity": "cda", - "map": "patient.languageCommunication" - } - ] - }, - { - "id": "Patient.communication.id", - "path": "Patient.communication.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.extension", - "path": "Patient.communication.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.modifierExtension", - "path": "Patient.communication.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.communication.language", - "path": "Patient.communication.language", - "short": "The language which can be used to communicate with the patient about his or her health", - "definition": "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", - "comment": "The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.", - "requirements": "Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.communication.language", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-15, LAN-2" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code" - }, - { - "identity": "cda", - "map": ".languageCode" - } - ] - }, - { - "id": "Patient.communication.preferred", - "path": "Patient.communication.preferred", - "short": "Language preference indicator", - "definition": "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", - "comment": "This language is specifically identified for communicating healthcare information.", - "requirements": "People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.communication.preferred", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-15" - }, - { - "identity": "rim", - "map": "preferenceInd" - }, - { - "identity": "cda", - "map": ".preferenceInd" - } - ] - }, - { - "id": "Patient.generalPractitioner", - "path": "Patient.generalPractitioner", - "short": "Patient's nominated primary care provider", - "definition": "Patient's nominated care provider.", - "comment": "This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disability setting, or even organization that will provide people to perform the care provider roles. It is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources.\nMultiple GPs may be recorded against the patient for various reasons, such as a student that has his home GP listed along with the GP at university during the school semesters, or a \"fly-in/fly-out\" worker that has the onsite GP also included with his home GP to remain aware of medical issues.\n\nJurisdictions may decide that they can profile this down to 1 if desired, or 1 per type.", - "alias": [ - "careProvider" - ], - "min": 0, - "max": "*", - "base": { - "path": "Patient.generalPractitioner", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization", - "http://hl7.org/fhir/StructureDefinition/Practitioner", - "http://hl7.org/fhir/StructureDefinition/PractitionerRole" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PD1-4" - }, - { - "identity": "rim", - "map": "subjectOf.CareEvent.performer.AssignedEntity" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.managingOrganization", - "path": "Patient.managingOrganization", - "short": "Organization that is the custodian of the patient record", - "definition": "Organization that is the custodian of the patient record.", - "comment": "There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association).", - "requirements": "Need to know who recognizes this patient record, manages and updates it.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.managingOrganization", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": ".providerOrganization" - } - ] - }, - { - "id": "Patient.link", - "path": "Patient.link", - "short": "Link to another patient resource that concerns the same actual person", - "definition": "Link to another patient resource that concerns the same actual patient.", - "comment": "There is no assumption that linked patient records have mutual links.", - "requirements": "There are multiple use cases: \n\n* Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and \n* Distribution of patient information across multiple servers.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.link", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labeled as a modifier because it might not be the main Patient resource, and the referenced patient should be used instead of this Patient record. This is when the link.type value is 'replaced-by'", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "outboundLink" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.id", - "path": "Patient.link.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.extension", - "path": "Patient.link.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.modifierExtension", - "path": "Patient.link.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.link.other", - "path": "Patient.link.other", - "short": "The other patient or related person resource that the link refers to", - "definition": "The other patient resource that the link refers to.", - "comment": "Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.link.other", - "min": 1, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy", - "valueBoolean": false - } - ], - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Patient", - "http://hl7.org/fhir/StructureDefinition/RelatedPerson" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-3, MRG-1" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.type", - "path": "Patient.link.type", - "short": "replaced-by | replaces | refer | seealso", - "definition": "The type of link between this patient resource and another patient resource.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.link.type", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "LinkType" - } - ], - "strength": "required", - "description": "The type of link between this patient resource and another patient resource.", - "valueSet": "http://hl7.org/fhir/ValueSet/link-type|4.3.0" - }, - "mapping": [ - { - "identity": "rim", - "map": "typeCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "id": "Patient.name", - "path": "Patient.name", - "label": "Patient Name", - "type": [ - { - "code": "HumanName" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.name.given", - "path": "Patient.name.given", - "label": "First Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.name.family", - "path": "Patient.name.family", - "label": "Last Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "label": "Date of Birth", - "min": 1, - "type": [ - { - "code": "date" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.gender", - "path": "Patient.gender", - "label": "Gender", - "min": 1, - "type": [ - { - "code": "code" - } - ], - "binding": { - "strength": "extensible", - "valueSet": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender" - } - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Patient.identifier:MedicareID", - "path": "Patient.identifier", - "sliceName": "MedicareID", - "min": 1, - "max": "1", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Patient.identifier:MedicareID.system", - "path": "Patient.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://medicare.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.identifier:MedicareID.value", - "path": "Patient.identifier.value", - "label": "Medicare ID", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Claim-OPA-Claim1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Claim-OPA-Claim1.json deleted file mode 100644 index 5021f98c3..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Claim-OPA-Claim1.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "resourceType": "Claim", - "id": "OPA-Claim1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-levelOfServiceCode", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1338", - "code": "U", - "display": "Urgent" - } - ] - } - } - ], - "identifier": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierJurisdiction", - "valueCodeableConcept": { - "coding": [ - { - "system": "https://www.usps.com/", - "code": "MA" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierSubDepartment", - "valueString": "223412" - } - ], - "system": "http://example.org/PATIENT_EVENT_TRACE_NUMBER", - "value": "111099", - "assigner": { - "identifier": { - "system": "http://example.org/USER_ASSIGNED", - "value": "9012345678" - } - } - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/claim-type", - "code": "professional" - } - ] - }, - "use": "preauthorization", - "patient": { - "reference": "Patient/OPA-Patient1" - }, - "created": "2005-05-02", - "insurer": { - "reference": "Organization/OPA-PayorOrganization1" - }, - "provider": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "facility": { - "reference": "Location/OPA-Location1" - }, - "priority": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/processpriority", - "code": "normal" - } - ] - }, - "careTeam": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 1, - "provider": { - "reference": "Practitioner/OPA-OperatingPhysician1" - } - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 2, - "provider": { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - } - ], - "diagnosis": [ - { - "sequence": 123, - "diagnosisReference": { - "reference": "Condition/OPA-Condition1" - } - } - ], - "procedure": [ - { - "sequence": 1, - "procedureReference": { - "reference": "Procedure/OPA-Procedure1" - } - }, - { - "sequence": 2, - "procedureReference": { - "reference": "Procedure/OPA-Procedure2" - } - } - ], - "supportingInfo": [ - { - "sequence": 1, - "category": { - "coding": [ - { - "system": "http://hl7.org/us/davinci-pas/CodeSystem/PASSupportingInfoType", - "code": "patientEvent" - } - ] - }, - "timingPeriod": { - "start": "2015-10-01T00:00:00-07:00", - "end": "2015-10-05T00:00:00-07:00" - } - } - ], - "insurance": [ - { - "sequence": 1, - "focal": true, - "coverage": { - "reference": "Coverage/OPA-Coverage1" - } - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemTraceNumber", - "valueIdentifier": { - "system": "http://example.org/ITEM_TRACE_NUMBER", - "value": "1122334" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizationNumber", - "valueString": "1122445" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-administrationReferenceNumber", - "valueString": "9988311" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceItemRequestType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1525", - "code": "SC", - "display": "Specialty Care Review" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-certificationType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1322", - "code": "I", - "display": "Initial" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-requestedService", - "valueReference": { - "reference": "ServiceRequest/OPA-ServiceRequest1" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-epsdtIndicator", - "valueBoolean": false - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeResidentialStatus", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1345", - "code": "2", - "display": "Newly Admitted" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeLevelOfCare", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1337", - "code": "2", - "display": "Intermediate Care Facility (ICF)" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueUnitRateLimit", - "valueDecimal": 100 - } - ], - "sequence": 1, - "careTeamSequence": [ - 1 - ], - "diagnosisSequence": [ - 1 - ], - "productOrService": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1365", - "code": "3", - "display": "Consultation" - } - ] - }, - "locationCodeableConcept": { - "coding": [ - { - "system": "https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set", - "code": "11" - } - ] - } - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Condition-OPA-Condition1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Condition-OPA-Condition1.json deleted file mode 100644 index a0c2ca681..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Condition-OPA-Condition1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Condition", - "id": "OPA-Condition1", - "code": { - "coding": [ - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "G1221", - "display": "G1221,Amyotrophic lateral sclerosis" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Coverage-OPA-Coverage1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Coverage-OPA-Coverage1.json deleted file mode 100644 index 53802b3e9..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Coverage-OPA-Coverage1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "resourceType": "Coverage", - "id": "OPA-Coverage1", - "meta": { - "versionId": "1", - "lastUpdated": "2019-07-11T06:27:08.949+00:00", - "profile": [ - "http://hl7.org/fhir/us/davinci-deqm/STU3/StructureDefinition/coverage-deqm" - ] - }, - "identifier": [ - { - "system": "http://benefitsinc.com/certificate", - "value": "10138556" - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", - "code": "HIP", - "display": "health insurance plan policy" - } - ] - }, - "policyHolder": { - "reference": "Patient/OPA-Patient1" - }, - "subscriber": { - "reference": "Patient/OPA-Patient1" - }, - "subscriberId": "525697298M", - "beneficiary": { - "reference": "Patient/OPA-Patient1" - }, - "relationship": { - "coding": [ - { - "code": "self" - } - ] - }, - "payor": [ - { - "reference": "Organization/OPA-PayorOrganization1" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Location-OPA-Location1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Location-OPA-Location1.json deleted file mode 100644 index 39eca622e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Location-OPA-Location1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Location", - "id": "OPA-Location1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:28:20.715+00:00" - }, - "address": { - "line": [ - "100 Good St" - ], - "city": "Bedford", - "state": "MA", - "postalCode": "01730" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Organization-OPA-PayorOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Organization-OPA-PayorOrganization1.json deleted file mode 100644 index f8a998c72..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Organization-OPA-PayorOrganization1.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-PayorOrganization1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:16:05.159+00:00" - }, - "name": "Palmetto GBA", - "address": [ - { - "use": "work", - "line": [ - "111 Dogwood Ave" - ], - "city": "Columbia", - "state": "SC", - "postalCode": "29999", - "country": "US" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Organization-OPA-ProviderOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Organization-OPA-ProviderOrganization1.json deleted file mode 100644 index 4830be3b8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Organization-OPA-ProviderOrganization1.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-ProviderOrganization1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: example-organization-2

meta:

identifier: 1407071236, 121111111

active: true

type: Healthcare Provider (Details : {http://terminology.hl7.org/CodeSystem/organization-type code 'prov' = 'Healthcare Provider', given as 'Healthcare Provider'})

name: Acme Clinic

telecom: ph: (+1) 734-677-7777, customer-service@acme-clinic.org

address: 3300 Washtenaw Avenue, Suite 227 Amherst MA 01002 USA

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1407071236" - }, - { - "system": "http://example.org/fhir/sid/us-tin", - "value": "121111111" - } - ], - "active": true, - "type": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/organization-type", - "code": "prov", - "display": "Healthcare Provider" - } - ] - } - ], - "name": "Acme Clinic", - "telecom": [ - { - "system": "phone", - "value": "(+1) 734-677-7777" - }, - { - "system": "email", - "value": "customer-service@acme-clinic.org" - } - ], - "address": [ - { - "line": [ - "3300 Washtenaw Avenue, Suite 227" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002", - "country": "USA" - } - ], - "contact": [ - { - "name": { - "use": "official", - "family": "Dow", - "given": [ - "Jones" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "555-555-5555", - "use": "home" - } - ] - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Patient-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Patient-OPA-Patient1.json deleted file mode 100644 index 9dc299930..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Patient-OPA-Patient1.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "resourceType": "Patient", - "id": "OPA-Patient1", - "extension": [ - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2106-3", - "display": "White" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1002-5", - "display": "American Indian or Alaska Native" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2028-9", - "display": "Asian" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1586-7", - "display": "Shoshone" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2036-2", - "display": "Filipino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1735-0", - "display": "Alaska Native" - } - }, - { - "url": "text", - "valueString": "Mixed" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2135-2", - "display": "Hispanic or Latino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2184-0", - "display": "Dominican" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2148-5", - "display": "Mexican" - } - }, - { - "url": "text", - "valueString": "Hispanic or Latino" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", - "valueCode": "M" - } - ], - "identifier": [ - { - "use": "usual", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0203", - "code": "MR" - } - ] - }, - "system": "urn:oid:1.2.36.146.595.217.0.1", - "value": "12345", - "period": { - "start": "2001-05-06" - }, - "assigner": { - "display": "Acme Healthcare" - } - } - ], - "active": true, - "name": [ - { - "use": "official", - "family": "Chalmers", - "given": [ - "Peter", - "James" - ] - }, - { - "use": "usual", - "family": "Chalmers", - "given": [ - "Jim" - ] - }, - { - "use": "maiden", - "family": "Windsor", - "given": [ - "Peter", - "James" - ], - "period": { - "end": "2002" - } - } - ], - "telecom": [ - { - "system": "phone", - "value": "(03) 5555 6473", - "use": "work", - "rank": 1 - }, - { - "system": "phone", - "value": "(03) 3410 5613", - "use": "mobile", - "rank": 2 - }, - { - "system": "phone", - "value": "(03) 5555 8834", - "use": "old", - "period": { - "end": "2014" - } - } - ], - "gender": "male", - "birthDate": "1974-12-25", - "_birthDate": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime", - "valueDateTime": "1974-12-25T14:35:45-05:00" - } - ] - }, - "deceasedBoolean": false, - "address": [ - { - "use": "home", - "type": "both", - "text": "534 Erewhon St PeasantVille, Utah 84414", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "UT", - "postalCode": "84414", - "period": { - "start": "1974-12-25" - } - } - ], - "maritalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus", - "code": "M" - } - ] - }, - "contact": [ - { - "relationship": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0131", - "code": "N" - } - ] - } - ], - "name": { - "family": "du Marché", - "_family": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", - "valueString": "VV" - } - ] - }, - "given": [ - "Bénédicte" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "+33 (237) 998327" - } - ], - "address": { - "use": "home", - "type": "both", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "VT", - "postalCode": "3999", - "period": { - "start": "1974-12-25" - } - }, - "gender": "female", - "period": { - "start": "2012" - } - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Practitioner-OPA-AttendingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Practitioner-OPA-AttendingPhysician1.json deleted file mode 100644 index f009f2c02..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Practitioner-OPA-AttendingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-AttendingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-1

meta:

identifier: 9941339108, 25456

name: Ronald Bone

address: 1003 Healthcare Drive Amherst MA 01002 (HOME)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "9941339108" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "25456" - } - ], - "name": [ - { - "family": "Bone", - "given": [ - "Ronald" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "home", - "line": [ - "1003 Healthcare Drive" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Practitioner-OPA-OperatingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Practitioner-OPA-OperatingPhysician1.json deleted file mode 100644 index 697350aa7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Practitioner-OPA-OperatingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-OperatingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-2

meta:

identifier: 1245319599, 456789

name: Fielding Kathy

address: 1080 FIRST COLONIAL RD Virginia Beach VA 21454-2406 (WORK)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1245319599" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "456789" - } - ], - "name": [ - { - "family": "Kathy", - "given": [ - "Fielding" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "work", - "line": [ - "1080 FIRST COLONIAL RD" - ], - "city": "Virginia Beach", - "state": "VA", - "postalCode": "21454-2406" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Procedure-OPA-Procedure1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Procedure-OPA-Procedure1.json deleted file mode 100644 index ecd62e960..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Procedure-OPA-Procedure1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure1", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64612", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL NERVE, UNILATERAL (EG, FOR BLEPHAROSPASM, HEMIFACIAL SPASM)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Procedure-OPA-Procedure2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Procedure-OPA-Procedure2.json deleted file mode 100644 index 909cb9680..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/Procedure-OPA-Procedure2.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure2", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64615", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL, TRIGEMINAL, CERVICAL SPINAL AND ACCESSORY NERVES, BILATERAL (EG, FOR CHRONIC MIGRAINE)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json deleted file mode 100644 index a67c03450..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json +++ /dev/null @@ -1,2963 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "OutpatientPriorAuthorizationRequest-OPA-Patient1", - "contained": [ - { - "resourceType": "OperationOutcome", - "id": "populate-outcome-OutpatientPriorAuthorizationRequest-OPA-Patient1", - "issue": [ - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (RequestDetailsResubmitionUTN) for item (5.1.2): Could not resolve expression reference 'RequestDetailsResubmitionUTN' in library 'OutpatientPriorAuthorizationPrepopulation'." - } - ] - }, - { - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest", - "meta": { - "source": "#gleANq6sb4bT35uw", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation|1.0.0" - } - ], - "url": "http://mcg.com/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "FacilityContractRegion" - } - } - ], - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianPTAN" - } - } - ], - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianPTAN" - } - } - ], - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - }, - { - "linkId": "5", - "text": "Request Details", - "type": "group", - "item": [ - { - "linkId": "5.1", - "text": "Is this a ", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsResubmition" - } - } - ], - "linkId": "5.1.1", - "text": "Resubmission?", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsResubmitionUTN" - } - } - ], - "linkId": "5.1.2", - "text": "Please provide UTN", - "type": "string", - "enableWhen": [ - { - "question": "5.1.1", - "operator": "=", - "answerBoolean": true - } - ], - "required": true - } - ] - }, - { - "linkId": "5.2", - "text": "Is this ", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsLifeThreatening" - } - } - ], - "linkId": "5.2.1", - "text": "Life Threatening?", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsLifeThreateningExplanation" - } - } - ], - "linkId": "5.2.2", - "text": "Please explain", - "type": "string", - "enableWhen": [ - { - "question": "5.2.1", - "operator": "=", - "answerBoolean": true - } - ], - "required": true - } - ] - }, - { - "linkId": "5.3", - "text": "Diagnosis", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsPrimaryDiagnosisCode" - } - } - ], - "linkId": "5.3.1", - "text": "Primary Diagnosis Code", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsSecondaryDiagnosisCode" - } - } - ], - "linkId": "5.3.2", - "text": "Secondary Diagnosis Code", - "type": "string", - "required": true - }, - { - "linkId": "5.3.3", - "text": "Additional Diagnosis Code(s)", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsAdditionalDiagnosisCode1" - } - } - ], - "linkId": "5.3.3.1", - "text": "Diagnosis Code 1", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsAdditionalDiagnosisCode2" - } - } - ], - "linkId": "5.3.3.2", - "text": "Diagnosis Code 2", - "type": "string", - "required": false - } - ] - } - ] - }, - { - "linkId": "5.4", - "text": "Procedure Codes -Please select all procedure codes for this request", - "type": "group", - "item": [ - { - "linkId": "5.4.1", - "text": "Botox", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode64612" - } - } - ], - "linkId": "5.4.1.1", - "text": "64612", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0585" - } - } - ], - "linkId": "5.4.1.2", - "text": "J0585", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0587" - } - } - ], - "linkId": "5.4.1.3", - "text": "J0587", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode64615" - } - } - ], - "linkId": "5.4.1.4", - "text": "64615", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0586" - } - } - ], - "linkId": "5.4.1.5", - "text": "J0586", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeJ0588" - } - } - ], - "linkId": "5.4.1.6", - "text": "J0588", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.2", - "text": "Blepharoplasty", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15820" - } - } - ], - "linkId": "5.4.2.1", - "text": "15820", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15821" - } - } - ], - "linkId": "5.4.2.2", - "text": "15821", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15822" - } - } - ], - "linkId": "5.4.2.3", - "text": "15822", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15823" - } - } - ], - "linkId": "5.4.2.4", - "text": "15823", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67900" - } - } - ], - "linkId": "5.4.2.5", - "text": "67900", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67901" - } - } - ], - "linkId": "5.4.2.6", - "text": "67901", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67902" - } - } - ], - "linkId": "5.4.2.7", - "text": "67902", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67903" - } - } - ], - "linkId": "5.4.2.8", - "text": "67903", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67904" - } - } - ], - "linkId": "5.4.2.9", - "text": "67904", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67906" - } - } - ], - "linkId": "5.4.2.10", - "text": "67906", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode67908" - } - } - ], - "linkId": "5.4.2.11", - "text": "67908", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.3", - "text": "Cervical Fusion with Disc Removal", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode22551" - } - } - ], - "linkId": "5.4.3.1", - "text": "22551", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode22552" - } - } - ], - "linkId": "5.4.3.2", - "text": "22552", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.4", - "text": "Implanted Spinal Neurostimulators", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode63650" - } - } - ], - "linkId": "5.4.4.1", - "text": "63650", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.5", - "text": "Panniculectomy", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15830" - } - } - ], - "linkId": "5.4.5.1", - "text": "15830", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15847" - } - } - ], - "linkId": "5.4.5.2", - "text": "15847", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode15877" - } - } - ], - "linkId": "5.4.5.3", - "text": "15877", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.6", - "text": "Rhinoplasty", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode20912" - } - } - ], - "linkId": "5.4.6.1", - "text": "20912", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode21210" - } - } - ], - "linkId": "5.4.6.2", - "text": "21210", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30400" - } - } - ], - "linkId": "5.4.6.3", - "text": "30400", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30410" - } - } - ], - "linkId": "5.4.6.4", - "text": "30410", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30420" - } - } - ], - "linkId": "5.4.6.5", - "text": "30420", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30430" - } - } - ], - "linkId": "5.4.6.6", - "text": "30430", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30435" - } - } - ], - "linkId": "5.4.6.7", - "text": "30435", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30450" - } - } - ], - "linkId": "5.4.6.8", - "text": "30450", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30460" - } - } - ], - "linkId": "5.4.6.9", - "text": "30460", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30462" - } - } - ], - "linkId": "5.4.6.10", - "text": "30462", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30465" - } - } - ], - "linkId": "5.4.6.11", - "text": "30465", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode30520" - } - } - ], - "linkId": "5.4.6.12", - "text": "30520", - "type": "boolean", - "required": false - } - ] - }, - { - "linkId": "5.4.7", - "text": "Vein Ablation", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36473" - } - } - ], - "linkId": "5.4.7.1", - "text": "36473", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36474" - } - } - ], - "linkId": "5.4.7.2", - "text": "36474", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36475" - } - } - ], - "linkId": "5.4.7.3", - "text": "36475", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36476" - } - } - ], - "linkId": "5.4.7.4", - "text": "36476", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36478" - } - } - ], - "linkId": "5.4.7.5", - "text": "36478", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36479" - } - } - ], - "linkId": "5.4.7.6", - "text": "36479", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36482" - } - } - ], - "linkId": "5.4.7.7", - "text": "36482", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCode36483" - } - } - ], - "linkId": "5.4.7.8", - "text": "36483", - "type": "boolean", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeStaged" - } - } - ], - "linkId": "5.4.7.9", - "text": "Staged Procedure", - "type": "boolean", - "required": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestDetailsProcedureCodeStaged" - } - } - ], - "linkId": "5.4.8", - "text": "Number of Units Requested (Required for requests with J0585, J0586, J0587, or J0588 only)", - "type": "string", - "enableWhen": [ - { - "question": "5.4.1.2", - "operator": "=", - "answerBoolean": true - }, - { - "question": "5.4.1.3", - "operator": "=", - "answerBoolean": true - }, - { - "question": "5.4.1.5", - "operator": "exists", - "answerBoolean": true - }, - { - "question": "5.4.1.6", - "operator": "exists", - "answerBoolean": true - } - ], - "enableBehavior": "any", - "required": true - } - ] - } - ] - }, - { - "linkId": "6", - "text": "Requestor Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationName" - } - } - ], - "linkId": "6.1", - "text": "Requestor Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationRepresentative" - } - } - ], - "linkId": "6.2", - "text": "Requestor is a representative of the...", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "RequestorInformationRepresentative-Hospital", - "valueCoding": { - "code": "hospital", - "display": "Hospital Outpatient Department" - } - }, - { - "id": "RequestorInformationRepresentativePhysNpp", - "valueCoding": { - "code": "physnpp", - "display": "Physician/NPP" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationPhone" - } - } - ], - "linkId": "6.3", - "text": "Requestor Phone", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationFax" - } - } - ], - "linkId": "6.4", - "text": "Requestor Fax", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "RequestorInformationFacilityFax" - } - } - ], - "linkId": "6.5", - "text": "Requestor Facility Fax", - "type": "string", - "required": true - } - ] - } - ] - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-messages", - "valueReference": { - "reference": "#populate-outcome-OutpatientPriorAuthorizationRequest-OPA-Patient1" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaireresponse-questionnaire", - "valueReference": { - "reference": "#OutpatientPriorAuthorizationRequest" - } - } - ], - "questionnaire": "http://mcg.com/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "status": "in-progress", - "subject": { - "reference": "Patient/OPA-Patient1" - }, - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "1.1", - "text": "Name", - "answer": [ - { - "valueString": "Acme Clinic" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "answer": [ - { - "valueString": "1407071236" - } - ] - }, - { - "linkId": "1.3", - "text": "PTAN" - }, - { - "linkId": "1.4", - "text": "Contract/Region" - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "answer": [ - { - "valueString": "Peter" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "answer": [ - { - "valueString": "Chalmers" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "answer": [ - { - "valueDate": "1974-12-25" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "answer": [ - { - "valueString": "525697298M" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "answer": [ - { - "valueString": "male" - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "answer": [ - { - "valueString": "Fielding" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "answer": [ - { - "valueString": "Kathy" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "answer": [ - { - "valueString": "1245319599" - } - ] - }, - { - "linkId": "3.4", - "text": "PTAN" - }, - { - "linkId": "3.5", - "text": "Address", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "answer": [ - { - "valueString": "1080 FIRST COLONIAL RD" - } - ] - }, - { - "linkId": "3.5.2", - "text": "Address2" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "answer": [ - { - "valueString": "Virginia Beach" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "answer": [ - { - "valueString": "VA" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "answer": [ - { - "valueString": "21454-2406" - } - ] - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "answer": [ - { - "valueString": "Ronald" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "answer": [ - { - "valueString": "Bone" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "answer": [ - { - "valueString": "9941339108" - } - ] - }, - { - "linkId": "4.2.4", - "text": "PTAN" - }, - { - "linkId": "4.2.5", - "text": "Address", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "answer": [ - { - "valueString": "1003 Healthcare Drive" - } - ] - }, - { - "linkId": "4.2.5.2", - "text": "Address2" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "answer": [ - { - "valueString": "Amherst" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "answer": [ - { - "valueString": "MA" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "answer": [ - { - "valueString": "01002" - } - ] - } - ] - } - ] - } - ] - }, - { - "linkId": "5", - "text": "Request Details", - "item": [ - { - "linkId": "5.1", - "text": "Is this a ", - "item": [ - { - "linkId": "5.1.1", - "text": "Resubmission?" - }, - { - "linkId": "5.1.2", - "text": "Please provide UTN" - } - ] - }, - { - "linkId": "5.2", - "text": "Is this ", - "item": [ - { - "linkId": "5.2.1", - "text": "Life Threatening?" - }, - { - "linkId": "5.2.2", - "text": "Please explain" - } - ] - }, - { - "linkId": "5.3", - "text": "Diagnosis", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.3.1", - "text": "Primary Diagnosis Code", - "answer": [ - { - "valueString": "G1221" - } - ] - }, - { - "linkId": "5.3.2", - "text": "Secondary Diagnosis Code" - }, - { - "linkId": "5.3.3", - "text": "Additional Diagnosis Code(s)", - "item": [ - { - "linkId": "5.3.3.1", - "text": "Diagnosis Code 1" - }, - { - "linkId": "5.3.3.2", - "text": "Diagnosis Code 2" - } - ] - } - ] - }, - { - "linkId": "5.4", - "text": "Procedure Codes -Please select all procedure codes for this request", - "item": [ - { - "linkId": "5.4.1", - "text": "Botox", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.1.1", - "text": "64612", - "answer": [ - { - "valueBoolean": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.1.2", - "text": "J0585", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.1.3", - "text": "J0587", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.1.4", - "text": "64615", - "answer": [ - { - "valueBoolean": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.1.5", - "text": "J0586", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.1.6", - "text": "J0588", - "answer": [ - { - "valueBoolean": false - } - ] - } - ] - }, - { - "linkId": "5.4.2", - "text": "Blepharoplasty", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.1", - "text": "15820", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.2", - "text": "15821", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.3", - "text": "15822", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.4", - "text": "15823", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.5", - "text": "67900", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.6", - "text": "67901", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.7", - "text": "67902", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.8", - "text": "67903", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.9", - "text": "67904", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.10", - "text": "67906", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.2.11", - "text": "67908", - "answer": [ - { - "valueBoolean": false - } - ] - } - ] - }, - { - "linkId": "5.4.3", - "text": "Cervical Fusion with Disc Removal", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.3.1", - "text": "22551", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.3.2", - "text": "22552", - "answer": [ - { - "valueBoolean": false - } - ] - } - ] - }, - { - "linkId": "5.4.4", - "text": "Implanted Spinal Neurostimulators", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.4.1", - "text": "63650", - "answer": [ - { - "valueBoolean": false - } - ] - } - ] - }, - { - "linkId": "5.4.5", - "text": "Panniculectomy", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.5.1", - "text": "15830", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.5.2", - "text": "15847", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.5.3", - "text": "15877", - "answer": [ - { - "valueBoolean": false - } - ] - } - ] - }, - { - "linkId": "5.4.6", - "text": "Rhinoplasty", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.1", - "text": "20912", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.2", - "text": "21210", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.3", - "text": "30400", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.4", - "text": "30410", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.5", - "text": "30420", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.6", - "text": "30430", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.7", - "text": "30435", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.8", - "text": "30450", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.9", - "text": "30460", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.10", - "text": "30462", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.11", - "text": "30465", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.6.12", - "text": "30520", - "answer": [ - { - "valueBoolean": false - } - ] - } - ] - }, - { - "linkId": "5.4.7", - "text": "Vein Ablation", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.1", - "text": "36473", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.2", - "text": "36474", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.3", - "text": "36475", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.4", - "text": "36476", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.5", - "text": "36478", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.6", - "text": "36479", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.7", - "text": "36482", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "linkId": "5.4.7.8", - "text": "36483", - "answer": [ - { - "valueBoolean": false - } - ] - }, - { - "linkId": "5.4.7.9", - "text": "Staged Procedure" - } - ] - }, - { - "linkId": "5.4.8", - "text": "Number of Units Requested (Required for requests with J0585, J0586, J0587, or J0588 only)" - } - ] - } - ] - }, - { - "linkId": "6", - "text": "Requestor Information", - "item": [ - { - "linkId": "6.1", - "text": "Requestor Name" - }, - { - "linkId": "6.2", - "text": "Requestor is a representative of the..." - }, - { - "linkId": "6.3", - "text": "Requestor Phone" - }, - { - "linkId": "6.4", - "text": "Requestor Fax" - }, - { - "linkId": "6.5", - "text": "Requestor Facility Fax" - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/ServiceRequest-OPA-ServiceRequest1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/ServiceRequest-OPA-ServiceRequest1.json deleted file mode 100644 index 3c171b4b8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/ServiceRequest-OPA-ServiceRequest1.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "resourceType": "ServiceRequest", - "id": "OPA-ServiceRequest1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-crd/R4/StructureDefinition/profile-servicerequest-r4" - ] - }, - "status": "draft", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "99241", - "display": "Testing Service for Outpatient Prior Auth" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - }, - "authoredOn": "2018-08-08", - "insurance": [ - { - "reference": "Coverage/OPA-Coverage1" - } - ], - "requester": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "performer": [ - { - "reference": "Practitioner/OPA-OperatingPhysician1" - }, - { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/vocabulary/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/vocabulary/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/vocabulary/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/vocabulary/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/vocabulary/ValueSet-AdministrativeGender.json deleted file mode 100644 index 156220f9b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/vocabulary/ValueSet-AdministrativeGender.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "AdministrativeGender", - "meta": { - "versionId": "1", - "lastUpdated": "2022-02-11T20:37:50.811+00:00", - "source": "#5pAPnFaiCW12WWid" - }, - "url": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender", - "version": "1.1.0", - "name": "AdministrativeGender", - "title": "Administrative Gender", - "status": "draft", - "date": "2022-04-04T23:44:44+00:00", - "publisher": "Health Level Seven International", - "contact": [ - { - "name": "HL7 International - Public Health", - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pher" - } - ] - }, - { - "name": "Cynthia Bush, Health Scientist (Informatics), CDC/National Center for Health Statistics", - "telecom": [ - { - "system": "email", - "value": "pdz1@cdc.gov" - } - ] - }, - { - "name": "AbdulMalik Shakir, FHL7, President and Chief Informatics Scientist Hi3 Solutions", - "telecom": [ - { - "system": "email", - "value": "abdulmalik.shakir@hi3solutions.com" - } - ] - } - ], - "description": "The gender of a person used for administrative purposes.\n\n**Inter-jurisdictional Exchange (IJE) concept mapping**\n\n|VRDR IG Code | VRDR IG Display Name | IJE Code |IJE Display Name\n| -------- | -------- | -------- | --------|\n|male|Male|M|Male|\n|female|Female|F|Female|\n|UNK|unknown|U|Unknown|", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ], - "text": "US Realm" - } - ], - "compose": { - "include": [ - { - "system": "http://hl7.org/fhir/administrative-gender", - "concept": [ - { - "code": "male", - "display": "Male" - }, - { - "code": "female", - "display": "Female" - } - ] - }, - { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "concept": [ - { - "code": "UNK", - "display": "unknown" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/FHIRHelpers.cql deleted file mode 100644 index e941c378b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/FHIRHelpers.cql +++ /dev/null @@ -1,807 +0,0 @@ -library FHIRHelpers version '4.0.001' - -using FHIR version '4.0.1' - -context Patient - -define function "ToInterval"(period FHIR.Period): - if period is null then null - else Interval[period."start".value, period."end".value] - -define function "ToQuantity"(quantity FHIR.Quantity): - if quantity is null then null - else System.Quantity { value: quantity.value.value, unit: quantity.unit.value } - -define function "ToRatio"(ratio FHIR.Ratio): - if ratio is null then null - else System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -define function "ToInterval"(range FHIR.Range): - if range is null then null - else Interval[ToQuantity(range.low), ToQuantity(range.high)] - -define function "ToCode"(coding FHIR.Coding): - if coding is null then null - else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value } - -define function "ToConcept"(concept FHIR.CodeableConcept): - if concept is null then null - else System.Concept { codes: concept.coding C - return ToCode(C), display: concept.text.value } - -define function "ToString"(value AccountStatus): - value.value - -define function "ToString"(value ActionCardinalityBehavior): - value.value - -define function "ToString"(value ActionConditionKind): - value.value - -define function "ToString"(value ActionGroupingBehavior): - value.value - -define function "ToString"(value ActionParticipantType): - value.value - -define function "ToString"(value ActionPrecheckBehavior): - value.value - -define function "ToString"(value ActionRelationshipType): - value.value - -define function "ToString"(value ActionRequiredBehavior): - value.value - -define function "ToString"(value ActionSelectionBehavior): - value.value - -define function "ToString"(value ActivityDefinitionKind): - value.value - -define function "ToString"(value ActivityParticipantType): - value.value - -define function "ToString"(value AddressType): - value.value - -define function "ToString"(value AddressUse): - value.value - -define function "ToString"(value AdministrativeGender): - value.value - -define function "ToString"(value AdverseEventActuality): - value.value - -define function "ToString"(value AggregationMode): - value.value - -define function "ToString"(value AllergyIntoleranceCategory): - value.value - -define function "ToString"(value AllergyIntoleranceCriticality): - value.value - -define function "ToString"(value AllergyIntoleranceSeverity): - value.value - -define function "ToString"(value AllergyIntoleranceType): - value.value - -define function "ToString"(value AppointmentStatus): - value.value - -define function "ToString"(value AssertionDirectionType): - value.value - -define function "ToString"(value AssertionOperatorType): - value.value - -define function "ToString"(value AssertionResponseTypes): - value.value - -define function "ToString"(value AuditEventAction): - value.value - -define function "ToString"(value AuditEventAgentNetworkType): - value.value - -define function "ToString"(value AuditEventOutcome): - value.value - -define function "ToString"(value BindingStrength): - value.value - -define function "ToString"(value BiologicallyDerivedProductCategory): - value.value - -define function "ToString"(value BiologicallyDerivedProductStatus): - value.value - -define function "ToString"(value BiologicallyDerivedProductStorageScale): - value.value - -define function "ToString"(value BundleType): - value.value - -define function "ToString"(value CapabilityStatementKind): - value.value - -define function "ToString"(value CarePlanActivityKind): - value.value - -define function "ToString"(value CarePlanActivityStatus): - value.value - -define function "ToString"(value CarePlanIntent): - value.value - -define function "ToString"(value CarePlanStatus): - value.value - -define function "ToString"(value CareTeamStatus): - value.value - -define function "ToString"(value CatalogEntryRelationType): - value.value - -define function "ToString"(value ChargeItemDefinitionPriceComponentType): - value.value - -define function "ToString"(value ChargeItemStatus): - value.value - -define function "ToString"(value ClaimResponseStatus): - value.value - -define function "ToString"(value ClaimStatus): - value.value - -define function "ToString"(value ClinicalImpressionStatus): - value.value - -define function "ToString"(value CodeSearchSupport): - value.value - -define function "ToString"(value CodeSystemContentMode): - value.value - -define function "ToString"(value CodeSystemHierarchyMeaning): - value.value - -define function "ToString"(value CommunicationPriority): - value.value - -define function "ToString"(value CommunicationRequestStatus): - value.value - -define function "ToString"(value CommunicationStatus): - value.value - -define function "ToString"(value CompartmentCode): - value.value - -define function "ToString"(value CompartmentType): - value.value - -define function "ToString"(value CompositionAttestationMode): - value.value - -define function "ToString"(value CompositionStatus): - value.value - -define function "ToString"(value ConceptMapEquivalence): - value.value - -define function "ToString"(value ConceptMapGroupUnmappedMode): - value.value - -define function "ToString"(value ConditionalDeleteStatus): - value.value - -define function "ToString"(value ConditionalReadStatus): - value.value - -define function "ToString"(value ConsentDataMeaning): - value.value - -define function "ToString"(value ConsentProvisionType): - value.value - -define function "ToString"(value ConsentState): - value.value - -define function "ToString"(value ConstraintSeverity): - value.value - -define function "ToString"(value ContactPointSystem): - value.value - -define function "ToString"(value ContactPointUse): - value.value - -define function "ToString"(value ContractPublicationStatus): - value.value - -define function "ToString"(value ContractStatus): - value.value - -define function "ToString"(value ContributorType): - value.value - -define function "ToString"(value CoverageStatus): - value.value - -define function "ToString"(value CurrencyCode): - value.value - -define function "ToString"(value DayOfWeek): - value.value - -define function "ToString"(value DaysOfWeek): - value.value - -define function "ToString"(value DetectedIssueSeverity): - value.value - -define function "ToString"(value DetectedIssueStatus): - value.value - -define function "ToString"(value DeviceMetricCalibrationState): - value.value - -define function "ToString"(value DeviceMetricCalibrationType): - value.value - -define function "ToString"(value DeviceMetricCategory): - value.value - -define function "ToString"(value DeviceMetricColor): - value.value - -define function "ToString"(value DeviceMetricOperationalStatus): - value.value - -define function "ToString"(value DeviceNameType): - value.value - -define function "ToString"(value DeviceRequestStatus): - value.value - -define function "ToString"(value DeviceUseStatementStatus): - value.value - -define function "ToString"(value DiagnosticReportStatus): - value.value - -define function "ToString"(value DiscriminatorType): - value.value - -define function "ToString"(value DocumentConfidentiality): - value.value - -define function "ToString"(value DocumentMode): - value.value - -define function "ToString"(value DocumentReferenceStatus): - value.value - -define function "ToString"(value DocumentRelationshipType): - value.value - -define function "ToString"(value EligibilityRequestPurpose): - value.value - -define function "ToString"(value EligibilityRequestStatus): - value.value - -define function "ToString"(value EligibilityResponsePurpose): - value.value - -define function "ToString"(value EligibilityResponseStatus): - value.value - -define function "ToString"(value EnableWhenBehavior): - value.value - -define function "ToString"(value EncounterLocationStatus): - value.value - -define function "ToString"(value EncounterStatus): - value.value - -define function "ToString"(value EndpointStatus): - value.value - -define function "ToString"(value EnrollmentRequestStatus): - value.value - -define function "ToString"(value EnrollmentResponseStatus): - value.value - -define function "ToString"(value EpisodeOfCareStatus): - value.value - -define function "ToString"(value EventCapabilityMode): - value.value - -define function "ToString"(value EventTiming): - value.value - -define function "ToString"(value EvidenceVariableType): - value.value - -define function "ToString"(value ExampleScenarioActorType): - value.value - -define function "ToString"(value ExplanationOfBenefitStatus): - value.value - -define function "ToString"(value ExposureState): - value.value - -define function "ToString"(value ExtensionContextType): - value.value - -define function "ToString"(value FHIRAllTypes): - value.value - -define function "ToString"(value FHIRDefinedType): - value.value - -define function "ToString"(value FHIRDeviceStatus): - value.value - -define function "ToString"(value FHIRResourceType): - value.value - -define function "ToString"(value FHIRSubstanceStatus): - value.value - -define function "ToString"(value FHIRVersion): - value.value - -define function "ToString"(value FamilyHistoryStatus): - value.value - -define function "ToString"(value FilterOperator): - value.value - -define function "ToString"(value FlagStatus): - value.value - -define function "ToString"(value GoalLifecycleStatus): - value.value - -define function "ToString"(value GraphCompartmentRule): - value.value - -define function "ToString"(value GraphCompartmentUse): - value.value - -define function "ToString"(value GroupMeasure): - value.value - -define function "ToString"(value GroupType): - value.value - -define function "ToString"(value GuidanceResponseStatus): - value.value - -define function "ToString"(value GuidePageGeneration): - value.value - -define function "ToString"(value GuideParameterCode): - value.value - -define function "ToString"(value HTTPVerb): - value.value - -define function "ToString"(value IdentifierUse): - value.value - -define function "ToString"(value IdentityAssuranceLevel): - value.value - -define function "ToString"(value ImagingStudyStatus): - value.value - -define function "ToString"(value ImmunizationEvaluationStatus): - value.value - -define function "ToString"(value ImmunizationStatus): - value.value - -define function "ToString"(value InvoicePriceComponentType): - value.value - -define function "ToString"(value InvoiceStatus): - value.value - -define function "ToString"(value IssueSeverity): - value.value - -define function "ToString"(value IssueType): - value.value - -define function "ToString"(value LinkType): - value.value - -define function "ToString"(value LinkageType): - value.value - -define function "ToString"(value ListMode): - value.value - -define function "ToString"(value ListStatus): - value.value - -define function "ToString"(value LocationMode): - value.value - -define function "ToString"(value LocationStatus): - value.value - -define function "ToString"(value MeasureReportStatus): - value.value - -define function "ToString"(value MeasureReportType): - value.value - -define function "ToString"(value MediaStatus): - value.value - -define function "ToString"(value MedicationAdministrationStatus): - value.value - -define function "ToString"(value MedicationDispenseStatus): - value.value - -define function "ToString"(value MedicationKnowledgeStatus): - value.value - -define function "ToString"(value MedicationRequestIntent): - value.value - -define function "ToString"(value MedicationRequestPriority): - value.value - -define function "ToString"(value MedicationRequestStatus): - value.value - -define function "ToString"(value MedicationStatementStatus): - value.value - -define function "ToString"(value MedicationStatus): - value.value - -define function "ToString"(value MessageSignificanceCategory): - value.value - -define function "ToString"(value Messageheader_Response_Request): - value.value - -define function "ToString"(value MimeType): - value.value - -define function "ToString"(value NameUse): - value.value - -define function "ToString"(value NamingSystemIdentifierType): - value.value - -define function "ToString"(value NamingSystemType): - value.value - -define function "ToString"(value NarrativeStatus): - value.value - -define function "ToString"(value NoteType): - value.value - -define function "ToString"(value NutritiionOrderIntent): - value.value - -define function "ToString"(value NutritionOrderStatus): - value.value - -define function "ToString"(value ObservationDataType): - value.value - -define function "ToString"(value ObservationRangeCategory): - value.value - -define function "ToString"(value ObservationStatus): - value.value - -define function "ToString"(value OperationKind): - value.value - -define function "ToString"(value OperationParameterUse): - value.value - -define function "ToString"(value OrientationType): - value.value - -define function "ToString"(value ParameterUse): - value.value - -define function "ToString"(value ParticipantRequired): - value.value - -define function "ToString"(value ParticipantStatus): - value.value - -define function "ToString"(value ParticipationStatus): - value.value - -define function "ToString"(value PaymentNoticeStatus): - value.value - -define function "ToString"(value PaymentReconciliationStatus): - value.value - -define function "ToString"(value ProcedureStatus): - value.value - -define function "ToString"(value PropertyRepresentation): - value.value - -define function "ToString"(value PropertyType): - value.value - -define function "ToString"(value ProvenanceEntityRole): - value.value - -define function "ToString"(value PublicationStatus): - value.value - -define function "ToString"(value QualityType): - value.value - -define function "ToString"(value QuantityComparator): - value.value - -define function "ToString"(value QuestionnaireItemOperator): - value.value - -define function "ToString"(value QuestionnaireItemType): - value.value - -define function "ToString"(value QuestionnaireResponseStatus): - value.value - -define function "ToString"(value ReferenceHandlingPolicy): - value.value - -define function "ToString"(value ReferenceVersionRules): - value.value - -define function "ToString"(value ReferredDocumentStatus): - value.value - -define function "ToString"(value RelatedArtifactType): - value.value - -define function "ToString"(value RemittanceOutcome): - value.value - -define function "ToString"(value RepositoryType): - value.value - -define function "ToString"(value RequestIntent): - value.value - -define function "ToString"(value RequestPriority): - value.value - -define function "ToString"(value RequestStatus): - value.value - -define function "ToString"(value ResearchElementType): - value.value - -define function "ToString"(value ResearchStudyStatus): - value.value - -define function "ToString"(value ResearchSubjectStatus): - value.value - -define function "ToString"(value ResourceType): - value.value - -define function "ToString"(value ResourceVersionPolicy): - value.value - -define function "ToString"(value ResponseType): - value.value - -define function "ToString"(value RestfulCapabilityMode): - value.value - -define function "ToString"(value RiskAssessmentStatus): - value.value - -define function "ToString"(value SPDXLicense): - value.value - -define function "ToString"(value SearchComparator): - value.value - -define function "ToString"(value SearchEntryMode): - value.value - -define function "ToString"(value SearchModifierCode): - value.value - -define function "ToString"(value SearchParamType): - value.value - -define function "ToString"(value SectionMode): - value.value - -define function "ToString"(value SequenceType): - value.value - -define function "ToString"(value ServiceRequestIntent): - value.value - -define function "ToString"(value ServiceRequestPriority): - value.value - -define function "ToString"(value ServiceRequestStatus): - value.value - -define function "ToString"(value SlicingRules): - value.value - -define function "ToString"(value SlotStatus): - value.value - -define function "ToString"(value SortDirection): - value.value - -define function "ToString"(value SpecimenContainedPreference): - value.value - -define function "ToString"(value SpecimenStatus): - value.value - -define function "ToString"(value Status): - value.value - -define function "ToString"(value StrandType): - value.value - -define function "ToString"(value StructureDefinitionKind): - value.value - -define function "ToString"(value StructureMapContextType): - value.value - -define function "ToString"(value StructureMapGroupTypeMode): - value.value - -define function "ToString"(value StructureMapInputMode): - value.value - -define function "ToString"(value StructureMapModelMode): - value.value - -define function "ToString"(value StructureMapSourceListMode): - value.value - -define function "ToString"(value StructureMapTargetListMode): - value.value - -define function "ToString"(value StructureMapTransform): - value.value - -define function "ToString"(value SubscriptionChannelType): - value.value - -define function "ToString"(value SubscriptionStatus): - value.value - -define function "ToString"(value SupplyDeliveryStatus): - value.value - -define function "ToString"(value SupplyRequestStatus): - value.value - -define function "ToString"(value SystemRestfulInteraction): - value.value - -define function "ToString"(value TaskIntent): - value.value - -define function "ToString"(value TaskPriority): - value.value - -define function "ToString"(value TaskStatus): - value.value - -define function "ToString"(value TestReportActionResult): - value.value - -define function "ToString"(value TestReportParticipantType): - value.value - -define function "ToString"(value TestReportResult): - value.value - -define function "ToString"(value TestReportStatus): - value.value - -define function "ToString"(value TestScriptRequestMethodCode): - value.value - -define function "ToString"(value TriggerType): - value.value - -define function "ToString"(value TypeDerivationRule): - value.value - -define function "ToString"(value TypeRestfulInteraction): - value.value - -define function "ToString"(value UDIEntryType): - value.value - -define function "ToString"(value UnitsOfTime): - value.value - -define function "ToString"(value Use): - value.value - -define function "ToString"(value VariableType): - value.value - -define function "ToString"(value VisionBase): - value.value - -define function "ToString"(value VisionEyes): - value.value - -define function "ToString"(value VisionStatus): - value.value - -define function "ToString"(value XPathUsageType): - value.value - -define function "ToString"(value base64Binary): - value.value - -define function "ToString"(value id): - value.value - -define function "ToBoolean"(value boolean): - value.value - -define function "ToDate"(value date): - value.value - -define function "ToDateTime"(value dateTime): - value.value - -define function "ToDecimal"(value decimal): - value.value - -define function "ToDateTime"(value instant): - value.value - -define function "ToInteger"(value integer): - value.value - -define function "ToString"(value string): - value.value - -define function "ToTime"(value time): - value.value - -define function "ToString"(value uri): - value.value - -define function "ToString"(value xhtml): - value.value \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql deleted file mode 100644 index 8defc292f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql +++ /dev/null @@ -1,240 +0,0 @@ -library OutpatientPriorAuthorizationPrepopulation version '1.0.0' - -using FHIR version '4.0.1' - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - - - -include FHIRHelpers version '4.0.001' called FHIRHelpers -// valueset "AAN MCI Encounters Outpt and Care Plan": 'https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1040' - -/* parameter EncounterId String */ - - - -parameter ClaimId String default '14703' - -context Patient - -define ClaimResource: - First([Claim] C - where C.id = ClaimId - ) - -define OrganizationFacility: - First([Organization] O - where EndsWith(ClaimResource.provider.reference, O.id) - ) - -define "FacilityName": - OrganizationFacility.name.value - -define "FacilityNPI": - ( OrganizationFacility.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define function FindPractitioner(myCode String, mySequence Integer): - //If we can't find a Primary practicioner by code, use the sequence as a fallback. - - Coalesce(First([Practitioner] P //Practitioner who is on the careteam and contains a code that equals supplied code - - where EndsWith(First(ClaimResource.careTeam CT - where exists(CT.role.coding CTCode - where CTCode.code.value = myCode - ) - ).provider.reference, P.id - ) - ), First([Practitioner] P //Practitioner who is on the careteam and is of the supplied sequence - - where EndsWith(First(ClaimResource.careTeam CT - where CT.sequence = mySequence - ).provider.reference, P.id - ) - ) - ) - -define PractitionerOperatingPhysician: - FindPractitioner('primary', 1) - -define PractitionerAttendingPhysician: - FindPractitioner('assist', 2) - -// Should probably be seperate, Utiltiy files; but just for practice: - -//PATIENT INFO - - - -define OfficialName: - First(Patient.name name - where name.use.value = 'official' - ) - -define FirstName: - Patient.name[0] - -define BeneficiaryName: - Coalesce(OfficialName, FirstName) - -define "BeneficiaryFirstName": - BeneficiaryName.given[0].value - -define "BeneficiaryLastName": - BeneficiaryName.family.value - -define "BeneficiaryDOB": - Patient.birthDate.value - -define "BeneficiaryGender": - Patient.gender.value - -define RequestCoverage: - ClaimResource.insurance - -define CoverageResource: - First([Coverage] coverage - // pull coverage resource id from the service request insurance extension - - where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) - ) - -define "BeneficiaryMedicareID": - CoverageResource.subscriberId.value - -// OPERATING PHYSICIAN INFO - - -define "OperatingPhysicianFirstName": - PractitionerOperatingPhysician.name.given[0].value - -define "OperatingPhysicianLastName": - PractitionerOperatingPhysician.name.family.value - -define "OperatingPhysicianNPI": - ( PractitionerOperatingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define OperatingPhysicianAddress: - First(PractitionerOperatingPhysician.address address - where address.use.value = 'work' - ) - -define "OperatingPhysicianAddress1": - OperatingPhysicianAddress.line[0].value - -define "OperatingPhysicianAddress2": - OperatingPhysicianAddress.line[1].value - -define "OperatingPhysicianAddressCity": - OperatingPhysicianAddress.city.value - -define "OperatingPhysicianAddressState": - OperatingPhysicianAddress.state.value - -define "OperatingPhysicianAddressZip": - OperatingPhysicianAddress.postalCode.value - -// Attending PHYSICIAN INFO - - -define "AttendingPhysicianSame": - case - when PractitionerAttendingPhysician is not null then false - else true end - -define "AttendingPhysicianFirstName": - PractitionerAttendingPhysician.name.given[0].value - -define "AttendingPhysicianLastName": - PractitionerAttendingPhysician.name.family.value - -define "AttendingPhysicianNPI": - ( PractitionerAttendingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define AttendingPhysicianAddressWork: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'work' - ) - -define AttendingPhysicianAddressHome: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'home' - ) - -define AttendingPhysicianAddress: - Coalesce(AttendingPhysicianAddressWork, AttendingPhysicianAddressHome) - -define "AttendingPhysicianAddress1": - AttendingPhysicianAddress.line[0].value - -define "AttendingPhysicianAddress2": - AttendingPhysicianAddress.line[1].value - -define "AttendingPhysicianAddressCity": - AttendingPhysicianAddress.city.value - -define "AttendingPhysicianAddressState": - AttendingPhysicianAddress.state.value - -define "AttendingPhysicianAddressZip": - AttendingPhysicianAddress.postalCode.value - -//CLAIM INFORMATION - - -define ClaimDiagnosisReferenced: - First([Condition] C - where //First condition referenced by the Claim - exists(ClaimResource.diagnosis.diagnosis Condition - where EndsWith(Condition.reference, C.id) - ) - ).code.coding[0].code.value - -define ClaimDiagnosisCode: - ClaimResource.diagnosis.diagnosis.coding[0].code.value //TODO: Check for primary vs. secondary? - - -define "RequestDetailsPrimaryDiagnosisCode": - Coalesce(ClaimDiagnosisCode, ClaimDiagnosisReferenced) - -//PROCEDURE INFORMATION - - -define RelevantReferencedProcedures: - [Procedure] P - where P.status.value != 'completed' - and exists ( ClaimResource.procedure Procedure - where EndsWith(Procedure.procedure.reference, P.id) - ) - -define function FindProcedure(proc String): - exists ( ClaimResource.procedure.procedure.coding P - where P.code.value = proc - ) - or exists ( RelevantReferencedProcedures.code.coding coding - where coding.code.value = proc - ) - -define "RequestDetailsProcedureCode64612": - FindProcedure('64612') - -define "RequestDetailsProcedureCodeJ0586": - FindProcedure('J0586') - -define "RequestDetailsProcedureCode64615": - FindProcedure('64615') - -define "RequestDetailsProcedureCode20912": - FindProcedure('20912') - -define "RequestDetailsProcedureCode36478": - FindProcedure('36478') - -define "RequestDetailsProcedureCode22551": - FindProcedure('22551') \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/ASLPConcepts.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/ASLPConcepts.cql deleted file mode 100644 index 0e3d24d0e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/ASLPConcepts.cql +++ /dev/null @@ -1,36 +0,0 @@ -library ASLPConcepts version '1.0.000' - -// Code Systems - - -codesystem "ICD-10": 'http://hl7.org/fhir/sid/icd-10' -codesystem "SNOMED-CT": 'http://snomed.info/sct' -codesystem "LOINC": 'http://loinc.org' -codesystem "RxNorm": 'http://www.nlm.nih.gov/research/umls/rxnorm' -codesystem "CPT": 'http://www.ama-assn.org/go/cpt' -codesystem "HCPCS": 'https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets' -codesystem "CIEL": 'http://hl7.org/fhir/sid/ciel' -codesystem "ICD-11": 'http://hl7.org/fhir/sid/icd-11' -codesystem "ICHI": 'https://mitel.dimi.uniud.it/ichi/#http://id.who.int/ichi' -codesystem "ICF": 'http://hl7.org/fhir/sid/icf-nl' -codesystem "NDC": 'http://hl7.org/fhir/sid/ndc' -codesystem "NIDA": 'https://cde.drugabuse.gov' -codesystem "ASLP Codes": 'http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes' - -// Value Sets - - -valueset "Home Based Testing Sleep Studies Codes": 'http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de2' -valueset "Facility Based Testing Sleep Studies Codes": 'http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de9' -valueset "Sleep Study Codes Grouper": 'http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper' -valueset "Diagnosis of Obstructive Sleep Apnea Codes": 'http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17' - -// Codes - - -code "History of Hypertension": 'ASLP.A1.DE18' from "ASLP Codes" display 'History of Hypertension' -code "History of Diabetes": 'ASLP.A1.DE19' from "ASLP Codes" display 'History of Diabetes' -code "Neck Circumference": 'ASLP.A1.DE23' from "ASLP Codes" display 'Neck Circumference' -code "Height": 'ASLP.A1.DE20' from "ASLP Codes" display 'Body height' -code "Weight": 'ASLP.A1.DE21' from "ASLP Codes" display 'Weight' -code "BMI": 'ASLP.A1.DE22' from "ASLP Codes" display 'BMI' \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/ASLPDataElements.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/ASLPDataElements.cql deleted file mode 100644 index 701da5e47..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/ASLPDataElements.cql +++ /dev/null @@ -1,144 +0,0 @@ -library ASLPDataElements - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.1.000' -include FHIRCommon version '1.1.000' called FC -include SDHCommon called SC -include ASLPConcepts called Cs - -parameter "Device Request" List -parameter "Device Request Id" List -parameter "Medication Request" List -parameter "Medication Request Id" List -parameter "Nutrition Order" List -parameter "Nutrition Order Id" List -parameter "Service Request" List -parameter "Service Request Id" List -parameter "Coverage Id" List - -context Patient - -/* - @dataElement: ASLP.A1.DE22 BMI - @activity: ASLP.A1 Adult Sleep Studies - @description: Body mass index (BMI) -*/ - - -define "BMI": - convert ( SC.MostRecent ( [Observation: Cs."BMI"] O - where O.status in { 'final', 'amended', 'corrected' } ).value as FHIR.Quantity - ) to 'kg/m2' - - -/* - @dataElement: ASLP.A1.DE16 Diagnosis of Obstructive Sleep Apnea - @activity: ASLP.A1 Adult Sleep Studies - @description: Diagnosis of Obstructive Sleep Apnea -*/ - - -define "Diagnosis of Obstructive Sleep Apnea": - SC.MostRecent ( [Condition: Cs."Diagnosis of Obstructive Sleep Apnea Codes"] C - where C.clinicalStatus in FC."Active Condition" - and C.verificationStatus ~ FC."confirmed" ).code - - -/* - @dataElement: ASLP.A1.DE20 Height - @activity: ASLP.A1 Adult Sleep Studies - @description: Height (in inches) -*/ - - -define "Height": - convert ( SC.MostRecent ( [Observation: Cs."Height"] O - where O.status in { 'final', 'amended', 'corrected' } ).value as FHIR.Quantity - ) to '[in_i]' - - -/* - @dataElement: ASLP.A1.DE19 History of Diabetes - @activity: ASLP.A1 Adult Sleep Studies - @description: History of Diabetes -*/ - - -define "History of Diabetes": - Coalesce(SC.Has([Condition: Cs."History of Diabetes"] C - where C.clinicalStatus in FC."Active Condition" - and C.verificationStatus ~ FC."confirmed"), SC.Has([Observation: Cs."History of Diabetes"] O - where O.status in { 'final', 'amended', 'corrected' } - and(convert(O.value as FHIR.Quantity) to 'mmol/L').value > 7.5) - ) - - -/* - @dataElement: ASLP.A1.DE18 History of Hypertension - @activity: ASLP.A1 Adult Sleep Studies - @description: History of Hypertension -*/ - - -define "History of Hypertension": - SC.Has ( [Condition: Cs."History of Hypertension"] C - where C.clinicalStatus in FC."Active Condition" - and C.verificationStatus ~ FC."confirmed" ) - - -/* - @dataElement: ASLP.A1.DE20 Neck Circumference - @activity: ASLP.A1 Adult Sleep Studies - @description: Neck circumference (in inches) -*/ - - -define "Neck Circumference": - convert ( SC.MostRecent ( [Observation: Cs."Neck Circumference"] O - where O.status in { 'final', 'amended', 'corrected' } ).value as FHIR.Quantity - ) to '[in_i]' - - -/* - @dataElement: ASLP.A1.DE1 Sleep Study - @activity: ASLP.A1 Adult Sleep Studies - @description: A sleep study procedure being ordered -*/ - - -define "Sleep Study": - Coalesce([ServiceRequest] SR - where SR.id in "Service Request Id", { null as FHIR.ServiceRequest } - ) - union Coalesce("Service Request", { null as FHIR.ServiceRequest }) - -define "Sleep Study Code": - ( "Sleep Study" ).code - - -/* - @dataElement: ALSP.A1.DE15 Sleep Study Date - @activity: ASLP.A1 Adult Sleep Studies - @description: Date of the procedure -*/ - - -define "Sleep Study Date": - ( "Sleep Study" ).occurrence - - -/* - @dataElement: ASLP.A1.DE21 Weight - @activity: ASLP.A1 Adult Sleep Studies - @description: Weight (in pounds) -*/ - - -define "Weight": - convert ( SC.MostRecent ( [Observation: Cs."Weight"] O - where O.status in { 'final', 'amended', 'corrected' } ).value as FHIR.Quantity - ) to '[lb_av]' - -define "Is Authorized": - true \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/Common.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/Common.cql deleted file mode 100644 index e2a0d6f56..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/Common.cql +++ /dev/null @@ -1,58 +0,0 @@ -library Common version '0.0.001' - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.1.000' called FHIRHelpers - -codesystem "ObservationStatusCodes": 'http://hl7.org/fhir/observation-status' - -code "final": 'final' from "ObservationStatusCodes" -code "amended": 'amended' from "ObservationStatusCodes" -code "corrected": 'corrected' from "ObservationStatusCodes" -code "preliminary": 'preliminary' from "ObservationStatusCodes" - -parameter "Asserted Lookback Duration" System.Quantity default 6 months - -context Patient - -define function MostRecent(value List): - First(value Observation - sort by effective descending - ) - -define function QualifiedObservations(value List): - value Observation - where ( Observation.status ~ "final".code - or Observation.status ~ "amended".code - or Observation.status ~ "corrected".code - ) - -define function QualifiedCaseFeatureObservations(value List): - value Observation - where ( Observation.status ~ "final".code - or Observation.status ~ "amended".code - or Observation.status ~ "corrected".code - or Observation.status ~ "preliminary".code - ) - and WithinAssertedPeriod(Observation.effective) - -define function WithinAssertedPeriod(value Choice): - if ( value is FHIR.dateTime ) then value as FHIR.dateTime on or after ( ToDateTime(Today()) ) - "Asserted Lookback Duration" - else ToDateTime(value as FHIR.date) on or after ( ToDateTime(Today()) ) - "Asserted Lookback Duration" - -define function ReferenceTo(patient Patient): - Reference { reference: string { value: 'Patient/' + patient.id } } - -/* -Getting error with this overload: -Cannot resolve reference to expression or function CaseFeatureObservation() because it results in a circular reference - -define function CaseFeatureObservation(code CodeableConcept, value System.Quantity, profile String): - CaseFeatureObservation(code, value, Now(), profile) -*/ - - -define function CaseFeatureObservation(code CodeableConcept, value System.Quantity, effective DateTime, profile String): - Observation { meta: Meta { profile: { canonical { value: profile } } }, code: code, effective: dateTime { value: Coalesce(effective, Now()) }, issued: instant { value: Now() }, subject: ReferenceTo(Patient), status: ObservationStatus { value: 'preliminary' }, value: Quantity { value: decimal { value: value.value }, unit: string { value: value.unit }, system: uri { value: 'http://unitsofmeasure.org' }, code: code { value: value.unit } } - //other elements - } \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/FHIRCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/FHIRCommon.cql deleted file mode 100644 index 8dc2864b6..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/FHIRCommon.cql +++ /dev/null @@ -1,345 +0,0 @@ -/* -@author: Bryn Rhodes -@description: Common terminologies and functions used in FHIR-based CQL artifacts -@source: http://fhir.org/guides/cqf/common/Library/FHIRCommon -@update: Version 1.1.000, based on MAT versioning -*/ -library FHIRCommon version '1.1.000' - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.1.000' - -codesystem "LOINC": 'http://loinc.org' -codesystem "SNOMEDCT": 'http://snomed.info/sct' -codesystem "ICD10CM": 'http://hl7.org/fhir/sid/icd-10-cm' -codesystem "RoleCode": 'http://terminology.hl7.org/CodeSystem/v3-RoleCode' -codesystem "Diagnosis Role": 'http://terminology.hl7.org/CodeSystem/diagnosis-role' -codesystem "RequestIntent": 'http://terminology.hl7.org/CodeSystem/request-intent' -codesystem "MedicationRequestCategory": 'http://terminology.hl7.org/CodeSystem/medicationrequest-category' -codesystem "ConditionClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-clinical' -codesystem "ConditionVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-ver-status' -codesystem "AllergyIntoleranceClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical' -codesystem "AllergyIntoleranceVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' -codesystem "ConditionCategoryCodes": 'http://terminology.hl7.org/CodeSystem/condition-category' -codesystem "ObservationCategoryCodes": 'http://terminology.hl7.org/CodeSystem/observation-category' - -// NOT in VSAC so can't be included in the MAT - - -valueset "Active Condition": 'http://fhir.org/guides/cqf/common/ValueSet/active-condition' -valueset "Inactive Condition": 'http://fhir.org/guides/cqf/common/ValueSet/inactive-condition' - -code "Birthdate": '21112-8' from "LOINC" display 'Birth date' -code "Dead": '419099009' from "SNOMEDCT" display 'Dead' -code "ER": 'ER' from "RoleCode" display 'Emergency room' -code "ICU": 'ICU' from "RoleCode" display 'Intensive care unit' -code "Billing": 'billing' from "Diagnosis Role" display 'Billing' - -// Condition Clinical Status Codes - Consider value sets for these - -code "active": 'active' from "ConditionClinicalStatusCodes" -code "recurrence": 'recurrence' from "ConditionClinicalStatusCodes" -code "relapse": 'relapse' from "ConditionClinicalStatusCodes" -code "inactive": 'inactive' from "ConditionClinicalStatusCodes" -code "remission": 'remission' from "ConditionClinicalStatusCodes" -code "resolved": 'resolved' from "ConditionClinicalStatusCodes" - -// Condition Verification Status Codes - Consider value sets for these - -code "unconfirmed": 'unconfirmed' from ConditionVerificationStatusCodes -code "provisional": 'provisional' from ConditionVerificationStatusCodes -code "differential": 'differential' from ConditionVerificationStatusCodes -code "confirmed": 'confirmed' from ConditionVerificationStatusCodes -code "refuted": 'refuted' from ConditionVerificationStatusCodes -code "entered-in-error": 'entered-in-error' from ConditionVerificationStatusCodes -code "allergy-active": 'active' from "AllergyIntoleranceClinicalStatusCodes" -code "allergy-inactive": 'inactive' from "AllergyIntoleranceClinicalStatusCodes" -code "allergy-resolved": 'resolved' from "AllergyIntoleranceClinicalStatusCodes" - -// Allergy/Intolerance Verification Status Codes - Consider value sets for these - -code "allergy-unconfirmed": 'unconfirmed' from AllergyIntoleranceVerificationStatusCodes -code "allergy-confirmed": 'confirmed' from AllergyIntoleranceVerificationStatusCodes -code "allergy-refuted": 'refuted' from AllergyIntoleranceVerificationStatusCodes - -// MedicationRequest Category Codes - -code "Community": 'community' from "MedicationRequestCategory" display 'Community' -code "Discharge": 'discharge' from "MedicationRequestCategory" display 'Discharge' - -// Diagnosis Role Codes - -code "AD": 'AD' from "Diagnosis Role" display 'Admission diagnosis' -code "DD": 'DD' from "Diagnosis Role" display 'Discharge diagnosis' -code "CC": 'CC' from "Diagnosis Role" display 'Chief complaint' -code "CM": 'CM' from "Diagnosis Role" display 'Comorbidity diagnosis' -code "pre-op": 'pre-op' from "Diagnosis Role" display 'pre-op diagnosis' -code "post-op": 'post-op' from "Diagnosis Role" display 'post-op diagnosis' -code "billing": 'billing' from "Diagnosis Role" display 'billing diagnosis' - -// Observation Category Codes - -code "social-history": 'social-history' from "ObservationCategoryCodes" display 'Social History' -code "vital-signs": 'vital-signs' from "ObservationCategoryCodes" display 'Vital Signs' -code "imaging": 'imaging' from "ObservationCategoryCodes" display 'Imaging' -code "laboratory": 'laboratory' from "ObservationCategoryCodes" display 'Laboratory' -code "procedure": 'procedure' from "ObservationCategoryCodes" display 'Procedure' -code "survey": 'survey' from "ObservationCategoryCodes" display 'Survey' -code "exam": 'exam' from "ObservationCategoryCodes" display 'Exam' -code "therapy": 'therapy' from "ObservationCategoryCodes" display 'Therapy' -code "activity": 'activity' from "ObservationCategoryCodes" display 'Activity' - -// Condition Category Codes - -code "problem-list-item": 'problem-list-item' from "ConditionCategoryCodes" display 'Problem List Item' -code "encounter-diagnosis": 'encounter-diagnosis' from "ConditionCategoryCodes" display 'Encounter Diagnosis' - -context Patient - -/* -@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval -@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types -to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible -representations for timing-valued elements in FHIR, allowing this function to be used across any resource. - -The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range. -The intent of this function is to provide a clear and concise mechanism to treat single -elements that have multiple possible representations as intervals so that logic doesn't have to account -for the variability. More complex calculations (such as medication request period or dispense period -calculation) need specific guidance and consideration. That guidance may make use of this function, but -the focus of this function is on single element calculations where the semantics are unambiguous. -If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime. -If the input is a Period, the result is a DateTime Interval. -If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing. -If the input is an instant, the result is a DateTime Interval beginning and ending on that instant. -If the input is a string, an error is raised indicating a single interval cannot be computed from a string. -If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age, -and ending immediately prior to when the patient was the given Age plus one year. -If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given -by the low end of the Range, and ending immediately prior to when the patient was the Age given by the -high end of the Range plus one year. - -NOTE: Due to the -complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used -with a Timing or String. -*/ - - -define function ToInterval(choice Choice): - case - when choice is FHIR.dateTime then Interval[FHIRHelpers.ToDateTime ( choice as FHIR.dateTime ), FHIRHelpers.ToDateTime ( choice as FHIR.dateTime )] - when choice is FHIR.Period then FHIRHelpers.ToInterval ( choice as FHIR.Period ) - when choice is FHIR.instant then Interval[FHIRHelpers.ToDateTime ( choice as FHIR.instant ), FHIRHelpers.ToDateTime ( choice as FHIR.instant )] - when choice is FHIR.Age then Interval[FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( choice as FHIR.Age ), FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( choice as FHIR.Age ) + 1 year ) - when choice is FHIR.Range then Interval[FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( ( choice as FHIR.Range ).low ), FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( ( choice as FHIR.Range ).high ) + 1 year ) - when choice is FHIR.Timing then Message(null as Interval, true, '1', 'Error', 'Cannot compute a single interval from a Timing type') - when choice is FHIR.string then Message(null as Interval, true, '1', 'Error', 'Cannot compute an interval from a String value') - else null as Intervalend - -/* -@description: Returns an interval representing the normalized Abatement of a given Condition resource. -@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw -a run-time exception if used with a Condition instance that has a String as the abatement value. -*/ - - -define function ToAbatementInterval(condition Condition): - if condition.abatement is FHIR.dateTime then Interval[FHIRHelpers.ToDateTime ( condition.abatement as FHIR.dateTime ), FHIRHelpers.ToDateTime ( condition.abatement as FHIR.dateTime )] - else if condition.abatement is FHIR.Period then FHIRHelpers.ToInterval ( condition.abatement as FHIR.Period ) - else if condition.abatement is FHIR.string then Message(null as Interval, true, '1', 'Error', 'Cannot compute an interval from a String value') - else if condition.abatement is FHIR.Age then Interval[FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( condition.abatement as FHIR.Age ), FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( condition.abatement as FHIR.Age ) + 1 year ) - else if condition.abatement is FHIR.Range then Interval[FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( ( condition.abatement as FHIR.Range ).low ), FHIRHelpers.ToDate ( Patient.birthDate ) + FHIRHelpers.ToQuantity ( ( condition.abatement as FHIR.Range ).high ) + 1 year ) - else if condition.abatement is FHIR.boolean then Interval[end of ToInterval(condition.onset), condition.recordedDate ) - else null - -/* -@description: Returns an interval representing the normalized prevalence period of a given Condition resource. -@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from -onset to abatement as specified in the given Condition. -*/ - - -define function ToPrevalenceInterval(condition Condition): - if condition.clinicalStatus ~ "active" - or condition.clinicalStatus ~ "recurrence" - or condition.clinicalStatus ~ "relapse" then Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)] - else Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition) ) - -/* -@description: Returns any extensions defined on the given resource with the specified url. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the -CQL model info. -*/ - - -define function Extensions(domainResource DomainResource, url String): - domainResource.extension E - where E.url = url - return E - -/* -@description: Returns the single extension (if present) on the given resource with the specified url. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function Extension(domainResource DomainResource, url String): - singleton from "Extensions"(domainResource, url) - -/* -@description: Returns any extensions defined on the given element with the specified url. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. -*/ - - -define function Extensions(element Element, url String): - element.extension E - where E.url = url - return E - -/* -@description: Returns the single extension (if present) on the given element with the specified url. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function Extension(element Element, url String): - singleton from Extensions(element, url) - -/* -@description: Returns any modifier extensions defined on the given resource with the specified url. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the -CQL model info. -*/ - - -define function ModifierExtensions(domainResource DomainResource, url String): - domainResource.modifierExtension E - where E.url = url - return E - -/* -@description: Returns the single modifier extension (if present) on the given resource with the specified url. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function ModifierExtension(domainResource DomainResource, url String): - singleton from ModifierExtensions(domainResource, url) - -/* -@description: Returns any modifier extensions defined on the given element with the specified url. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. -*/ - - -define function ModifierExtensions(element BackboneElement, url String): - element.modifierExtension E - where E.url = url - return E - -/* -@description: Returns the single modifier extension (if present) on the given element with the specified url. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function ModifierExtension(element BackboneElement, url String): - singleton from ModifierExtensions(element, url) - -/* -@description: Returns any base-FHIR extensions defined on the given resource with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. -*/ - - -define function BaseExtensions(domainResource DomainResource, id String): - domainResource.extension E - where E.url = ( 'http://hl7.org/fhir/StructureDefinition/' + id ) - return E - -/* -@description: Returns the single base-FHIR extension (if present) on the given resource with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function BaseExtension(domainResource DomainResource, id String): - singleton from BaseExtensions(domainResource, id) - -/* -@description: Returns any base-FHIR extensions defined on the given element with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. -*/ - - -define function BaseExtensions(element Element, id String): - element.extension E - where E.url = ( 'http://hl7.org/fhir/StructureDefinition/' + id ) - return E - -/* -@description: Returns the single base-FHIR extension (if present) on the given element with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function BaseExtension(element Element, id String): - singleton from BaseExtensions(element, id) - -/* -@description: Returns any base-FHIR modifier extensions defined on the given resource with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. -*/ - - -define function BaseModifierExtensions(domainResource DomainResource, id String): - domainResource.modifierExtension E - where E.url = ( 'http://hl7.org/fhir/StructureDefinition/' + id ) - return E - -/* -@description: Returns the single base-FHIR modifier extension (if present) on the given resource with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function BaseModifierExtension(domainResource DomainResource, id String): - singleton from BaseModifierExtensions(domainResource, id) - -/* -@description: Returns any base-FHIR modifier extensions defined on the given element with the specified id. -@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access -content that is defined by extensions but not yet surfaced in the CQL model info. -*/ - - -define function BaseModifierExtensions(element BackboneElement, id String): - element.modifierExtension E - where E.url = ( 'http://hl7.org/fhir/StructureDefinition/' + id ) - return E - -/* -@description: Returns the single base-FHIR extension (if present) on the given element with the specified id. -@comment: This function uses singleton from to ensure that a run-time exception is thrown if there -is more than one extension on the given resource with the specified url. -*/ - - -define function BaseModifierExtension(element BackboneElement, id String): - singleton from BaseModifierExtensions(element, id) \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/FHIRHelpers.cql deleted file mode 100644 index f3a06a60b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/FHIRHelpers.cql +++ /dev/null @@ -1,1250 +0,0 @@ -/* -@author: Bryn Rhodes -@description: This library defines functions to convert between FHIR - data types and CQL system-defined types, as well as functions to support - FHIRPath implementation. For more information, the FHIRHelpers wiki page: - https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers -@allowFluent: true - -@update: Refresh based on AU 2022 content -*/ -library FHIRHelpers version '4.1.000' - -using FHIR version '4.0.1' - -/* -@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period) -value to a CQL DateTime Interval -@comment: If the start value of the given period is unspecified, the starting -boundary of the resulting interval will be open (meaning the start of the interval -is unknown, as opposed to interpreted as the beginning of time). -*/ - - -define function ToInterval(period FHIR.Period): - if period is null then null - else if period."start" is null then Interval ( period."start".value, period."end".value] - else Interval[period."start".value, period."end".value] - -/* -@description: Converts a UCUM definite duration unit to a CQL calendar duration -unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) -topic of the CQL specification. -@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate -*/ - - -define function ToCalendarUnit(unit System.String): - case unit - when 'ms' then 'millisecond' - when 's' then 'second' - when 'min' then 'minute' - when 'h' then 'hour' - when 'd' then 'day' - when 'wk' then 'week' - when 'mo' then 'month' - when 'a' then 'year' - else unit end - -/* -@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) -value to a CQL Quantity -@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity -has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`) -an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used. -@seealso: ToCalendarUnit -*/ - - -define function ToQuantity(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.comparator is not null then Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.') - when quantity.system is null - or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end - -/* -@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) value to a CQL Quantity, ignoring -the comparator element. This function should only be used when an application is justified in ignoring the comparator value (i.e. the -context is looking for boundary). -@comment: If the given quantity has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units -(i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`) an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function -is used. -@seealso: ToCalendarUnit -*/ - - -define function ToQuantityIgnoringComparator(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.system is null - or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end - -/* -@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) value to a CQL Interval of Quantity. -@comment: If the given quantity has a comparator, it is used to construct an interval based on the value of the comparator. If the comparator -is less than, the resulting interval will start with a null closed boundary and end with an open boundary on the quantity. If the comparator -is less than or equal, the resulting interval will start with a null closed boundary and end with a closed boundary on the quantity. If the -comparator is greater or equal, the resulting interval will start with a closed boundary on the quantity and end with a closed null boundary. -If the comparator is greatter than, the resulting interval will start with an open boundary on the quantity and end with a closed null boundary. -If no comparator is specified, the resulting interval will start and end with a closed boundary on the quantity. -*/ - - -define function ToInterval(quantity FHIR.Quantity): - if quantity is null then null - else case quantity.comparator.value - when '<' then Interval[null, ToQuantityIgnoringComparator(quantity) ) - when '<=' then Interval[null, ToQuantityIgnoringComparator(quantity)] - when '>=' then Interval[ToQuantityIgnoringComparator(quantity), null] - when '>' then Interval ( ToQuantityIgnoringComparator(quantity), null] - else Interval[ToQuantity(quantity), ToQuantity(quantity)]end - -/* -@description: Converts the given FHIR [Ratio](https://hl7.org/fhir/datatypes.html#Ratio) value to a CQL Ratio. -*/ - - -define function ToRatio(ratio FHIR.Ratio): - if ratio is null then null - else System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -/* -@description: Converts the given FHIR [Range](https://hl7.org/fhir/datatypes.html#Range) value to a CQL Interval of Quantity -*/ - - -define function ToInterval(range FHIR.Range): - if range is null then null - else Interval[ToQuantity(range.low), ToQuantity(range.high)] - -/* -@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code. -*/ - - -define function ToCode(coding FHIR.Coding): - if coding is null then null - else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value } - -/* -@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept. -*/ - - -define function ToConcept(concept FHIR.CodeableConcept): - if concept is null then null - else System.Concept { codes: concept.coding C - return ToCode(C), display: concept.text.value } - -/* -@description: Converts the given value (assumed to be a URI) to a CQL [ValueSet](https://cql.hl7.org/09-b-cqlreference.html#valueset) -*/ - - -define function ToValueSet(uri String): - if uri is null then null - else System.ValueSet { id: uri } - -/* -@description: Constructs a FHIR [Reference](https://hl7.org/fhir/datatypes.html#Reference) from the given reference (assumed to be a FHIR resource URL) -*/ - - -define function reference(reference String): - if reference is null then null - else Reference { reference: string { value: reference } } - -/* -@description: Converts the given value to a CQL value using the appropriate accessor or conversion function. -@comment: TODO: document conversion -*/ - - -define function ToValue(value Choice): - case - when value is base64Binary then ( value as base64Binary ).value - when value is boolean then ( value as boolean ).value - when value is canonical then ( value as canonical ).value - when value is code then ( value as code ).value - when value is date then ( value as date ).value - when value is dateTime then ( value as dateTime ).value - when value is decimal then ( value as decimal ).value - when value is id then ( value as id ).value - when value is instant then ( value as instant ).value - when value is integer then ( value as integer ).value - when value is markdown then ( value as markdown ).value - when value is oid then ( value as oid ).value - when value is positiveInt then ( value as positiveInt ).value - when value is string then ( value as string ).value - when value is time then ( value as time ).value - when value is unsignedInt then ( value as unsignedInt ).value - when value is uri then ( value as uri ).value - when value is url then ( value as url ).value - when value is uuid then ( value as uuid ).value - when value is Age then ToQuantity(value as Age) - when value is CodeableConcept then ToConcept(value as CodeableConcept) - when value is Coding then ToCode(value as Coding) - when value is Count then ToQuantity(value as Count) - when value is Distance then ToQuantity(value as Distance) - when value is Duration then ToQuantity(value as Duration) - when value is Quantity then ToQuantity(value as Quantity) - when value is Range then ToInterval(value as Range) - when value is Period then ToInterval(value as Period) - when value is Ratio then ToRatio(value as Ratio) - else value as Choiceend - -/* -@description: Resolve the given reference as a url to a resource. If the item resolves, the Resource is returned, otherwise the result is null. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function resolve(reference String) returns Resource: - external -/* -@description: Resolve the reference element of the given Reference. If the item resolves, the Resource is returned, otherwise the result is null. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function resolve(reference Reference) returns Resource: - external -/* -@description: Constructs a Reference to the given Resource. The resulting reference will typically be relative, but implementations may provide a base URL if one can be unambiguously determined. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function reference(resource Resource) returns Reference: - external -/* -@description: Returns any extensions with the given url defined on the given element. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function extension(element Element, url String) returns List: - external -/* -@description: Returns any extensions with the given url defined on the given resource. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function extension(resource DomainResource, url String) returns List: - external -/* -@description: Returns any modifier extensions with the given url defined on the given element. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function modifierExtension(element BackboneElement, url String) returns List: - external -/* -@description: Returns any modifier extensions with the given url defined on the given resource. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function modifierExtension(resource DomainResource, url String) returns List: - external -/* -@description: Returns true if the element is a FHIR primitive type with a value element (as opposed to having only extensions); false otherwise -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function hasValue(element Element) returns Boolean: - external -/* -@description: Returns the value of the FHIR primitive; null otherwise -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function getValue(element Element) returns Any: - external -/* -@description: Returns a list containing only those elements in the input that are of the given type, specified as a string. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function ofType(identifier String) returns List: - external -/* -@description: Returns true if the input is of the given type; false otherwise -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function is(identifier String) returns Boolean: - external -/* -@description: If the input is of the given type; returns the value as that type; null otherwise. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function as(identifier String) returns Any: - external -/* -@description: Returns the FHIR element definition for the given element -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function elementDefinition(element Element) returns ElementDefinition: - external -/* -@description: Returns the given slice as defined in the given structure definition. The structure argument is a uri that resolves to the structure definition, and the name must be the name of a slice within that structure definition. If the structure cannot be resolved, or the name of the slice within the resolved structure is not present, an error is thrown. -@comment: For every element in the input collection, if the resolved slice is present on the element, it will be returned. If the slice does not match any element in the input collection, or if the input collection is empty, the result is an empty collection ({ }). -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function slice(element Element, url String, name String) returns List: - external -/* -@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function checkModifiers(resource Resource) returns Resource: - external -/* -@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function checkModifiers(resource Resource, modifier String) returns Resource: - external -/* -@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function checkModifiers(element Element) returns Element: - external -/* -@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function checkModifiers(element Element, modifier String) returns Element: - external -/* -@description: Returns true if the single input element conforms to the profile specified by the structure argument, and false otherwise. If the structure cannot be resolved to a valid profile, an error is thrown. If the input contains more than one element, an error is thrown. If the input is empty, the result is empty. -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function conformsTo(resource Resource, structure String) returns Boolean: - external -/* -@description: Returns true if the given code is equal to a code in the valueset, so long as the valueset only contains one codesystem. If the valueset contains more than one codesystem, an error is thrown. -@comment: If the valueset cannot be resolved as a uri to a value set, an error is thrown. - -Note that implementations are encouraged to make use of a terminology service to provide this functionality. - -For example: - -```fhirpath -Observation.component.where(code.memberOf('http://hl7.org/fhir/ValueSet/observation-vitalsignresult')) -``` - -This expression returns components that have a code that is a member of the observation-vitalsignresult valueset. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function memberOf(code code, valueSet String) returns Boolean: - external -/* -@description: Returns true if the code is a member of the given valueset. -@comment: If the valueset cannot be resolved as a uri to a value set, an error is thrown. - -Note that implementations are encouraged to make use of a terminology service to provide this functionality. - -For example: - -```fhirpath -Observation.component.where(code.memberOf('http://hl7.org/fhir/ValueSet/observation-vitalsignresult')) -``` - -This expression returns components that have a code that is a member of the observation-vitalsignresult valueset. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function memberOf(coding Coding, valueSet String) returns Boolean: - external -/* -@description: Returns true if any code in the concept is a member of the given valueset. -@comment: If the valueset cannot be resolved as a uri to a value set, an error is thrown. - -Note that implementations are encouraged to make use of a terminology service to provide this functionality. - -For example: - -```fhirpath -Observation.component.where(code.memberOf('http://hl7.org/fhir/ValueSet/observation-vitalsignresult')) -``` - -This expression returns components that have a code that is a member of the observation-vitalsignresult valueset. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function memberOf(concept CodeableConcept, valueSet String) returns Boolean: - external -/* -@description: Returns true if the source code is equivalent to the given code, or if the source code subsumes the given code (i.e. the source code is an ancestor of the given code in a subsumption hierarchy), and false otherwise. - -@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown. - -Note that implementations are encouraged to make use of a terminology service to provide this functionality. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function subsumes(coding Coding, subsumedCoding Coding) returns Boolean: - external -/* -@description: Returns true if any Coding in the source or given elements is equivalent to or subsumes the given code. - -@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown. - -Note that implementations are encouraged to make use of a terminology service to provide this functionality. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function subsumes(concept CodeableConcept, subsumedConcept CodeableConcept) returns Boolean: - external -/* -@description: Returns true if the source code is equivalent to the given code, or if the source code is subsumed by the given code (i.e. the source code is a descendant of the given code in a subsumption hierarchy), and false otherwise. - -@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown. - -Note that implementations are encouraged to make use of a terminology service to provide this functionality. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function subsumedBy(coding Coding, subsumingCoding Coding) returns Boolean: - external -/* -@description: Returns true if any Coding in the source or given elements is equivalent to or subsumed by the given code. - -@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown. - -Note that implementations are encouraged to make use of a terminology service to provide this functionality. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function subsumedBy(concept CodeableConcept, subsumingConcept CodeableConcept) returns Boolean: - external -/* -@description: When invoked on an xhtml element, returns true if the rules around HTML usage are met, and false if they are not. The return value is undefined (null) on any other kind of element. - -@seealso: https://hl7.org/fhir/fhirpath.html#functions -*/ - - -define function htmlChecks(element Element) returns Boolean: - external - -define function ToString(value AccountStatus): - value.value - -define function ToString(value ActionCardinalityBehavior): - value.value - -define function ToString(value ActionConditionKind): - value.value - -define function ToString(value ActionGroupingBehavior): - value.value - -define function ToString(value ActionParticipantType): - value.value - -define function ToString(value ActionPrecheckBehavior): - value.value - -define function ToString(value ActionRelationshipType): - value.value - -define function ToString(value ActionRequiredBehavior): - value.value - -define function ToString(value ActionSelectionBehavior): - value.value - -define function ToString(value ActivityDefinitionKind): - value.value - -define function ToString(value ActivityParticipantType): - value.value - -define function ToString(value AddressType): - value.value - -define function ToString(value AddressUse): - value.value - -define function ToString(value AdministrativeGender): - value.value - -define function ToString(value AdverseEventActuality): - value.value - -define function ToString(value AggregationMode): - value.value - -define function ToString(value AllergyIntoleranceCategory): - value.value - -define function ToString(value AllergyIntoleranceCriticality): - value.value - -define function ToString(value AllergyIntoleranceSeverity): - value.value - -define function ToString(value AllergyIntoleranceType): - value.value - -define function ToString(value AppointmentStatus): - value.value - -define function ToString(value AssertionDirectionType): - value.value - -define function ToString(value AssertionOperatorType): - value.value - -define function ToString(value AssertionResponseTypes): - value.value - -define function ToString(value AuditEventAction): - value.value - -define function ToString(value AuditEventAgentNetworkType): - value.value - -define function ToString(value AuditEventOutcome): - value.value - -define function ToString(value BindingStrength): - value.value - -define function ToString(value BiologicallyDerivedProductCategory): - value.value - -define function ToString(value BiologicallyDerivedProductStatus): - value.value - -define function ToString(value BiologicallyDerivedProductStorageScale): - value.value - -define function ToString(value BundleType): - value.value - -define function ToString(value CapabilityStatementKind): - value.value - -define function ToString(value CarePlanActivityKind): - value.value - -define function ToString(value CarePlanActivityStatus): - value.value - -define function ToString(value CarePlanIntent): - value.value - -define function ToString(value CarePlanStatus): - value.value - -define function ToString(value CareTeamStatus): - value.value - -define function ToString(value CatalogEntryRelationType): - value.value - -define function ToString(value ChargeItemDefinitionPriceComponentType): - value.value - -define function ToString(value ChargeItemStatus): - value.value - -define function ToString(value ClaimResponseStatus): - value.value - -define function ToString(value ClaimStatus): - value.value - -define function ToString(value ClinicalImpressionStatus): - value.value - -define function ToString(value CodeSearchSupport): - value.value - -define function ToString(value CodeSystemContentMode): - value.value - -define function ToString(value CodeSystemHierarchyMeaning): - value.value - -define function ToString(value CommunicationPriority): - value.value - -define function ToString(value CommunicationRequestStatus): - value.value - -define function ToString(value CommunicationStatus): - value.value - -define function ToString(value CompartmentCode): - value.value - -define function ToString(value CompartmentType): - value.value - -define function ToString(value CompositionAttestationMode): - value.value - -define function ToString(value CompositionStatus): - value.value - -define function ToString(value ConceptMapEquivalence): - value.value - -define function ToString(value ConceptMapGroupUnmappedMode): - value.value - -define function ToString(value ConditionalDeleteStatus): - value.value - -define function ToString(value ConditionalReadStatus): - value.value - -define function ToString(value ConsentDataMeaning): - value.value - -define function ToString(value ConsentProvisionType): - value.value - -define function ToString(value ConsentState): - value.value - -define function ToString(value ConstraintSeverity): - value.value - -define function ToString(value ContactPointSystem): - value.value - -define function ToString(value ContactPointUse): - value.value - -define function ToString(value ContractPublicationStatus): - value.value - -define function ToString(value ContractStatus): - value.value - -define function ToString(value ContributorType): - value.value - -define function ToString(value CoverageStatus): - value.value - -define function ToString(value CurrencyCode): - value.value - -define function ToString(value DayOfWeek): - value.value - -define function ToString(value DaysOfWeek): - value.value - -define function ToString(value DetectedIssueSeverity): - value.value - -define function ToString(value DetectedIssueStatus): - value.value - -define function ToString(value DeviceMetricCalibrationState): - value.value - -define function ToString(value DeviceMetricCalibrationType): - value.value - -define function ToString(value DeviceMetricCategory): - value.value - -define function ToString(value DeviceMetricColor): - value.value - -define function ToString(value DeviceMetricOperationalStatus): - value.value - -define function ToString(value DeviceNameType): - value.value - -define function ToString(value DeviceRequestStatus): - value.value - -define function ToString(value DeviceUseStatementStatus): - value.value - -define function ToString(value DiagnosticReportStatus): - value.value - -define function ToString(value DiscriminatorType): - value.value - -define function ToString(value DocumentConfidentiality): - value.value - -define function ToString(value DocumentMode): - value.value - -define function ToString(value DocumentReferenceStatus): - value.value - -define function ToString(value DocumentRelationshipType): - value.value - -define function ToString(value EligibilityRequestPurpose): - value.value - -define function ToString(value EligibilityRequestStatus): - value.value - -define function ToString(value EligibilityResponsePurpose): - value.value - -define function ToString(value EligibilityResponseStatus): - value.value - -define function ToString(value EnableWhenBehavior): - value.value - -define function ToString(value EncounterLocationStatus): - value.value - -define function ToString(value EncounterStatus): - value.value - -define function ToString(value EndpointStatus): - value.value - -define function ToString(value EnrollmentRequestStatus): - value.value - -define function ToString(value EnrollmentResponseStatus): - value.value - -define function ToString(value EpisodeOfCareStatus): - value.value - -define function ToString(value EventCapabilityMode): - value.value - -define function ToString(value EventTiming): - value.value - -define function ToString(value EvidenceVariableType): - value.value - -define function ToString(value ExampleScenarioActorType): - value.value - -define function ToString(value ExplanationOfBenefitStatus): - value.value - -define function ToString(value ExposureState): - value.value - -define function ToString(value ExtensionContextType): - value.value - -define function ToString(value FHIRAllTypes): - value.value - -define function ToString(value FHIRDefinedType): - value.value - -define function ToString(value FHIRDeviceStatus): - value.value - -define function ToString(value FHIRResourceType): - value.value - -define function ToString(value FHIRSubstanceStatus): - value.value - -define function ToString(value FHIRVersion): - value.value - -define function ToString(value FamilyHistoryStatus): - value.value - -define function ToString(value FilterOperator): - value.value - -define function ToString(value FlagStatus): - value.value - -define function ToString(value GoalLifecycleStatus): - value.value - -define function ToString(value GraphCompartmentRule): - value.value - -define function ToString(value GraphCompartmentUse): - value.value - -define function ToString(value GroupMeasure): - value.value - -define function ToString(value GroupType): - value.value - -define function ToString(value GuidanceResponseStatus): - value.value - -define function ToString(value GuidePageGeneration): - value.value - -define function ToString(value GuideParameterCode): - value.value - -define function ToString(value HTTPVerb): - value.value - -define function ToString(value IdentifierUse): - value.value - -define function ToString(value IdentityAssuranceLevel): - value.value - -define function ToString(value ImagingStudyStatus): - value.value - -define function ToString(value ImmunizationEvaluationStatus): - value.value - -define function ToString(value ImmunizationStatus): - value.value - -define function ToString(value InvoicePriceComponentType): - value.value - -define function ToString(value InvoiceStatus): - value.value - -define function ToString(value IssueSeverity): - value.value - -define function ToString(value IssueType): - value.value - -define function ToString(value LinkType): - value.value - -define function ToString(value LinkageType): - value.value - -define function ToString(value ListMode): - value.value - -define function ToString(value ListStatus): - value.value - -define function ToString(value LocationMode): - value.value - -define function ToString(value LocationStatus): - value.value - -define function ToString(value MeasureReportStatus): - value.value - -define function ToString(value MeasureReportType): - value.value - -define function ToString(value MediaStatus): - value.value - -define function ToString(value MedicationAdministrationStatus): - value.value - -define function ToString(value MedicationDispenseStatus): - value.value - -define function ToString(value MedicationKnowledgeStatus): - value.value - -define function ToString(value MedicationRequestIntent): - value.value - -define function ToString(value MedicationRequestPriority): - value.value - -define function ToString(value MedicationRequestStatus): - value.value - -define function ToString(value MedicationStatementStatus): - value.value - -define function ToString(value MedicationStatus): - value.value - -define function ToString(value MessageSignificanceCategory): - value.value - -define function ToString(value Messageheader_Response_Request): - value.value - -define function ToString(value MimeType): - value.value - -define function ToString(value NameUse): - value.value - -define function ToString(value NamingSystemIdentifierType): - value.value - -define function ToString(value NamingSystemType): - value.value - -define function ToString(value NarrativeStatus): - value.value - -define function ToString(value NoteType): - value.value - -define function ToString(value NutritiionOrderIntent): - value.value - -define function ToString(value NutritionOrderStatus): - value.value - -define function ToString(value ObservationDataType): - value.value - -define function ToString(value ObservationRangeCategory): - value.value - -define function ToString(value ObservationStatus): - value.value - -define function ToString(value OperationKind): - value.value - -define function ToString(value OperationParameterUse): - value.value - -define function ToString(value OrientationType): - value.value - -define function ToString(value ParameterUse): - value.value - -define function ToString(value ParticipantRequired): - value.value - -define function ToString(value ParticipantStatus): - value.value - -define function ToString(value ParticipationStatus): - value.value - -define function ToString(value PaymentNoticeStatus): - value.value - -define function ToString(value PaymentReconciliationStatus): - value.value - -define function ToString(value ProcedureStatus): - value.value - -define function ToString(value PropertyRepresentation): - value.value - -define function ToString(value PropertyType): - value.value - -define function ToString(value ProvenanceEntityRole): - value.value - -define function ToString(value PublicationStatus): - value.value - -define function ToString(value QualityType): - value.value - -define function ToString(value QuantityComparator): - value.value - -define function ToString(value QuestionnaireItemOperator): - value.value - -define function ToString(value QuestionnaireItemType): - value.value - -define function ToString(value QuestionnaireResponseStatus): - value.value - -define function ToString(value ReferenceHandlingPolicy): - value.value - -define function ToString(value ReferenceVersionRules): - value.value - -define function ToString(value ReferredDocumentStatus): - value.value - -define function ToString(value RelatedArtifactType): - value.value - -define function ToString(value RemittanceOutcome): - value.value - -define function ToString(value RepositoryType): - value.value - -define function ToString(value RequestIntent): - value.value - -define function ToString(value RequestPriority): - value.value - -define function ToString(value RequestStatus): - value.value - -define function ToString(value ResearchElementType): - value.value - -define function ToString(value ResearchStudyStatus): - value.value - -define function ToString(value ResearchSubjectStatus): - value.value - -define function ToString(value ResourceType): - value.value - -define function ToString(value ResourceVersionPolicy): - value.value - -define function ToString(value ResponseType): - value.value - -define function ToString(value RestfulCapabilityMode): - value.value - -define function ToString(value RiskAssessmentStatus): - value.value - -define function ToString(value SPDXLicense): - value.value - -define function ToString(value SearchComparator): - value.value - -define function ToString(value SearchEntryMode): - value.value - -define function ToString(value SearchModifierCode): - value.value - -define function ToString(value SearchParamType): - value.value - -define function ToString(value SectionMode): - value.value - -define function ToString(value SequenceType): - value.value - -define function ToString(value ServiceRequestIntent): - value.value - -define function ToString(value ServiceRequestPriority): - value.value - -define function ToString(value ServiceRequestStatus): - value.value - -define function ToString(value SlicingRules): - value.value - -define function ToString(value SlotStatus): - value.value - -define function ToString(value SortDirection): - value.value - -define function ToString(value SpecimenContainedPreference): - value.value - -define function ToString(value SpecimenStatus): - value.value - -define function ToString(value Status): - value.value - -define function ToString(value StrandType): - value.value - -define function ToString(value StructureDefinitionKind): - value.value - -define function ToString(value StructureMapContextType): - value.value - -define function ToString(value StructureMapGroupTypeMode): - value.value - -define function ToString(value StructureMapInputMode): - value.value - -define function ToString(value StructureMapModelMode): - value.value - -define function ToString(value StructureMapSourceListMode): - value.value - -define function ToString(value StructureMapTargetListMode): - value.value - -define function ToString(value StructureMapTransform): - value.value - -define function ToString(value SubscriptionChannelType): - value.value - -define function ToString(value SubscriptionStatus): - value.value - -define function ToString(value SupplyDeliveryStatus): - value.value - -define function ToString(value SupplyRequestStatus): - value.value - -define function ToString(value SystemRestfulInteraction): - value.value - -define function ToString(value TaskIntent): - value.value - -define function ToString(value TaskPriority): - value.value - -define function ToString(value TaskStatus): - value.value - -define function ToString(value TestReportActionResult): - value.value - -define function ToString(value TestReportParticipantType): - value.value - -define function ToString(value TestReportResult): - value.value - -define function ToString(value TestReportStatus): - value.value - -define function ToString(value TestScriptRequestMethodCode): - value.value - -define function ToString(value TriggerType): - value.value - -define function ToString(value TypeDerivationRule): - value.value - -define function ToString(value TypeRestfulInteraction): - value.value - -define function ToString(value UDIEntryType): - value.value - -define function ToString(value UnitsOfTime): - value.value - -define function ToString(value Use): - value.value - -define function ToString(value VariableType): - value.value - -define function ToString(value VisionBase): - value.value - -define function ToString(value VisionEyes): - value.value - -define function ToString(value VisionStatus): - value.value - -define function ToString(value XPathUsageType): - value.value - -define function ToString(value base64Binary): - value.value - -define function ToBoolean(value boolean): - value.value - -define function ToDate(value date): - value.value - -define function ToDateTime(value dateTime): - value.value - -define function ToDecimal(value decimal): - value.value - -define function ToDateTime(value instant): - value.value - -define function ToInteger(value integer): - value.value - -define function ToString(value string): - value.value - -define function ToTime(value time): - value.value - -define function ToString(value uri): - value.value - -define function ToString(value xhtml): - value.value \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/QICoreCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/QICoreCommon.cql deleted file mode 100644 index dea30eb64..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/QICoreCommon.cql +++ /dev/null @@ -1,550 +0,0 @@ -/* -@author: Bryn Rhodes -@description: This library defines functions to expose extensions defined -in QICore as functions in CQL, as well as common terminology and functions -used in writing CQL with FHIR and QICore profiles. - -NOTE: The source for this is the QICoreCommon library published as part of QICore 4.1.1 -That library specified these functions as fluent functions, whereas the functions -specified here are non-fluent versions. - -@update: Refactored to use FHIRCommon -*/ -library QICoreCommon version '1.0.000' - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.1.000' called FHIRHelpers -include FHIRCommon version '1.1.000' called FHIRCommon - -codesystem "USCoreConditionCategory": 'http://hl7.org/fhir/us/core/CodeSystem/condition-category' -// NOTE: Introduced in USCore 5 - -codesystem "USCoreObservationCategory": 'http://hl7.org/fhir/us/core/CodeSystem/us-core-observation-category' - -// Condition Category Codes - - -code "problem-list-item": 'problem-list-item' from FHIRCommon."ConditionCategoryCodes" display 'Problem List Item' -code "encounter-diagnosis": 'encounter-diagnosis' from FHIRCommon."ConditionCategoryCodes" display 'Encounter Diagnosis' -code "health-concern": 'health-concern' from "USCoreConditionCategory" display 'Health Concern' - -// Observation Category Codes - -code "social-history": 'social-history' from FHIRCommon."ObservationCategoryCodes" display 'Social History' -code "vital-signs": 'vital-signs' from FHIRCommon."ObservationCategoryCodes" display 'Vital Signs' -code "imaging": 'imaging' from FHIRCommon."ObservationCategoryCodes" display 'Imaging' -code "laboratory": 'laboratory' from FHIRCommon."ObservationCategoryCodes" display 'Laboratory' -code "procedure": 'procedure' from FHIRCommon."ObservationCategoryCodes" display 'Procedure' -code "survey": 'survey' from FHIRCommon."ObservationCategoryCodes" display 'Survey' -code "exam": 'exam' from FHIRCommon."ObservationCategoryCodes" display 'Exam' -code "therapy": 'therapy' from FHIRCommon."ObservationCategoryCodes" display 'Therapy' -code "activity": 'activity' from FHIRCommon."ObservationCategoryCodes" display 'Activity' -// NOTE: Introduced in USCore 5 - -code "clinical-test": 'clinical-test' from "USCoreObservationCategory" display 'Clinical Test' - -context Patient - -/* Candidates for FHIRCommon */ - -/* -@description: returns true if the given condition has the given category -*/ - - - -define function HasCategory(condition Condition, category Code): - exists ( condition.category C - where C ~ category - ) - -/* -@description: returns true if the given condition is a problem list item -*/ - - -define function IsProblemListItem(condition Condition): - exists ( condition.category C - where C ~ "problem-list-item" - ) - -/* -@description: returns true if the given condition is an encounter diagnosis -*/ - - -define function IsEncounterDiagnosis(condition Condition): - exists ( condition.category C - where C ~ "encounter-diagnosis" - ) - -/* -@description: returns true if the given condition is a health concern -*/ - - -define function IsHealthConcern(condition Condition): - exists ( condition.category C - where C ~ "health-concern" - ) - -/* -@description: returns true if the given observation has the given category -*/ - - -define function HasCategory(observation Observation, category Code): - exists ( observation.category C - where C ~ category - ) - -/* -@description: returns true if the given observation is a social history -*/ - - -define function IsSocialHistory(observation Observation): - exists ( observation.category C - where C ~ "social-history" - ) - -/* -@description: returns true if the given observation is a vital-sign -*/ - - -define function IsVitalSign(observation Observation): - exists ( observation.category C - where C ~ "vital-signs" - ) - -/* -@description: returns true if the given observation is an imaging observation -*/ - - -define function IsImaging(observation Observation): - exists ( observation.category C - where C ~ "imaging" - ) - -/* -@description: returns true if the given observation is a laboratory observation -*/ - - -define function IsLaboratory(observation Observation): - exists ( observation.category C - where C ~ "laboratory" - ) - -/* -@description: returns true if the given observation is a procedure observation -*/ - - -define function IsProcedure(observation Observation): - exists ( observation.category C - where C ~ "procedure" - ) - -/* -@description: returns true if the given observation is a survey observation -*/ - - -define function IsSurvey(observation Observation): - exists ( observation.category C - where C ~ "survey" - ) - -/* -@description: returns true if the given observation is an exam observation -*/ - - -define function IsExam(observation Observation): - exists ( observation.category C - where C ~ "exam" - ) - -/* -@description: returns true if the given observation is a therapy observation -*/ - - -define function IsTherapy(observation Observation): - exists ( observation.category C - where C ~ "therapy" - ) - -/* -@description: returns true if the given observation is an activity observation -*/ - - -define function IsActivity(observation Observation): - exists ( observation.category C - where C ~ "activity" - ) - -/* -@description: returns true if the given observation is a clinical test -@comment: Introduced in USCore 5 -*/ - - -define function IsClinicalTest(observation Observation): - exists ( observation.category C - where C ~ "clinical-test" - ) - -/* -@description: Returns true if the given MedicationRequest has a category of Community -*/ - - -define function IsCommunity(medicationRequest MedicationRequest): - exists ( medicationRequest.category C - where C ~ FHIRCommon.Community - ) - -/* -@description: Returns true if the given MedicationRequest has a category of Discharge -*/ - - -define function IsDischarge(medicationRequest MedicationRequest): - exists ( medicationRequest.category C - where C ~ FHIRCommon.Discharge - ) - -/* -@description: Surfaces the [resolutionAge](http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge) -extension defined in FHIR. -@comment: This function returns the value of the extension as an Age. -@extension: http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge -*/ - - -define function ResolutionAge(allergyIntolerance AllergyIntolerance): - FHIRCommon.Extension ( allergyIntolerance, 'http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge' ).value as Age - -/* -@description: Surfaces the [reasonRefuted](http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted) -extension defined in FHIR. -@comment: This function returns the value of the extension as a CodeableConcept. -@extension: http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted -*/ - - -define function ReasonRefuted(allergyIntolerance AllergyIntolerance): - FHIRCommon.Extension ( allergyIntolerance, 'http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted' ).value as CodeableConcept - -/* -@description: Surfaces the [duration](http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration) -extension defined in FHIR. -@comment: This function returns the value of the extension as a Duration. -@extension: http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration -*/ - - -define function Duration(allergyIntolerance BackboneElement): - FHIRCommon.Extension ( allergyIntolerance, 'http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration' ).value as Duration - -/* -@description: Surfaces the [dueTo](http://hl7.org/fhir/StructureDefinition/condition-dueTo) -extension defined in FHIR. -@comment: This function returns the value of the extension as a choice of CodeableConcept or Reference. -@extension: http://hl7.org/fhir/StructureDefinition/condition-dueTo -*/ - - -define function DueTo(condition Condition): - FHIRCommon.Extension ( condition, 'http://hl7.org/fhir/StructureDefinition/condition-dueTo' ).value as Choice - -/* -@description: Surfaces the [occurredFollowing](http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing) -extension defined in FHIR. -@comment: This function returns the value of the extension as a choice of CodeableConcept or Reference -@extension: http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing -*/ - - -define function OccurredFollowing(condition Condition): - FHIRCommon.Extension ( condition, 'http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing' ).value as Choice - -/* -@description: Surfaces the [doNotPerform](http://hl7.org/fhir/5.0/StructureDefinition/extension-DeviceRequest.doNotPerform) -modifier extension defined in FHIR. -@comment: This function returns the value of the modifier extension as a boolean -@extension: http://hl7.org/fhir/StructureDefinition/request-doNotPerform -*/ - - -define function DoNotPerform(requestResource DomainResource): - FHIRCommon.ModifierExtension ( requestResource, 'http://hl7.org/fhir/5.0/StructureDefinition/extension-DeviceRequest.doNotPerform' ).value as boolean - -/* -@description: Surfaces the [statusReason](http://hl7.org/fhir/StructureDefinition/request-statusReason) -extension defined in FHIR. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/StructureDefinition/request-statusReason -*/ - - -define function StatusReason(requestResource DomainResource): - FHIRCommon.Extension ( requestResource, 'http://hl7.org/fhir/StructureDefinition/request-statusReason' ).value as CodeableConcept - -/* -@description: Surfaces the [locationPerformed](http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed) -extension defined in FHIR. -@comment: This function returns the value of the extension as a Reference -@extension: http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed -*/ - - -define function LocationPerformed(diagnosticReport DiagnosticReport): - FHIRCommon.Extension ( diagnosticReport, 'http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed' ).value as Reference - -/* -@description: Surfaces the [abatement](http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement) -extension defined in FHIR. -@comment: This function returns the value of the extension as a choice of date, Age, or boolean -@extension: http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement -*/ - - -define function Abatement(familyMemberHistory FamilyMemberHistory): - FHIRCommon.Extension ( familyMemberHistory, 'http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement' ).value as Choice - -/* -@description: Surfaces the [severity](http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity) -extension defined in FHIR. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity -*/ - - -define function Severity(familyMemberHistory FamilyMemberHistory): - FHIRCommon.Extension ( familyMemberHistory, 'http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity' ).value as CodeableConcept - -/* -@description: Surfaces the [reasonRejected](http://hl7.org/fhir/StructureDefinition/goal-reasonRejected) -extension defined in FHIR. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/StructureDefinition/goal-reasonRejected -*/ - - -define function ReasonRejected(goal Goal): - FHIRCommon.Extension ( goal, 'http://hl7.org/fhir/StructureDefinition/goal-reasonRejected' ).value as CodeableConcept - -/* -@description: Surfaces the [bodyPosition](http://hl7.org/fhir/StructureDefinition/observation-bodyPosition) -extension defined in FHIR. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/StructureDefinition/observation-bodyPosition -*/ - - -define function BodyPosition(observation Observation): - FHIRCommon.Extension ( observation, 'http://hl7.org/fhir/StructureDefinition/observation-bodyPosition' ).value as CodeableConcept - -/* -@description: Surfaces the [delta](http://hl7.org/fhir/StructureDefinition/observation-delta) -extension defined in FHIR. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/StructureDefinition/observation-delta -*/ - - -define function Delta(observation Observation): - FHIRCommon.Extension ( observation, 'http://hl7.org/fhir/StructureDefinition/observation-delta' ).value as CodeableConcept - -/* -@description: Surfaces the [preferred](http://hl7.org/fhir/StructureDefinition/iso21090-preferred) extension defined in USCore. -@comment: This function returns the value of the direct extension as a boolean -@extension: http://hl7.org/fhir/StructureDefinition/iso21090-preferred -*/ - - -define function Preferred(contactPoint ContactPoint): - FHIRCommon.Extension ( contactPoint, 'http://hl7.org/fhir/StructureDefinition/iso21090-preferred' ).value as boolean - -/* -@description: Surfaces the [approachBodyStructure](http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure) -extension defined in FHIR. -@comment: This function returns the value of the extension as a Reference -@extension: http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure -*/ - - -define function ApproachBodyStructure(procedure Procedure): - FHIRCommon.Extension ( procedure, 'http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure' ).value as Reference - -/* -@description: Surfaces the [incisionDateTime](http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime) -extension defined in FHIR. -@comment: This function returns the value of the extension as a dateTime -@extension: http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime -*/ - - -define function IncisionDateTime(procedure Procedure): - FHIRCommon.Extension ( procedure, 'http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime' ).value as dateTime - -/* USCore Extensions */ -/* -@description: Surfaces the [ethnicity](http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity) -extension defined in USCore. -@comment: This function returns a tuple with elements for each subextension (ombCategory, detailed, and text). -@extension: http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity -*/ - - - -define function Ethnicity(patient Patient): - patient P - let ethnicityEx: FHIRCommon.Extension ( P, 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity' ) - return { - ombCategory: FHIRCommon.Extension ( ethnicityEx, 'ombCategory' ).value as Coding, - detailed: ( FHIRCommon.Extensions ( ethnicityEx, 'detailed' ) ) E - return E.value as Coding, - text: FHIRCommon.Extension ( ethnicityEx, 'text' ).value as string - } - -/* -@description: Surfaces the [race](http://hl7.org/fhir/us/core/StructureDefinition/us-core-race) extension defined in USCore. -@comment: This function returns a tuple with elements for each subextension (ombCategory, detailed, and text). -@extension: http://hl7.org/fhir/us/core/StructureDefinition/us-core-race -*/ - - -define function Race(patient Patient): - patient P - let raceEx: FHIRCommon.Extension ( P, 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race' ) - return { - ombCategory: ( FHIRCommon.Extensions ( raceEx, 'ombCategory' ) ) E - return E.value as Coding, - detailed: ( FHIRCommon.Extensions ( raceEx, 'detailed' ) ) E - return E.value as Coding, - text: FHIRCommon.Extension ( raceEx, 'text' ).value as string - } - -/* -@description: Surfaces the [birthsex](http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex) extension defined in USCore. -@comment: This function returns the value of the birthsex extension as a code -@extension: http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex -*/ - - -define function Birthsex(patient Patient): - FHIRCommon.Extension ( patient, 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex' ).value as code - -/* -@description: Surfaces the [direct](http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct) extension defined in USCore. -@comment: This function returns the value of the direct extension as a boolean -@extension: http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct -*/ - - -define function Direct(contactPoint ContactPoint): - FHIRCommon.Extension ( contactPoint, 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct' ).value as boolean - -/* QICore Extensions */ - -/* -@description: Surfaces the [isElective](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-isElective) -modifier extension defined in QICore. -@comment: This function returns the value of the isElective modifier extension as a boolean. -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-isElective -*/ - - - -define function IsElective(serviceRequest ServiceRequest): - FHIRCommon.ModifierExtension ( serviceRequest, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-isElective' ).value as boolean - -/* -@description: Surfaces the [procedure](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-procedure) -extension defined in QICore. -@comment: This function returns a tuple with elements for each subextension (type, rank, and procedure). -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-procedure -*/ - - -define function Procedure(encounter Encounter): - ( FHIRCommon.Extensions ( encounter, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-procedure' ) ) E - return { - type: FHIRCommon.Extension ( E, 'type' ).value as CodeableConcept, - rank: FHIRCommon.Extension ( E, 'rank' ).value as positiveInt, - procedure: FHIRCommon.Extension ( E, 'procedure' ).value as Reference - } - -/* -@description: Surfaces the [doNotPerform](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-doNotPerformReason) -extension defined in QICore. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-doNotPerformReason -*/ - - -define function DoNotPerformReason(requestResource DomainResource): - FHIRCommon.Extension ( requestResource, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-doNotPerformReason' ).value as CodeableConcept - -/* -@description: Surfaces the [recorded](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-recorded) -extension defined in QICore. -@comment: This function returns the value of the extension as a dateTime -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-recorded -*/ - - -define function Recorded(domainResource DomainResource): - FHIRCommon.Extension ( domainResource, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-recorded' ).value as dateTime - -/* -@description: Surfaces the [notDone](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDone) -modifier extension defined in QICore. -@comment: This function returns the value of the modifier extension as a boolean -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDone -*/ - - -define function NotDone(eventResource DomainResource): - FHIRCommon.ModifierExtension ( eventResource, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDone' ).value as boolean - -/* -@description: Surfaces the [notDoneReason](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneReason) -extension defined in QICore. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneReason -*/ - - -define function NotDoneReason(eventResource DomainResource): - FHIRCommon.Extension ( eventResource, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneReason' ).value as CodeableConcept - -/* -@description: Surfaces the [notDoneValueSet](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneValueSet) -extension defined in QICore. -@comment: This function returns the value of the extension as a canonical -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneValueSet -*/ - - -define function NotDoneValueSet(concept CodeableConcept): - FHIRCommon.Extension ( concept, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneValueSet' ).value as canonical - -/* -@description: Surfaces the [presentOnAdmission](http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-diagnosisPresentOnAdmission) -extension defined in QICore. -@comment: This function returns the value of the extension as a CodeableConcept -@extension: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-diagnosisPresentOnAdmission -*/ - - -define function PresentOnAdmission(element Element): - FHIRCommon.Extension ( element, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter-diagnosisPresentOnAdmission' ).value as CodeableConcept \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/SDHCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/SDHCommon.cql deleted file mode 100644 index 531511e78..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/cql/SDHCommon.cql +++ /dev/null @@ -1,55 +0,0 @@ -library SDHCommon - -using FHIR version '4.0.1' - -include FHIRHelpers version '4.1.000' -include FHIRCommon version '1.1.000' called FC - -context Patient - -define function Official(identifiers List): - singleton from ( identifiers I - where I.use = 'official' - ) - -define function Official(names List): - singleton from ( names N - where N.use = 'official' - ) - -define function Only(observations List): - singleton from observations - -define function Earliest(observations List): - First(observations O - sort by issued - ) - -define function Latest(observations List): - Last(observations O - sort by issued - ) - -define function MostRecent(observations List): - Last(observations O - sort by issued - ) - -define function MostRecent(conditions List): - Last(conditions O - sort by recordedDate - ) - -define function Lowest(observations List): - First(observations O - sort by(value as FHIR.Quantity) - ) - -define function Highest(observations List): - Last(observations O - sort by(value as FHIR.Quantity) - ) - -define function Has(value List): - if exists value then true - else null \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-ASLPConcepts.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-ASLPConcepts.json deleted file mode 100644 index ee37668a8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-ASLPConcepts.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "resourceType": "Library", - "id": "ASLPConcepts", - "extension": [ - { - "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", - "valueReference": { - "reference": "Device/cqf-tooling" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Library/ASLPConcepts", - "version": "1.0.000", - "name": "ASLPConcepts", - "relatedArtifact": [ - { - "type": "depends-on", - "display": "Code system ICD-10", - "resource": "http://hl7.org/fhir/sid/icd-10" - }, - { - "type": "depends-on", - "display": "Code system SNOMED-CT", - "resource": "http://snomed.info/sct" - }, - { - "type": "depends-on", - "display": "Code system LOINC", - "resource": "http://loinc.org" - }, - { - "type": "depends-on", - "display": "Code system RxNorm", - "resource": "http://www.nlm.nih.gov/research/umls/rxnorm" - }, - { - "type": "depends-on", - "display": "Code system CPT", - "resource": "http://www.ama-assn.org/go/cpt" - }, - { - "type": "depends-on", - "display": "Code system HCPCS", - "resource": "https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets" - }, - { - "type": "depends-on", - "display": "Code system CIEL", - "resource": "http://hl7.org/fhir/sid/ciel" - }, - { - "type": "depends-on", - "display": "Code system ICD-11", - "resource": "http://hl7.org/fhir/sid/icd-11" - }, - { - "type": "depends-on", - "display": "Code system ICHI", - "resource": "https://mitel.dimi.uniud.it/ichi/#http://id.who.int/ichi" - }, - { - "type": "depends-on", - "display": "Code system ICF", - "resource": "http://hl7.org/fhir/sid/icf-nl" - }, - { - "type": "depends-on", - "display": "Code system NDC", - "resource": "http://hl7.org/fhir/sid/ndc" - }, - { - "type": "depends-on", - "display": "Code system NIDA", - "resource": "https://cde.drugabuse.gov" - }, - { - "type": "depends-on", - "display": "Code system ASLP Codes", - "resource": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes" - }, - { - "type": "depends-on", - "display": "Value set Home Based Testing Sleep Studies Codes", - "resource": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de2" - }, - { - "type": "depends-on", - "display": "Value set Facility Based Testing Sleep Studies Codes", - "resource": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de9" - }, - { - "type": "depends-on", - "display": "Value set Sleep Study Codes Grouper", - "resource": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper" - }, - { - "type": "depends-on", - "display": "Value set Diagnosis of Obstructive Sleep Apnea Codes", - "resource": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/ASLPConcepts.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-Common.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-Common.json deleted file mode 100644 index 86baa29f0..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-Common.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "resourceType": "Library", - "id": "Common", - "extension": [ - { - "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", - "valueReference": { - "reference": "Device/cqf-tooling" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Library/Common", - "version": "0.0.001", - "name": "Common", - "relatedArtifact": [ - { - "type": "depends-on", - "display": "FHIR model information", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" - }, - { - "type": "depends-on", - "display": "Library FHIRHelpers", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRHelpers|4.1.000" - }, - { - "type": "depends-on", - "display": "Code system ObservationStatusCodes", - "resource": "http://hl7.org/fhir/observation-status" - } - ], - "parameter": [ - { - "name": "Asserted Lookback Duration", - "use": "in", - "min": 0, - "max": "1", - "type": "Quantity" - }, - { - "name": "Patient", - "use": "out", - "min": 0, - "max": "1", - "type": "Patient" - } - ], - "dataRequirement": [ - { - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Patient" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ObservationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "urn:hl7-org:elm-types:r1/Code" - ], - "mustSupport": [ - "code" - ] - }, - { - "type": "string", - "profile": [ - "http://hl7.org/fhir/string" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/Patient" - ], - "mustSupport": [ - "id" - ] - }, - { - "type": "Quantity", - "profile": [ - "urn:hl7-org:elm-types:r1/Quantity" - ], - "mustSupport": [ - "value", - "unit" - ] - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/Common.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-FHIRCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-FHIRCommon.json deleted file mode 100644 index d243b1df1..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-FHIRCommon.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRCommon", - "extension": [ - { - "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", - "valueReference": { - "reference": "Device/cqf-tooling" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Library/FHIRCommon", - "version": "1.1.000", - "name": "FHIRCommon", - "relatedArtifact": [ - { - "type": "depends-on", - "display": "FHIR model information", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" - }, - { - "type": "depends-on", - "display": "Library FHIRHelpers", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRHelpers|4.1.000" - }, - { - "type": "depends-on", - "display": "Code system LOINC", - "resource": "http://loinc.org" - }, - { - "type": "depends-on", - "display": "Code system SNOMEDCT", - "resource": "http://snomed.info/sct" - }, - { - "type": "depends-on", - "display": "Code system ICD10CM", - "resource": "http://hl7.org/fhir/sid/icd-10-cm" - }, - { - "type": "depends-on", - "display": "Code system RoleCode", - "resource": "http://terminology.hl7.org/CodeSystem/v3-RoleCode" - }, - { - "type": "depends-on", - "display": "Code system Diagnosis Role", - "resource": "http://terminology.hl7.org/CodeSystem/diagnosis-role" - }, - { - "type": "depends-on", - "display": "Code system RequestIntent", - "resource": "http://terminology.hl7.org/CodeSystem/request-intent" - }, - { - "type": "depends-on", - "display": "Code system MedicationRequestCategory", - "resource": "http://terminology.hl7.org/CodeSystem/medicationrequest-category" - }, - { - "type": "depends-on", - "display": "Code system ConditionClinicalStatusCodes", - "resource": "http://terminology.hl7.org/CodeSystem/condition-clinical" - }, - { - "type": "depends-on", - "display": "Code system ConditionVerificationStatusCodes", - "resource": "http://terminology.hl7.org/CodeSystem/condition-ver-status" - }, - { - "type": "depends-on", - "display": "Code system AllergyIntoleranceClinicalStatusCodes", - "resource": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" - }, - { - "type": "depends-on", - "display": "Code system AllergyIntoleranceVerificationStatusCodes", - "resource": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification" - }, - { - "type": "depends-on", - "display": "Code system ConditionCategoryCodes", - "resource": "http://terminology.hl7.org/CodeSystem/condition-category" - }, - { - "type": "depends-on", - "display": "Code system ObservationCategoryCodes", - "resource": "http://terminology.hl7.org/CodeSystem/observation-category" - }, - { - "type": "depends-on", - "display": "Value set Active Condition", - "resource": "http://fhir.org/guides/cqf/common/ValueSet/active-condition" - }, - { - "type": "depends-on", - "display": "Value set Inactive Condition", - "resource": "http://fhir.org/guides/cqf/common/ValueSet/inactive-condition" - } - ], - "parameter": [ - { - "name": "Patient", - "use": "out", - "min": 0, - "max": "1", - "type": "Patient" - } - ], - "dataRequirement": [ - { - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Patient" - ] - }, - { - "type": "dateTime", - "profile": [ - "http://hl7.org/fhir/dateTime" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "instant", - "profile": [ - "http://hl7.org/fhir/instant" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "date", - "profile": [ - "http://hl7.org/fhir/date" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "Quantity", - "profile": [ - "http://hl7.org/fhir/Quantity" - ], - "mustSupport": [ - "value", - "comparator", - "system", - "system.value", - "value.value", - "code", - "code.value", - "unit", - "unit.value" - ] - }, - { - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/Patient" - ], - "mustSupport": [ - "birthDate" - ] - }, - { - "type": "Range", - "profile": [ - "http://hl7.org/fhir/Range" - ], - "mustSupport": [ - "low", - "high" - ] - }, - { - "type": "uri", - "profile": [ - "http://hl7.org/fhir/uri" - ], - "mustSupport": [ - "value" - ] - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRCommon.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-FHIRHelpers.json deleted file mode 100644 index ddae46de4..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-FHIRHelpers.json +++ /dev/null @@ -1,2204 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRHelpers", - "extension": [ - { - "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", - "valueReference": { - "reference": "Device/cqf-tooling" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Library/FHIRHelpers", - "version": "4.1.000", - "name": "FHIRHelpers", - "relatedArtifact": [ - { - "type": "depends-on", - "display": "FHIR model information", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" - } - ], - "dataRequirement": [ - { - "type": "Quantity", - "profile": [ - "http://hl7.org/fhir/Quantity" - ], - "mustSupport": [ - "value", - "comparator", - "system", - "system.value", - "value.value", - "code", - "code.value", - "unit", - "unit.value" - ] - }, - { - "type": "base64Binary", - "profile": [ - "http://hl7.org/fhir/base64Binary" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "boolean", - "profile": [ - "http://hl7.org/fhir/boolean" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "canonical", - "profile": [ - "http://hl7.org/fhir/canonical" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "code", - "profile": [ - "http://hl7.org/fhir/code" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "date", - "profile": [ - "http://hl7.org/fhir/date" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "dateTime", - "profile": [ - "http://hl7.org/fhir/dateTime" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "decimal", - "profile": [ - "http://hl7.org/fhir/decimal" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "id", - "profile": [ - "http://hl7.org/fhir/id" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "instant", - "profile": [ - "http://hl7.org/fhir/instant" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "integer", - "profile": [ - "http://hl7.org/fhir/integer" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "markdown", - "profile": [ - "http://hl7.org/fhir/markdown" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "oid", - "profile": [ - "http://hl7.org/fhir/oid" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "positiveInt", - "profile": [ - "http://hl7.org/fhir/positiveInt" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "string", - "profile": [ - "http://hl7.org/fhir/string" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "time", - "profile": [ - "http://hl7.org/fhir/time" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "unsignedInt", - "profile": [ - "http://hl7.org/fhir/unsignedInt" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "uri", - "profile": [ - "http://hl7.org/fhir/uri" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "url", - "profile": [ - "http://hl7.org/fhir/url" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "uuid", - "profile": [ - "http://hl7.org/fhir/uuid" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AccountStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionCardinalityBehavior" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionConditionKind" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionGroupingBehavior" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionParticipantType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionPrecheckBehavior" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionRelationshipType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionRequiredBehavior" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActionSelectionBehavior" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActivityDefinitionKind" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ActivityParticipantType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AddressType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AddressUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AdministrativeGender" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AdverseEventActuality" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AggregationMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AllergyIntoleranceCategory" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AllergyIntoleranceCriticality" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AllergyIntoleranceSeverity" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AllergyIntoleranceType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AppointmentStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AssertionDirectionType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AssertionOperatorType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AssertionResponseTypes" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AuditEventAction" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AuditEventAgentNetworkType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/AuditEventOutcome" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/BindingStrength" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/BiologicallyDerivedProductCategory" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/BiologicallyDerivedProductStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/BiologicallyDerivedProductStorageScale" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/BundleType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CapabilityStatementKind" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CarePlanActivityKind" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CarePlanActivityStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CarePlanIntent" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CarePlanStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CareTeamStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CatalogEntryRelationType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ChargeItemDefinitionPriceComponentType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ChargeItemStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ClaimResponseStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ClaimStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ClinicalImpressionStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CodeSearchSupport" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CodeSystemContentMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CodeSystemHierarchyMeaning" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CommunicationPriority" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CommunicationRequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CommunicationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CompartmentCode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CompartmentType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CompositionAttestationMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CompositionStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConceptMapEquivalence" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConceptMapGroupUnmappedMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConditionalDeleteStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConditionalReadStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConsentDataMeaning" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConsentProvisionType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConsentState" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ConstraintSeverity" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ContactPointSystem" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ContactPointUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ContractPublicationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ContractStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ContributorType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CoverageStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/CurrencyCode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DayOfWeek" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DaysOfWeek" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DetectedIssueSeverity" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DetectedIssueStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceMetricCalibrationState" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceMetricCalibrationType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceMetricCategory" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceMetricColor" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceMetricOperationalStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceNameType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceRequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DeviceUseStatementStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DiagnosticReportStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DiscriminatorType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DocumentConfidentiality" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DocumentMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DocumentReferenceStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/DocumentRelationshipType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EligibilityRequestPurpose" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EligibilityRequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EligibilityResponsePurpose" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EligibilityResponseStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EnableWhenBehavior" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EncounterLocationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EncounterStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EndpointStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EnrollmentRequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EnrollmentResponseStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EpisodeOfCareStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EventCapabilityMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EventTiming" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/EvidenceVariableType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ExampleScenarioActorType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ExplanationOfBenefitStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ExposureState" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ExtensionContextType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FHIRAllTypes" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FHIRDefinedType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FHIRDeviceStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FHIRResourceType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FHIRSubstanceStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FHIRVersion" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FamilyHistoryStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FilterOperator" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/FlagStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GoalLifecycleStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GraphCompartmentRule" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GraphCompartmentUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GroupMeasure" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GroupType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GuidanceResponseStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GuidePageGeneration" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/GuideParameterCode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/HTTPVerb" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/IdentifierUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/IdentityAssuranceLevel" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ImagingStudyStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ImmunizationEvaluationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ImmunizationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/InvoicePriceComponentType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/InvoiceStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/IssueSeverity" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/IssueType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/LinkType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/LinkageType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ListMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ListStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/LocationMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/LocationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MeasureReportStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MeasureReportType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MediaStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationAdministrationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationDispenseStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationKnowledgeStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationRequestIntent" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationRequestPriority" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationRequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationStatementStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MedicationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MessageSignificanceCategory" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/Messageheader_Response_Request" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/MimeType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NameUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NamingSystemIdentifierType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NamingSystemType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NarrativeStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NoteType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NutritiionOrderIntent" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NutritionOrderStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ObservationDataType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ObservationRangeCategory" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ObservationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/OperationKind" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/OperationParameterUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/OrientationType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ParameterUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ParticipantRequired" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ParticipantStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ParticipationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/PaymentNoticeStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/PaymentReconciliationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ProcedureStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/PropertyRepresentation" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/PropertyType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ProvenanceEntityRole" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/PublicationStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/QualityType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/QuantityComparator" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/QuestionnaireItemOperator" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/QuestionnaireItemType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/QuestionnaireResponseStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ReferenceHandlingPolicy" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ReferenceVersionRules" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ReferredDocumentStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RelatedArtifactType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RemittanceOutcome" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RepositoryType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RequestIntent" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RequestPriority" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ResearchElementType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ResearchStudyStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ResearchSubjectStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ResourceType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ResourceVersionPolicy" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ResponseType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RestfulCapabilityMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/RiskAssessmentStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SPDXLicense" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SearchComparator" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SearchEntryMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SearchModifierCode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SearchParamType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SectionMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SequenceType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ServiceRequestIntent" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ServiceRequestPriority" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/ServiceRequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SlicingRules" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SlotStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SortDirection" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SpecimenContainedPreference" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SpecimenStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/Status" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StrandType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureDefinitionKind" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureMapContextType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureMapGroupTypeMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureMapInputMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureMapModelMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureMapSourceListMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureMapTargetListMode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/StructureMapTransform" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SubscriptionChannelType" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "SubscriptionStatus", - "profile": [ - "http://hl7.org/fhir/SubscriptionStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SupplyDeliveryStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SupplyRequestStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/SystemRestfulInteraction" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TaskIntent" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TaskPriority" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TaskStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TestReportActionResult" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TestReportParticipantType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TestReportResult" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TestReportStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TestScriptRequestMethodCode" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TriggerType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TypeDerivationRule" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/TypeRestfulInteraction" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/UDIEntryType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/UnitsOfTime" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/Use" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/VariableType" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/VisionBase" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/VisionEyes" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/VisionStatus" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/XPathUsageType" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "xhtml", - "profile": [ - "http://hl7.org/fhir/xhtml" - ], - "mustSupport": [ - "value" - ] - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRHelpers.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-QICoreCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-QICoreCommon.json deleted file mode 100644 index 33091638f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-QICoreCommon.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "resourceType": "Library", - "id": "QICoreCommon", - "extension": [ - { - "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", - "valueReference": { - "reference": "Device/cqf-tooling" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Library/QICoreCommon", - "version": "1.0.000", - "name": "QICoreCommon", - "relatedArtifact": [ - { - "type": "depends-on", - "display": "FHIR model information", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" - }, - { - "type": "depends-on", - "display": "Library FHIRHelpers", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRHelpers|4.1.000" - }, - { - "type": "depends-on", - "display": "Library FHIRCommon", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRCommon|1.1.000" - }, - { - "type": "depends-on", - "display": "Code system USCoreConditionCategory", - "resource": "http://hl7.org/fhir/us/core/CodeSystem/condition-category" - }, - { - "type": "depends-on", - "display": "Code system USCoreObservationCategory", - "resource": "http://hl7.org/fhir/us/core/CodeSystem/us-core-observation-category" - }, - { - "type": "depends-on", - "display": "Code system ConditionCategoryCodes", - "resource": "http://terminology.hl7.org/CodeSystem/condition-category" - }, - { - "type": "depends-on", - "display": "Code system ObservationCategoryCodes", - "resource": "http://terminology.hl7.org/CodeSystem/observation-category" - }, - { - "type": "depends-on", - "display": "Code system MedicationRequestCategory", - "resource": "http://terminology.hl7.org/CodeSystem/medicationrequest-category" - } - ], - "parameter": [ - { - "name": "Patient", - "use": "out", - "min": 0, - "max": "1", - "type": "Patient" - } - ], - "dataRequirement": [ - { - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Patient" - ] - }, - { - "type": "uri", - "profile": [ - "http://hl7.org/fhir/uri" - ], - "mustSupport": [ - "value" - ] - }, - { - "type": "Extension", - "profile": [ - "http://hl7.org/fhir/Extension" - ], - "mustSupport": [ - "value" - ] - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/QICoreCommon.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-SDHCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-SDHCommon.json deleted file mode 100644 index 40706a9ca..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-SDHCommon.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "resourceType": "Library", - "id": "SDHCommon", - "extension": [ - { - "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", - "valueReference": { - "reference": "Device/cqf-tooling" - } - } - ], - "url": "http://example.org/sdh/dtr/aslp/Library/SDHCommon", - "name": "SDHCommon", - "relatedArtifact": [ - { - "type": "depends-on", - "display": "FHIR model information", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" - }, - { - "type": "depends-on", - "display": "Library FHIRHelpers", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRHelpers|4.1.000" - }, - { - "type": "depends-on", - "display": "Library FC", - "resource": "http://example.org/sdh/dtr/aslp/Library/FHIRCommon|1.1.000" - } - ], - "parameter": [ - { - "name": "Patient", - "use": "out", - "min": 0, - "max": "1", - "type": "Patient" - } - ], - "dataRequirement": [ - { - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/Patient" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/IdentifierUse" - ], - "mustSupport": [ - "value" - ] - }, - { - "profile": [ - "http://hl7.org/fhir/NameUse" - ], - "mustSupport": [ - "value" - ] - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/SDHCommon.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/PlanDefinition-ASLPA1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/PlanDefinition-ASLPA1.json deleted file mode 100644 index cf71f4ddc..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/PlanDefinition-ASLPA1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "ASLPA1", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-questionnaire-generate", - "valueBoolean": true - } - ], - "url": "http://example.org/sdh/dtr/aslp/PlanDefinition/ASLPA1", - "identifier": [ - { - "use": "official", - "value": "generate-questionnaire-sample" - } - ], - "version": "1.0.0", - "name": "ASLPA1", - "title": "ASLP.A1 Adult Sleep Studies", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "eca-rule", - "display": "ECA Rule" - } - ] - }, - "status": "draft", - "experimental": true, - "date": "2023-10-26T00:00:00-08:00", - "description": "This PlanDefinition defines a simple recommendation with inputs to generate a Questionnaire for the Adult Sleep Studies Prior Authorization Form.", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "jurisdiction": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/iso3166-1-3", - "version": "4.0.1", - "code": "USA", - "display": "United States of America" - } - ] - } - ], - "purpose": "The purpose of this is to test the system to make sure we have complete end-to-end functionality", - "usage": "This is to be used in conjunction with a patient-facing FHIR application.", - "relatedArtifact": [ - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-bmi" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-diagnosis-of-obstructive-sleep-apnea" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-diabetes" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-hypertension" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-neck-circumference" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-servicerequest" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order" - }, - { - "type": "depends-on", - "resource": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-weight" - } - ], - "library": [ - "http://example.org/sdh/dtr/aslp/Library/ASLPDataElements" - ], - "action": [ - { - "extension": [], - "title": "Prior Auth Route One", - "description": "", - "condition": [ - { - "kind": "applicability", - "expression": { - "language": "text/cql.identifier", - "expression": "Is Authorized" - } - } - ], - "input": [ - { - "type": "ServiceRequest", - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-bmi.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-bmi.json deleted file mode 100644 index 1cfabc07d..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-bmi.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-bmi", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-bmi", - "name": "ASLPBMI", - "title": "ASLP BMI", - "status": "draft", - "experimental": false, - "description": "ASLP BMI", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "Observation", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "Observation", - "path": "Observation", - "mustSupport": false - }, - { - "id": "Observation.code", - "path": "Observation.code", - "short": "BMI", - "definition": "Body mass index (BMI)", - "min": 1, - "max": "1", - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE22" - } - ] - }, - { - "id": "Observation.value[x]", - "path": "Observation.value[x]", - "short": "BMI", - "definition": "Body mass index (BMI)", - "min": 1, - "max": "1", - "type": [ - { - "code": "Quantity" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE22" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json deleted file mode 100644 index 3b3762f3c..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-diagnosis-of-obstructive-sleep-apnea", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-diagnosis-of-obstructive-sleep-apnea", - "name": "ASLPDiagnosisofObstructiveSleepApnea", - "title": "ASLP Diagnosis of Obstructive Sleep Apnea", - "status": "draft", - "experimental": false, - "description": "ASLP Diagnosis of Obstructive Sleep Apnea", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "Condition", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "Condition", - "path": "Condition", - "mustSupport": false - }, - { - "id": "Condition.code", - "path": "Condition.code", - "short": "Diagnosis of Obstructive Sleep Apnea", - "definition": "Diagnosis of Obstructive Sleep Apnea", - "min": 1, - "max": "1", - "mustSupport": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Diagnosis of Obstructive Sleep Apnea Codes" - } - ], - "strength": "required", - "valueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17" - }, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE16" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-height.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-height.json deleted file mode 100644 index f0a8e47ee..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-height.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-height", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height", - "name": "ASLPHeight", - "title": "ASLP Height", - "status": "draft", - "experimental": false, - "description": "ASLP Height", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "Observation", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "Observation", - "path": "Observation", - "mustSupport": false - }, - { - "id": "Observation.code", - "path": "Observation.code", - "short": "Height", - "definition": "Height (in inches)", - "min": 1, - "max": "1", - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE20" - } - ] - }, - { - "id": "Observation.value[x]", - "path": "Observation.value[x]", - "short": "Height", - "definition": "Height (in inches)", - "min": 1, - "max": "1", - "type": [ - { - "code": "Quantity" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE20" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json deleted file mode 100644 index 12aae142d..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-history-of-diabetes", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-diabetes", - "name": "ASLPHistoryofDiabetes", - "title": "ASLP History of Diabetes", - "status": "draft", - "experimental": false, - "description": "ASLP History of Diabetes", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "Observation", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "Observation", - "path": "Observation", - "mustSupport": false - }, - { - "id": "Observation.code", - "path": "Observation.code", - "short": "History of Diabetes", - "definition": "History of Diabetes", - "min": 1, - "max": "1", - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE19" - } - ] - }, - { - "id": "Observation.value[x]", - "path": "Observation.value[x]", - "short": "History of Diabetes", - "definition": "History of Diabetes", - "min": 1, - "max": "1", - "type": [ - { - "code": "boolean" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE19" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json deleted file mode 100644 index 59c5c1086..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-history-of-hypertension", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-history-of-hypertension", - "name": "ASLPHistoryofHypertension", - "title": "ASLP History of Hypertension", - "status": "draft", - "experimental": false, - "description": "ASLP History of Hypertension", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "Observation", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "Observation", - "path": "Observation", - "mustSupport": false - }, - { - "id": "Observation.code", - "path": "Observation.code", - "short": "History of Hypertension", - "definition": "History of Hypertension", - "min": 1, - "max": "1", - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE18" - } - ] - }, - { - "id": "Observation.value[x]", - "path": "Observation.value[x]", - "short": "History of Hypertension", - "definition": "History of Hypertension", - "min": 1, - "max": "1", - "type": [ - { - "code": "boolean" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE18" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json deleted file mode 100644 index a499b1afe..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-neck-circumference", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-neck-circumference", - "name": "ASLPNeckCircumference", - "title": "ASLP Neck Circumference", - "status": "draft", - "experimental": false, - "description": "ASLP Neck Circumference", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "Observation", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "Observation", - "path": "Observation", - "mustSupport": false - }, - { - "id": "Observation.code", - "path": "Observation.code", - "short": "Neck Circumference", - "definition": "Neck circumference (in inches)", - "min": 1, - "max": "1", - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE20" - } - ] - }, - { - "id": "Observation.value[x]", - "path": "Observation.value[x]", - "short": "Neck Circumference", - "definition": "Neck circumference (in inches)", - "min": 1, - "max": "1", - "type": [ - { - "code": "Quantity" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE20" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json deleted file mode 100644 index b5eb5ff5c..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-servicerequest", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-servicerequest", - "name": "ASLPServiceRequest", - "title": "ASLP ServiceRequest", - "status": "draft", - "experimental": false, - "description": "ASLP ServiceRequest", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "ServiceRequest", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "ServiceRequest", - "path": "ServiceRequest", - "mustSupport": false - }, - { - "id": "ServiceRequest.code", - "path": "ServiceRequest.code", - "short": "Procedure Code", - "definition": "The procedures being approved", - "comment": "The procedures for which approval is being requested", - "min": 1, - "max": "1", - "mustSupport": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Procedure Code Codes Grouper" - } - ], - "strength": "required", - "valueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper" - }, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE1" - } - ] - }, - { - "id": "ServiceRequest.occurrence[x]", - "path": "ServiceRequest.occurrence[x]", - "short": "Procedure Date", - "definition": "Date of the procedure", - "min": 1, - "max": "1", - "type": [ - { - "code": "dateTime" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ALSP.A1.DE15" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json deleted file mode 100644 index 7d78272ee..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-sleep-study-order", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order", - "name": "ASLPSleepStudyOrder", - "title": "ASLP Sleep Study Order", - "status": "draft", - "experimental": false, - "description": "ASLP Sleep Study Order", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "ServiceRequest", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "ServiceRequest", - "path": "ServiceRequest", - "mustSupport": false - }, - { - "id": "ServiceRequest.code", - "path": "ServiceRequest.code", - "short": "Sleep Study", - "definition": "A sleep study procedure being ordered", - "comment": "The procedures for which approval is being requested", - "min": 1, - "max": "1", - "type": [ - { - "code": "CodeableConcept" - } - ], - "mustSupport": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Sleep Study Codes Grouper" - } - ], - "strength": "required", - "valueSet": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper" - }, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE1" - } - ] - }, - { - "id": "ServiceRequest.occurrence[x]", - "path": "ServiceRequest.occurrence[x]", - "short": "Sleep Study Date", - "definition": "Date of the procedure", - "min": 1, - "max": "1", - "type": [ - { - "code": "dateTime" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ALSP.A1.DE15" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-weight.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-weight.json deleted file mode 100644 index aee60d87a..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/StructureDefinition-aslp-weight.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "aslp-weight", - "url": "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-weight", - "name": "ASLPWeight", - "title": "ASLP Weight", - "status": "draft", - "experimental": false, - "description": "ASLP Weight", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "code": "task", - "display": "Workflow Task" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://fhir.org/guides/nachc/hiv-cds/CodeSystem/activity-codes", - "code": "ASLP.A1", - "display": "Adult Sleep Studies" - } - ] - } - } - ], - "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "ASLP" - } - ], - "kind": "resource", - "abstract": false, - "type": "Observation", - "baseDefinition": "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation", - "derivation": "constraint", - "differential": { - "element": [ - { - "id": "Observation", - "path": "Observation", - "mustSupport": false - }, - { - "id": "Observation.code", - "path": "Observation.code", - "short": "Weight", - "definition": "Weight (in pounds)", - "min": 1, - "max": "1", - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE21" - } - ] - }, - { - "id": "Observation.value[x]", - "path": "Observation.value[x]", - "short": "Weight", - "definition": "Weight (in pounds)", - "min": 1, - "max": "1", - "type": [ - { - "code": "Quantity" - } - ], - "mustSupport": true, - "mapping": [ - { - "identity": "ASLP", - "map": "ASLP.A1.DE21" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-Diabetes.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-Diabetes.json deleted file mode 100644 index 28d906c07..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-Diabetes.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "resourceType": "Condition", - "id": "Diabetes", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis" - ] - }, - "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" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE19", - "display": "History of Diabetes" - } - ] - }, - "subject": { - "reference": "Patient/positive" - }, - "onsetDateTime": "2015-10-31", - "recordedDate": "2015-11-01" -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-Hypertension.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-Hypertension.json deleted file mode 100644 index 3b116b8e0..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-Hypertension.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "resourceType": "Condition", - "id": "Hypertension", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis" - ] - }, - "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" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE18", - "display": "History of Hypertension" - } - ] - }, - "subject": { - "reference": "Patient/positive" - }, - "onsetDateTime": "2015-10-31", - "recordedDate": "2015-11-01" -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-SleepApnea.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-SleepApnea.json deleted file mode 100644 index 831f47dee..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Condition-SleepApnea.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "resourceType": "Condition", - "id": "SleepApnea", - "meta": { - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-diagnosis-of-obstructive-sleep-apnea", - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-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" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE17", - "display": "Obstructive sleep apnea (OSA)" - } - ] - }, - "subject": { - "reference": "Patient/positive" - }, - "onsetDateTime": "2015-10-31", - "recordedDate": "2015-11-01" -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Coverage-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Coverage-positive.json deleted file mode 100644 index d52b9e36c..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Coverage-positive.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "resourceType": "Coverage", - "id": "Coverage-positive", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-coverage" - ] - }, - "identifier": [ - { - "system": "http://example.com/fhir/NampingSystem/certificate", - "value": "12345" - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", - "code": "EHCPOL", - "display": "extended healthcare" - } - ] - }, - "policyHolder": { - "reference": "http://example.org/FHIR/Organization/CBI35" - }, - "subscriber": { - "reference": "Patient/positive" - }, - "beneficiary": { - "reference": "Patient/positive" - }, - "dependent": "0", - "relationship": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship", - "code": "self" - } - ] - }, - "period": { - "start": "2011-05-23", - "end": "2030-05-23" - }, - "payor": [ - { - "reference": "http://example.org/fhir/Organization/example-payer", - "display": "Payer XYZ" - } - ], - "class": [ - { - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/coverage-class", - "code": "group" - } - ] - }, - "value": "CB135", - "name": "Corporate Baker's Inc. Local #35" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-BMI.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-BMI.json deleted file mode 100644 index 63f11f8d1..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-BMI.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "resourceType": "Observation", - "id": "BMI", - "meta": { - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-bmi", - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-bmi", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation" - ] - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "39156-5", - "display": "Body mass index (BMI) [Ratio]" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE22", - "display": "Body mass index (BMI) [Ratio]" - } - ], - "text": "BMI" - }, - "subject": { - "reference": "Patient/positive" - }, - "effectiveDateTime": "2023-04-04", - "valueQuantity": { - "value": 16.2, - "unit": "kg/m2", - "system": "http://unitsofmeasure.org", - "code": "kg/m2" - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-BloodPressure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-BloodPressure.json deleted file mode 100644 index e4b75d4ea..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-BloodPressure.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "resourceType": "Observation", - "id": "BloodPressure", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation" - ] - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://loinc.org", - "code": "85354-9", - "display": "Blood pressure panel with all children optional" - }, - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE18", - "display": "Blood pressure panel with all children optional" - } - ], - "text": "Blood pressure systolic and diastolic" - }, - "subject": { - "reference": "Patient/positive" - }, - "effectiveDateTime": "2023-04-02T09:45:10+01:00", - "issued": "2023-04-03T15:45:10+01:00", - "component": [ - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8480-6", - "display": "Systolic blood pressure" - } - ], - "text": "Systolic blood pressure" - }, - "valueQuantity": { - "value": 109, - "unit": "mmHg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - }, - { - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8462-4", - "display": "Diastolic blood pressure" - } - ], - "text": "Diastolic blood pressure" - }, - "valueQuantity": { - "value": 44, - "unit": "mmHg", - "system": "http://unitsofmeasure.org", - "code": "mm[Hg]" - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Glucose.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Glucose.json deleted file mode 100644 index 877db25a7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Glucose.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "resourceType": "Observation", - "id": "Glucose", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-lab", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation" - ] - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "laboratory", - "display": "Laboratory" - } - ], - "text": "Laboratory" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "15074-8", - "display": "Glucose [Moles/volume] in Blood" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE19", - "display": "Glucose [Moles/volume] in Blood" - } - ] - }, - "subject": { - "reference": "Patient/positive" - }, - "effectiveDateTime": "2023-04-02T09:30:10+01:00", - "issued": "2023-04-03T15:30:10+01:00", - "valueQuantity": { - "value": 8.0, - "unit": "mmol/l", - "system": "http://unitsofmeasure.org", - "code": "mmol/L" - }, - "interpretation": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", - "code": "H", - "display": "High" - } - ] - } - ], - "referenceRange": [ - { - "low": { - "value": 3.1, - "unit": "mmol/l", - "system": "http://unitsofmeasure.org", - "code": "mmol/L" - }, - "high": { - "value": 7.5, - "unit": "mmol/l", - "system": "http://unitsofmeasure.org", - "code": "mmol/L" - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Height.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Height.json deleted file mode 100644 index 9eea2a3f4..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Height.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "resourceType": "Observation", - "id": "Height", - "meta": { - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-height", - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-height", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation" - ] - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "8302-2", - "display": "Body height" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE20", - "display": "Body height" - } - ], - "text": "height" - }, - "subject": { - "reference": "Patient/positive" - }, - "effectiveDateTime": "2023-04-04", - "valueQuantity": { - "value": 69, - "unit": "in", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Neck.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Neck.json deleted file mode 100644 index 48520594a..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Neck.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "resourceType": "Observation", - "id": "Neck", - "meta": { - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-neck-circumference", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation" - ] - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "exam", - "display": "Exam" - } - ], - "text": "Exam" - } - ], - "code": { - "coding": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE23", - "display": "Neck Circumference" - } - ], - "text": "Neck Circumference" - }, - "subject": { - "reference": "Patient/positive" - }, - "effectiveDateTime": "2023-04-04", - "valueQuantity": { - "value": 16, - "unit": "in", - "system": "http://unitsofmeasure.org", - "code": "[in_i]" - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Weight.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Weight.json deleted file mode 100644 index b7ea4b12e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Observation-Weight.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "resourceType": "Observation", - "id": "Weight", - "meta": { - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-weight", - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-weight", - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation" - ] - }, - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs", - "display": "Vital Signs" - } - ], - "text": "Vital Signs" - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "29463-7", - "display": "Body Weight" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE21", - "display": "Body weight" - } - ], - "text": "weight" - }, - "subject": { - "reference": "Patient/positive" - }, - "effectiveDateTime": "2023-04-04", - "valueQuantity": { - "value": 185, - "unit": "[lb_av]", - "system": "http://unitsofmeasure.org", - "code": "[lb_av]" - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Patient-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Patient-positive.json deleted file mode 100644 index b271f4927..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Patient-positive.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "resourceType": "Patient", - "id": "positive", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-patient", - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2054-5", - "display": "Black or African American" - } - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2135-2", - "display": "Hispanic or Latino" - } - } - ] - } - ], - "identifier": [ - { - "use": "usual", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0203", - "code": "MR", - "display": "Medical Record Number" - } - ] - }, - "system": "http://hospital.smarthealthit.org", - "value": "9999999910" - } - ], - "name": [ - { - "family": "Jones", - "given": [ - "Rick" - ] - } - ], - "gender": "male", - "birthDate": "1955-11-05" -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Practitioner-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Practitioner-positive.json deleted file mode 100644 index ce02f9bf7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Practitioner-positive.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "Practitioner-positive", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-practitioner" - ] - }, - "identifier": [ - { - "system": "http://hl7.org/fhir/sid/us-npi", - "value": "9941339108" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "25456" - } - ], - "name": [ - { - "family": "Careful", - "given": [ - "Adam" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "home", - "line": [ - "1003 Healthcare Drive" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002" - } - ], - "qualification": [ - { - "identifier": [ - { - "system": "http://example.org/UniversityIdentifier", - "value": "12345" - } - ], - "code": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0360", - "code": "BS", - "display": "Bachelor of Science" - } - ], - "text": "Bachelor of Science" - }, - "period": { - "start": "1995" - }, - "issuer": { - "display": "Example University" - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/ServiceRequest-SleepStudy.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/ServiceRequest-SleepStudy.json deleted file mode 100644 index 72f576f7e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/ServiceRequest-SleepStudy.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "resourceType": "ServiceRequest", - "id": "SleepStudy", - "meta": { - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order", - "http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-servicerequest" - ] - }, - "status": "draft", - "intent": "order", - "code": { - "coding": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE2", - "display": "Home sleep apnea testing (HSAT)" - } - ], - "text": "Home sleep apnea testing (HSAT)" - }, - "subject": { - "reference": "Patient/positive" - }, - "authoredOn": "2023-04-06", - "reasonReference": [ - { - "reference": "Condition/SleepApnea" - } - ], - "occurrenceDateTime": "2023-04-10", - "requester": { - "reference": "Practitioner/positive-Practitioner" - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/ServiceRequest-SleepStudy2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/ServiceRequest-SleepStudy2.json deleted file mode 100644 index c2fc1622c..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/ServiceRequest-SleepStudy2.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "resourceType": "ServiceRequest", - "id": "SleepStudy2", - "meta": { - "profile": [ - "http://example.org/sdh/dtr/aslp/StructureDefinition/aslp-sleep-study-order", - "http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-servicerequest" - ] - }, - "status": "draft", - "intent": "order", - "code": { - "coding": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE14", - "display": "Artificial intelligence (AI)" - } - ], - "text": "Artificial intelligence (AI)" - }, - "subject": { - "reference": "Patient/positive" - }, - "authoredOn": "2023-04-06", - "reasonReference": [ - { - "reference": "Condition/SleepApnea" - } - ], - "occurrenceDateTime": "2023-04-15", - "requester": { - "reference": "Practitioner/positive-Practitioner" - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-active-condition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-active-condition.json deleted file mode 100644 index 187eb4b81..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-active-condition.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "active-condition", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-publishablevalueset" - ] - }, - "text": { - "status": "extensions", - "div": "
  • Include these codes as defined in http://terminology.hl7.org/CodeSystem/condition-clinical
    CodeDisplayDefinition
    activeActiveThe subject is currently experiencing the condition or situation, there is evidence of the condition or situation, or considered to be a significant risk.
    recurrenceRecurrenceThe subject is experiencing a reoccurence or repeating of a previously resolved condition or situation, e.g. urinary tract infection, food insecurity.
    relapseRelapseThe subject is experiencing a return of a condition or situation after a period of improvement or remission, e.g. relapse of cancer, alcoholism.
" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "shareable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "computable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "publishable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "structured" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/valueset-author", - "valueContactDetail": { - "name": "Bryn Rhodes" - } - } - ], - "url": "http://fhir.org/guides/cqf/common/ValueSet/active-condition", - "version": "4.0.1", - "name": "CQFActiveCondition", - "title": "CQF Active Condition", - "status": "active", - "experimental": false, - "date": "2019-07-21", - "publisher": "Alphora", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://alphora.com" - } - ] - } - ], - "description": "Active condition clinical status codes", - "jurisdiction": [ - { - "coding": [ - { - "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", - "code": "001" - } - ] - } - ], - "purpose": "Used to specify the set of clinical status codes that are considered active", - "copyright": "© Alphora 2019+", - "compose": { - "include": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "concept": [ - { - "code": "active", - "display": "Active" - }, - { - "code": "recurrence", - "display": "Recurrence" - }, - { - "code": "relapse", - "display": "Relapse" - } - ] - } - ] - }, - "expansion": { - "contains": [ - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "active", - "display": "Active" - }, - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "recurrence", - "display": "Recurrence" - }, - { - "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", - "code": "relapse", - "display": "Relapse" - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json deleted file mode 100644 index 05bffa468..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "aslp-a1-de1-codes-grouper", - "url": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de1-codes-grouper", - "name": "SleepStudyCodesGrouper", - "title": "Sleep Study Codes Grouper", - "status": "draft", - "experimental": false, - "date": "2023-04-05T09:05:01-06:00", - "description": "Group Valueset with codes representing possible values for the Sleep Study Codes Grouper element", - "immutable": true, - "compose": { - "include": [ - { - "valueSet": [ - "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de2" - ] - }, - { - "valueSet": [ - "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de9" - ] - } - ] - }, - "expansion": { - "contains": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE2", - "display": "Home sleep apnea testing (HSAT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE3", - "display": "Peripheral artery tonometry (PAT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE4", - "display": "Actigraphy" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE5", - "display": "Prescreening devices or procedures" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE6", - "display": "Acoustic pharyngometry" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE7", - "display": "Digital therapeutics" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE8", - "display": "Home oximetry monitoring" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE9", - "display": "Polysomnogram" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE10", - "display": "Facility-based positive airway pressure (PAP) titration study" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE11", - "display": "Facility-based, daytime, abbreviated, cardiorespiratory sleep studies (PAP NAP testing)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE12", - "display": "Multiple sleep latency test (MSLT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE13", - "display": "Maintenance of wakefulness test (MWT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE14", - "display": "Artificial intelligence (AI)" - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json deleted file mode 100644 index ccd2ce5a9..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "aslp-a1-de17", - "url": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de17", - "name": "DiagnosisofObstructiveSleepApneaCodes", - "title": "Diagnosis of Obstructive Sleep Apnea Codes", - "status": "draft", - "experimental": false, - "description": "Codes representing possible values for the Diagnosis of Obstructive Sleep Apnea element", - "immutable": true, - "compose": { - "include": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "concept": [ - { - "code": "ASLP.A1.DE17", - "display": "Obstructive sleep apnea (OSA)" - } - ] - } - ] - }, - "expansion": { - "contains": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE17", - "display": "Obstructive sleep apnea (OSA)" - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json deleted file mode 100644 index 8c83cdece..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "aslp-a1-de2", - "url": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de2", - "name": "HomeBasedTestingSleepStudiesCodes", - "title": "Home Based Testing Sleep Studies Codes", - "status": "draft", - "experimental": false, - "description": "Codes representing possible values for the Home Based Testing Sleep Studies element", - "immutable": true, - "compose": { - "include": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "concept": [ - { - "code": "ASLP.A1.DE2", - "display": "Home sleep apnea testing (HSAT)" - }, - { - "code": "ASLP.A1.DE3", - "display": "Peripheral artery tonometry (PAT)" - }, - { - "code": "ASLP.A1.DE4", - "display": "Actigraphy" - }, - { - "code": "ASLP.A1.DE5", - "display": "Prescreening devices or procedures" - }, - { - "code": "ASLP.A1.DE6", - "display": "Acoustic pharyngometry" - }, - { - "code": "ASLP.A1.DE7", - "display": "Digital therapeutics" - }, - { - "code": "ASLP.A1.DE8", - "display": "Home oximetry monitoring" - } - ] - } - ] - }, - "expansion": { - "contains": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE2", - "display": "Home sleep apnea testing (HSAT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE3", - "display": "Peripheral artery tonometry (PAT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE4", - "display": "Actigraphy" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE5", - "display": "Prescreening devices or procedures" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE6", - "display": "Acoustic pharyngometry" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE7", - "display": "Digital therapeutics" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE8", - "display": "Home oximetry monitoring" - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json deleted file mode 100644 index 36d649f7e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "aslp-a1-de9", - "url": "http://example.org/sdh/dtr/aslp/ValueSet/aslp-a1-de9", - "name": "FacilityBasedTestingSleepStudiesCodes", - "title": "Facility Based Testing Sleep Studies Codes", - "status": "draft", - "experimental": false, - "description": "Codes representing possible values for the Facility Based Testing Sleep Studies element", - "immutable": true, - "compose": { - "include": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "concept": [ - { - "code": "ASLP.A1.DE9", - "display": "Polysomnogram" - }, - { - "code": "ASLP.A1.DE10", - "display": "Facility-based positive airway pressure (PAP) titration study" - }, - { - "code": "ASLP.A1.DE11", - "display": "Facility-based, daytime, abbreviated, cardiorespiratory sleep studies (PAP NAP testing)" - }, - { - "code": "ASLP.A1.DE12", - "display": "Multiple sleep latency test (MSLT)" - }, - { - "code": "ASLP.A1.DE13", - "display": "Maintenance of wakefulness test (MWT)" - }, - { - "code": "ASLP.A1.DE14", - "display": "Artificial intelligence (AI)" - } - ] - } - ] - }, - "expansion": { - "contains": [ - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE9", - "display": "Polysomnogram" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE10", - "display": "Facility-based positive airway pressure (PAP) titration study" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE11", - "display": "Facility-based, daytime, abbreviated, cardiorespiratory sleep studies (PAP NAP testing)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE12", - "display": "Multiple sleep latency test (MSLT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE13", - "display": "Maintenance of wakefulness test (MWT)" - }, - { - "system": "http://example.org/sdh/dtr/aslp/CodeSystem/aslp-codes", - "code": "ASLP.A1.DE14", - "display": "Artificial intelligence (AI)" - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-FHIRHelpers.json deleted file mode 100644 index 36b6cadff..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-FHIRHelpers.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRHelpers", - "url": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers", - "version": "4.0.001", - "name": "FHIRHelpers", - "title": "FHIR Helpers", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRHelpers.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json deleted file mode 100644 index 8cdb7cbd1..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "resourceType": "Library", - "id": "OutpatientPriorAuthorizationPrepopulation", - "meta": { - "versionId": "4", - "lastUpdated": "2023-01-04T22:42:31.776+00:00", - "source": "#jvktlnzFIHZuPkeq" - }, - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationPrepopulation", - "title": "Outpatient Prior Authorization Prepopulation", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "relatedArtifact": [ - { - "type": "depends-on", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.001" - } - ], - "dataRequirement": [ - { - "type": "ServiceRequest" - }, - { - "type": "Procedure" - }, - { - "type": "Claim" - }, - { - "type": "Organization" - }, - { - "type": "Practitioner" - }, - { - "type": "Coverage" - }, - { - "type": "Condition" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/OutpatientPriorAuthorizationPrepopulation.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json deleted file mode 100644 index 8a0d473ac..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-noLibrary", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-noLibrary", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "question", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "question", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json deleted file mode 100644 index 1dd67ee09..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "question", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "question", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/StructureDefinition-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/StructureDefinition-RouteOnePatient.json deleted file mode 100644 index 12490e694..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/StructureDefinition-RouteOnePatient.json +++ /dev/null @@ -1,2470 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOnePatient", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Base.Individuals" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "normative" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", - "valueCode": "4.0.0" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 5 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "patient" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient", - "version": "4.3.0", - "name": "RouteOnePatient", - "title": "Beneficiary Information", - "status": "active", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "purpose": "Tracking patient is the center of the healthcare process.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "cda", - "uri": "http://hl7.org/v3/cda", - "name": "CDA (R2)" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - }, - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "loinc", - "uri": "http://loinc.org", - "name": "LOINC code for the element" - } - ], - "kind": "resource", - "abstract": false, - "type": "Patient", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Patient", - "path": "Patient", - "short": "Information about an individual or animal receiving health care services", - "definition": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", - "alias": [ - "SubjectOfCare Client Resident" - ], - "min": 0, - "max": "*", - "base": { - "path": "Patient", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "rim", - "map": "Patient[classCode=PAT]" - }, - { - "identity": "cda", - "map": "ClinicalDocument.recordTarget.patientRole" - }, - { - "identity": "w5", - "map": "administrative.individual" - } - ] - }, - { - "id": "Patient.id", - "path": "Patient.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Patient.meta", - "path": "Patient.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Patient.implicitRules", - "path": "Patient.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Patient.language", - "path": "Patient.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Patient.text", - "path": "Patient.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Patient.contained", - "path": "Patient.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Patient" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.extension", - "path": "Patient.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.modifierExtension", - "path": "Patient.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "short": "An identifier for this patient", - "definition": "An identifier for this patient.", - "requirements": "Patients are almost always assigned specific numerical identifiers.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.identifier" - }, - { - "identity": "v2", - "map": "PID-3" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": ".id" - } - ] - }, - { - "id": "Patient.active", - "path": "Patient.active", - "short": "Whether this patient's record is in active use", - "definition": "Whether this patient record is in active use. \nMany systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.\n\nIt is often used to filter patient lists to exclude inactive patients\n\nDeceased patients may also be marked as inactive for the same reasons, but may be active for some time after death.", - "comment": "If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient.", - "requirements": "Need to be able to mark a patient record as not to be used because it was created in error.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.active", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element", - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labelled as a modifier because it is a status element that can indicate that a record should not be treated as valid", - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.status" - }, - { - "identity": "rim", - "map": "statusCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.name", - "path": "Patient.name", - "short": "A name associated with the patient", - "definition": "A name associated with the individual.", - "comment": "A patient may have multiple names with different uses or applicable periods. For animals, the name is a \"HumanName\" in the sense that is assigned and used by humans and has the same patterns.", - "requirements": "Need to be able to track the patient by multiple names. Examples are your official name and a partner name.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.name", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-5, PID-9" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": ".patient.name" - } - ] - }, - { - "id": "Patient.telecom", - "path": "Patient.telecom", - "short": "A contact detail for the individual", - "definition": "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.", - "comment": "A Patient may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and also to help with identification. The address might not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone).", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-13, PID-14, PID-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": ".telecom" - } - ] - }, - { - "id": "Patient.gender", - "path": "Patient.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.", - "comment": "The gender might not match the biological sex as determined by genetics or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than male and female, though the vast majority of systems and contexts only support male and female. Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific sex or gender aspect of interest (anatomical, chromosomal, social, etc.) However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice. Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosomal and other gender aspects. For example, an alert about a hysterectomy on a male should be handled as a warning or overridable error, not a \"hard\" error. See the Patient Gender and Sex section for additional information about communicating patient gender and sex.", - "requirements": "Needed for identification of the individual, in combination with (at least) name and birth date.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-8" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": ".patient.administrativeGenderCode" - } - ] - }, - { - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "short": "The date of birth for the individual", - "definition": "The date of birth for the individual.", - "comment": "At least an estimated year should be provided as a guess if the real DOB is unknown There is a standard extension \"patient-birthTime\" available that should be used where Time is required (such as in maternity/infant care systems).", - "requirements": "Age of the individual drives many clinical processes.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.birthDate", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "date" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-7" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime" - }, - { - "identity": "cda", - "map": ".patient.birthTime" - }, - { - "identity": "loinc", - "map": "21112-8" - } - ] - }, - { - "id": "Patient.deceased[x]", - "path": "Patient.deceased[x]", - "short": "Indicates if the individual is deceased or not", - "definition": "Indicates if the individual is deceased or not.", - "comment": "If there's no value in the instance, it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive.", - "requirements": "The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.deceased[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - }, - { - "code": "dateTime" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labeled as a modifier because once a patient is marked as deceased, the actions that are appropriate to perform on the patient may be significantly different.", - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-30 (bool) and PID-29 (datetime)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.address", - "path": "Patient.address", - "short": "An address for the individual", - "definition": "An address for the individual.", - "comment": "Patient may have multiple addresses with different uses or applicable periods.", - "requirements": "May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.address", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-11" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": ".addr" - } - ] - }, - { - "id": "Patient.maritalStatus", - "path": "Patient.maritalStatus", - "short": "Marital (civil) status of a patient", - "definition": "This field contains a patient's most recent marital (civil) status.", - "requirements": "Most, if not all systems capture it.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.maritalStatus", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "MaritalStatus" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "extensible", - "description": "The domestic partnership status of a person.", - "valueSet": "http://hl7.org/fhir/ValueSet/marital-status" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-16" - }, - { - "identity": "rim", - "map": "player[classCode=PSN]/maritalStatusCode" - }, - { - "identity": "cda", - "map": ".patient.maritalStatusCode" - } - ] - }, - { - "id": "Patient.multipleBirth[x]", - "path": "Patient.multipleBirth[x]", - "short": "Whether patient is part of a multiple birth", - "definition": "Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer).", - "comment": "Where the valueInteger is provided, the number is the birth number in the sequence. E.g. The middle birth in triplets would be valueInteger=2 and the third born would have valueInteger=3 If a boolean value was provided for this triplets example, then all 3 patient records would have valueBoolean=true (the ordering is not indicated).", - "requirements": "For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.multipleBirth[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - }, - { - "code": "integer" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-24 (bool), PID-25 (integer)" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.photo", - "path": "Patient.photo", - "short": "Image of the patient", - "definition": "Image of the patient.", - "comment": "Guidelines:\n* Use id photos, not clinical photos.\n* Limit dimensions to thumbnail.\n* Keep byte count low to ease resource updates.", - "requirements": "Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.photo", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Attachment" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "OBX-5 - needs a profile" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Contact" - } - ], - "path": "Patient.contact", - "short": "A contact party (e.g. guardian, partner, friend) for the patient", - "definition": "A contact party (e.g. guardian, partner, friend) for the patient.", - "comment": "Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact.", - "requirements": "Need to track people you can contact about the patient.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "pat-1", - "severity": "error", - "human": "SHALL at least contain a contact's details or a reference to an organization", - "expression": "name.exists() or telecom.exists() or address.exists() or organization.exists()", - "xpath": "exists(f:name) or exists(f:telecom) or exists(f:address) or exists(f:organization)", - "source": "http://hl7.org/fhir/StructureDefinition/Patient" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.id", - "path": "Patient.contact.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.extension", - "path": "Patient.contact.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.modifierExtension", - "path": "Patient.contact.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.contact.relationship", - "path": "Patient.contact.relationship", - "short": "The kind of relationship", - "definition": "The nature of the relationship between the patient and the contact person.", - "requirements": "Used to determine which contact person is the most relevant to approach, depending on circumstances.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact.relationship", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ContactRelationship" - } - ], - "strength": "extensible", - "description": "The nature of the relationship between a patient and a contact person for that patient.", - "valueSet": "http://hl7.org/fhir/ValueSet/patient-contactrelationship" - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-7, NK1-3" - }, - { - "identity": "rim", - "map": "code" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.name", - "path": "Patient.contact.name", - "short": "A name associated with the contact person", - "definition": "A name associated with the contact person.", - "requirements": "Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.name", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-2" - }, - { - "identity": "rim", - "map": "name" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.telecom", - "path": "Patient.contact.telecom", - "short": "A contact detail for the person", - "definition": "A contact detail for the person, e.g. a telephone number or an email address.", - "comment": "Contact may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently, and also to help with identification.", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.contact.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-5, NK1-6, NK1-40" - }, - { - "identity": "rim", - "map": "telecom" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.address", - "path": "Patient.contact.address", - "short": "Address for the contact person", - "definition": "Address for the contact person.", - "requirements": "Need to keep track where the contact person can be contacted per postal mail or visited.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.address", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-4" - }, - { - "identity": "rim", - "map": "addr" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.gender", - "path": "Patient.contact.gender", - "short": "male | female | other | unknown", - "definition": "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.", - "requirements": "Needed to address the person correctly.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.gender", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AdministrativeGender" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "required", - "description": "The gender of a person used for administrative purposes.", - "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.3.0" - }, - "mapping": [ - { - "identity": "v2", - "map": "NK1-15" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.organization", - "path": "Patient.contact.organization", - "short": "Organization that is associated with the contact", - "definition": "Organization on behalf of which the contact is acting or for which the contact is working.", - "requirements": "For guardians or business related contacts, the organization is relevant.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.organization", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "condition": [ - "pat-1" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "NK1-13, NK1-30, NK1-31, NK1-32, NK1-41" - }, - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.contact.period", - "path": "Patient.contact.period", - "short": "The period during which this contact person or organization is valid to be contacted relating to this patient", - "definition": "The period during which this contact person or organization is valid to be contacted relating to this patient.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.contact.period", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "effectiveTime" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication", - "path": "Patient.communication", - "short": "A language which may be used to communicate with the patient about his or her health", - "definition": "A language which may be used to communicate with the patient about his or her health.", - "comment": "If no language is specified, this *implies* that the default local language is spoken. If you need to convey proficiency for multiple modes, then you need multiple Patient.Communication associations. For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required.", - "requirements": "If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency are important things to keep track of both for patient and other persons of interest.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.communication", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "LanguageCommunication" - }, - { - "identity": "cda", - "map": "patient.languageCommunication" - } - ] - }, - { - "id": "Patient.communication.id", - "path": "Patient.communication.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.extension", - "path": "Patient.communication.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.communication.modifierExtension", - "path": "Patient.communication.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.communication.language", - "path": "Patient.communication.language", - "short": "The language which can be used to communicate with the patient about his or her health", - "definition": "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.", - "comment": "The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.", - "requirements": "Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.communication.language", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - }, - "mapping": [ - { - "identity": "v2", - "map": "PID-15, LAN-2" - }, - { - "identity": "rim", - "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code" - }, - { - "identity": "cda", - "map": ".languageCode" - } - ] - }, - { - "id": "Patient.communication.preferred", - "path": "Patient.communication.preferred", - "short": "Language preference indicator", - "definition": "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).", - "comment": "This language is specifically identified for communicating healthcare information.", - "requirements": "People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.communication.preferred", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-15" - }, - { - "identity": "rim", - "map": "preferenceInd" - }, - { - "identity": "cda", - "map": ".preferenceInd" - } - ] - }, - { - "id": "Patient.generalPractitioner", - "path": "Patient.generalPractitioner", - "short": "Patient's nominated primary care provider", - "definition": "Patient's nominated care provider.", - "comment": "This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disability setting, or even organization that will provide people to perform the care provider roles. It is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources.\nMultiple GPs may be recorded against the patient for various reasons, such as a student that has his home GP listed along with the GP at university during the school semesters, or a \"fly-in/fly-out\" worker that has the onsite GP also included with his home GP to remain aware of medical issues.\n\nJurisdictions may decide that they can profile this down to 1 if desired, or 1 per type.", - "alias": [ - "careProvider" - ], - "min": 0, - "max": "*", - "base": { - "path": "Patient.generalPractitioner", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization", - "http://hl7.org/fhir/StructureDefinition/Practitioner", - "http://hl7.org/fhir/StructureDefinition/PractitionerRole" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PD1-4" - }, - { - "identity": "rim", - "map": "subjectOf.CareEvent.performer.AssignedEntity" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.managingOrganization", - "path": "Patient.managingOrganization", - "short": "Organization that is the custodian of the patient record", - "definition": "Organization that is the custodian of the patient record.", - "comment": "There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association).", - "requirements": "Need to know who recognizes this patient record, manages and updates it.", - "min": 0, - "max": "1", - "base": { - "path": "Patient.managingOrganization", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "scoper" - }, - { - "identity": "cda", - "map": ".providerOrganization" - } - ] - }, - { - "id": "Patient.link", - "path": "Patient.link", - "short": "Link to another patient resource that concerns the same actual person", - "definition": "Link to another patient resource that concerns the same actual patient.", - "comment": "There is no assumption that linked patient records have mutual links.", - "requirements": "There are multiple use cases: \n\n* Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and \n* Distribution of patient information across multiple servers.", - "min": 0, - "max": "*", - "base": { - "path": "Patient.link", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labeled as a modifier because it might not be the main Patient resource, and the referenced patient should be used instead of this Patient record. This is when the link.type value is 'replaced-by'", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "outboundLink" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.id", - "path": "Patient.link.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.extension", - "path": "Patient.link.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.modifierExtension", - "path": "Patient.link.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Patient.link.other", - "path": "Patient.link.other", - "short": "The other patient or related person resource that the link refers to", - "definition": "The other patient resource that the link refers to.", - "comment": "Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.link.other", - "min": 1, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy", - "valueBoolean": false - } - ], - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Patient", - "http://hl7.org/fhir/StructureDefinition/RelatedPerson" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "PID-3, MRG-1" - }, - { - "identity": "rim", - "map": "id" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - }, - { - "id": "Patient.link.type", - "path": "Patient.link.type", - "short": "replaced-by | replaces | refer | seealso", - "definition": "The type of link between this patient resource and another patient resource.", - "min": 1, - "max": "1", - "base": { - "path": "Patient.link.type", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "LinkType" - } - ], - "strength": "required", - "description": "The type of link between this patient resource and another patient resource.", - "valueSet": "http://hl7.org/fhir/ValueSet/link-type|4.3.0" - }, - "mapping": [ - { - "identity": "rim", - "map": "typeCode" - }, - { - "identity": "cda", - "map": "n/a" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "id": "Patient.name", - "path": "Patient.name", - "label": "Patient Name", - "type": [ - { - "code": "HumanName" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.name.given", - "path": "Patient.name.given", - "label": "First Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.name.family", - "path": "Patient.name.family", - "label": "Last Name", - "min": 1, - "type": [ - { - "code": "string" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.birthDate", - "path": "Patient.birthDate", - "label": "Date of Birth", - "min": 1, - "type": [ - { - "code": "date" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.gender", - "path": "Patient.gender", - "label": "Gender", - "min": 1, - "type": [ - { - "code": "code" - } - ], - "binding": { - "strength": "extensible", - "valueSet": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender" - } - }, - { - "id": "Patient.identifier", - "path": "Patient.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Patient.identifier:MedicareID", - "path": "Patient.identifier", - "sliceName": "MedicareID", - "min": 1, - "max": "1", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Patient.identifier:MedicareID.system", - "path": "Patient.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://medicare.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Patient.identifier:MedicareID.value", - "path": "Patient.identifier.value", - "label": "Medicare ID", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Claim-OPA-Claim1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Claim-OPA-Claim1.json deleted file mode 100644 index 5021f98c3..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Claim-OPA-Claim1.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "resourceType": "Claim", - "id": "OPA-Claim1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-levelOfServiceCode", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1338", - "code": "U", - "display": "Urgent" - } - ] - } - } - ], - "identifier": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierJurisdiction", - "valueCodeableConcept": { - "coding": [ - { - "system": "https://www.usps.com/", - "code": "MA" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierSubDepartment", - "valueString": "223412" - } - ], - "system": "http://example.org/PATIENT_EVENT_TRACE_NUMBER", - "value": "111099", - "assigner": { - "identifier": { - "system": "http://example.org/USER_ASSIGNED", - "value": "9012345678" - } - } - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/claim-type", - "code": "professional" - } - ] - }, - "use": "preauthorization", - "patient": { - "reference": "Patient/OPA-Patient1" - }, - "created": "2005-05-02", - "insurer": { - "reference": "Organization/OPA-PayorOrganization1" - }, - "provider": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "facility": { - "reference": "Location/OPA-Location1" - }, - "priority": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/processpriority", - "code": "normal" - } - ] - }, - "careTeam": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 1, - "provider": { - "reference": "Practitioner/OPA-OperatingPhysician1" - } - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 2, - "provider": { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - } - ], - "diagnosis": [ - { - "sequence": 123, - "diagnosisReference": { - "reference": "Condition/OPA-Condition1" - } - } - ], - "procedure": [ - { - "sequence": 1, - "procedureReference": { - "reference": "Procedure/OPA-Procedure1" - } - }, - { - "sequence": 2, - "procedureReference": { - "reference": "Procedure/OPA-Procedure2" - } - } - ], - "supportingInfo": [ - { - "sequence": 1, - "category": { - "coding": [ - { - "system": "http://hl7.org/us/davinci-pas/CodeSystem/PASSupportingInfoType", - "code": "patientEvent" - } - ] - }, - "timingPeriod": { - "start": "2015-10-01T00:00:00-07:00", - "end": "2015-10-05T00:00:00-07:00" - } - } - ], - "insurance": [ - { - "sequence": 1, - "focal": true, - "coverage": { - "reference": "Coverage/OPA-Coverage1" - } - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemTraceNumber", - "valueIdentifier": { - "system": "http://example.org/ITEM_TRACE_NUMBER", - "value": "1122334" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizationNumber", - "valueString": "1122445" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-administrationReferenceNumber", - "valueString": "9988311" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceItemRequestType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1525", - "code": "SC", - "display": "Specialty Care Review" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-certificationType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1322", - "code": "I", - "display": "Initial" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-requestedService", - "valueReference": { - "reference": "ServiceRequest/OPA-ServiceRequest1" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-epsdtIndicator", - "valueBoolean": false - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeResidentialStatus", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1345", - "code": "2", - "display": "Newly Admitted" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeLevelOfCare", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1337", - "code": "2", - "display": "Intermediate Care Facility (ICF)" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueUnitRateLimit", - "valueDecimal": 100 - } - ], - "sequence": 1, - "careTeamSequence": [ - 1 - ], - "diagnosisSequence": [ - 1 - ], - "productOrService": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1365", - "code": "3", - "display": "Consultation" - } - ] - }, - "locationCodeableConcept": { - "coding": [ - { - "system": "https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set", - "code": "11" - } - ] - } - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Condition-OPA-Condition1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Condition-OPA-Condition1.json deleted file mode 100644 index a0c2ca681..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Condition-OPA-Condition1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Condition", - "id": "OPA-Condition1", - "code": { - "coding": [ - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "G1221", - "display": "G1221,Amyotrophic lateral sclerosis" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Coverage-OPA-Coverage1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Coverage-OPA-Coverage1.json deleted file mode 100644 index 53802b3e9..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Coverage-OPA-Coverage1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "resourceType": "Coverage", - "id": "OPA-Coverage1", - "meta": { - "versionId": "1", - "lastUpdated": "2019-07-11T06:27:08.949+00:00", - "profile": [ - "http://hl7.org/fhir/us/davinci-deqm/STU3/StructureDefinition/coverage-deqm" - ] - }, - "identifier": [ - { - "system": "http://benefitsinc.com/certificate", - "value": "10138556" - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", - "code": "HIP", - "display": "health insurance plan policy" - } - ] - }, - "policyHolder": { - "reference": "Patient/OPA-Patient1" - }, - "subscriber": { - "reference": "Patient/OPA-Patient1" - }, - "subscriberId": "525697298M", - "beneficiary": { - "reference": "Patient/OPA-Patient1" - }, - "relationship": { - "coding": [ - { - "code": "self" - } - ] - }, - "payor": [ - { - "reference": "Organization/OPA-PayorOrganization1" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Location-OPA-Location1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Location-OPA-Location1.json deleted file mode 100644 index 39eca622e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Location-OPA-Location1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Location", - "id": "OPA-Location1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:28:20.715+00:00" - }, - "address": { - "line": [ - "100 Good St" - ], - "city": "Bedford", - "state": "MA", - "postalCode": "01730" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Organization-OPA-PayorOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Organization-OPA-PayorOrganization1.json deleted file mode 100644 index f8a998c72..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Organization-OPA-PayorOrganization1.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-PayorOrganization1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:16:05.159+00:00" - }, - "name": "Palmetto GBA", - "address": [ - { - "use": "work", - "line": [ - "111 Dogwood Ave" - ], - "city": "Columbia", - "state": "SC", - "postalCode": "29999", - "country": "US" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Organization-OPA-ProviderOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Organization-OPA-ProviderOrganization1.json deleted file mode 100644 index 4830be3b8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Organization-OPA-ProviderOrganization1.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-ProviderOrganization1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: example-organization-2

meta:

identifier: 1407071236, 121111111

active: true

type: Healthcare Provider (Details : {http://terminology.hl7.org/CodeSystem/organization-type code 'prov' = 'Healthcare Provider', given as 'Healthcare Provider'})

name: Acme Clinic

telecom: ph: (+1) 734-677-7777, customer-service@acme-clinic.org

address: 3300 Washtenaw Avenue, Suite 227 Amherst MA 01002 USA

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1407071236" - }, - { - "system": "http://example.org/fhir/sid/us-tin", - "value": "121111111" - } - ], - "active": true, - "type": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/organization-type", - "code": "prov", - "display": "Healthcare Provider" - } - ] - } - ], - "name": "Acme Clinic", - "telecom": [ - { - "system": "phone", - "value": "(+1) 734-677-7777" - }, - { - "system": "email", - "value": "customer-service@acme-clinic.org" - } - ], - "address": [ - { - "line": [ - "3300 Washtenaw Avenue, Suite 227" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002", - "country": "USA" - } - ], - "contact": [ - { - "name": { - "use": "official", - "family": "Dow", - "given": [ - "Jones" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "555-555-5555", - "use": "home" - } - ] - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Patient-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Patient-OPA-Patient1.json deleted file mode 100644 index 9dc299930..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Patient-OPA-Patient1.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "resourceType": "Patient", - "id": "OPA-Patient1", - "extension": [ - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2106-3", - "display": "White" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1002-5", - "display": "American Indian or Alaska Native" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2028-9", - "display": "Asian" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1586-7", - "display": "Shoshone" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2036-2", - "display": "Filipino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1735-0", - "display": "Alaska Native" - } - }, - { - "url": "text", - "valueString": "Mixed" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2135-2", - "display": "Hispanic or Latino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2184-0", - "display": "Dominican" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2148-5", - "display": "Mexican" - } - }, - { - "url": "text", - "valueString": "Hispanic or Latino" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", - "valueCode": "M" - } - ], - "identifier": [ - { - "use": "usual", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0203", - "code": "MR" - } - ] - }, - "system": "urn:oid:1.2.36.146.595.217.0.1", - "value": "12345", - "period": { - "start": "2001-05-06" - }, - "assigner": { - "display": "Acme Healthcare" - } - } - ], - "active": true, - "name": [ - { - "use": "official", - "family": "Chalmers", - "given": [ - "Peter", - "James" - ] - }, - { - "use": "usual", - "family": "Chalmers", - "given": [ - "Jim" - ] - }, - { - "use": "maiden", - "family": "Windsor", - "given": [ - "Peter", - "James" - ], - "period": { - "end": "2002" - } - } - ], - "telecom": [ - { - "system": "phone", - "value": "(03) 5555 6473", - "use": "work", - "rank": 1 - }, - { - "system": "phone", - "value": "(03) 3410 5613", - "use": "mobile", - "rank": 2 - }, - { - "system": "phone", - "value": "(03) 5555 8834", - "use": "old", - "period": { - "end": "2014" - } - } - ], - "gender": "male", - "birthDate": "1974-12-25", - "_birthDate": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime", - "valueDateTime": "1974-12-25T14:35:45-05:00" - } - ] - }, - "deceasedBoolean": false, - "address": [ - { - "use": "home", - "type": "both", - "text": "534 Erewhon St PeasantVille, Utah 84414", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "UT", - "postalCode": "84414", - "period": { - "start": "1974-12-25" - } - } - ], - "maritalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus", - "code": "M" - } - ] - }, - "contact": [ - { - "relationship": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0131", - "code": "N" - } - ] - } - ], - "name": { - "family": "du Marché", - "_family": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", - "valueString": "VV" - } - ] - }, - "given": [ - "Bénédicte" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "+33 (237) 998327" - } - ], - "address": { - "use": "home", - "type": "both", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "VT", - "postalCode": "3999", - "period": { - "start": "1974-12-25" - } - }, - "gender": "female", - "period": { - "start": "2012" - } - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Practitioner-OPA-AttendingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Practitioner-OPA-AttendingPhysician1.json deleted file mode 100644 index f009f2c02..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Practitioner-OPA-AttendingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-AttendingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-1

meta:

identifier: 9941339108, 25456

name: Ronald Bone

address: 1003 Healthcare Drive Amherst MA 01002 (HOME)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "9941339108" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "25456" - } - ], - "name": [ - { - "family": "Bone", - "given": [ - "Ronald" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "home", - "line": [ - "1003 Healthcare Drive" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Practitioner-OPA-OperatingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Practitioner-OPA-OperatingPhysician1.json deleted file mode 100644 index 697350aa7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Practitioner-OPA-OperatingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-OperatingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-2

meta:

identifier: 1245319599, 456789

name: Fielding Kathy

address: 1080 FIRST COLONIAL RD Virginia Beach VA 21454-2406 (WORK)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1245319599" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "456789" - } - ], - "name": [ - { - "family": "Kathy", - "given": [ - "Fielding" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "work", - "line": [ - "1080 FIRST COLONIAL RD" - ], - "city": "Virginia Beach", - "state": "VA", - "postalCode": "21454-2406" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Procedure-OPA-Procedure1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Procedure-OPA-Procedure1.json deleted file mode 100644 index ecd62e960..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Procedure-OPA-Procedure1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure1", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64612", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL NERVE, UNILATERAL (EG, FOR BLEPHAROSPASM, HEMIFACIAL SPASM)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Procedure-OPA-Procedure2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Procedure-OPA-Procedure2.json deleted file mode 100644 index 909cb9680..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Procedure-OPA-Procedure2.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure2", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64615", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL, TRIGEMINAL, CERVICAL SPINAL AND ACCESSORY NERVES, BILATERAL (EG, FOR CHRONIC MIGRAINE)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/ServiceRequest-OPA-ServiceRequest1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/ServiceRequest-OPA-ServiceRequest1.json deleted file mode 100644 index 3c171b4b8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/ServiceRequest-OPA-ServiceRequest1.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "resourceType": "ServiceRequest", - "id": "OPA-ServiceRequest1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-crd/R4/StructureDefinition/profile-servicerequest-r4" - ] - }, - "status": "draft", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "99241", - "display": "Testing Service for Outpatient Prior Auth" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - }, - "authoredOn": "2018-08-08", - "insurance": [ - { - "reference": "Coverage/OPA-Coverage1" - } - ], - "requester": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "performer": [ - { - "reference": "Practitioner/OPA-OperatingPhysician1" - }, - { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/vocabulary/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/vocabulary/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/vocabulary/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/vocabulary/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/vocabulary/ValueSet-AdministrativeGender.json deleted file mode 100644 index 156220f9b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/vocabulary/ValueSet-AdministrativeGender.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "AdministrativeGender", - "meta": { - "versionId": "1", - "lastUpdated": "2022-02-11T20:37:50.811+00:00", - "source": "#5pAPnFaiCW12WWid" - }, - "url": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender", - "version": "1.1.0", - "name": "AdministrativeGender", - "title": "Administrative Gender", - "status": "draft", - "date": "2022-04-04T23:44:44+00:00", - "publisher": "Health Level Seven International", - "contact": [ - { - "name": "HL7 International - Public Health", - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pher" - } - ] - }, - { - "name": "Cynthia Bush, Health Scientist (Informatics), CDC/National Center for Health Statistics", - "telecom": [ - { - "system": "email", - "value": "pdz1@cdc.gov" - } - ] - }, - { - "name": "AbdulMalik Shakir, FHL7, President and Chief Informatics Scientist Hi3 Solutions", - "telecom": [ - { - "system": "email", - "value": "abdulmalik.shakir@hi3solutions.com" - } - ] - } - ], - "description": "The gender of a person used for administrative purposes.\n\n**Inter-jurisdictional Exchange (IJE) concept mapping**\n\n|VRDR IG Code | VRDR IG Display Name | IJE Code |IJE Display Name\n| -------- | -------- | -------- | --------|\n|male|Male|M|Male|\n|female|Female|F|Female|\n|UNK|unknown|U|Unknown|", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ], - "text": "US Realm" - } - ], - "compose": { - "include": [ - { - "system": "http://hl7.org/fhir/administrative-gender", - "concept": [ - { - "code": "male", - "display": "Male" - }, - { - "code": "female", - "display": "Female" - } - ] - }, - { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "concept": [ - { - "code": "UNK", - "display": "unknown" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/cql/FHIRHelpers.cql deleted file mode 100644 index 47fc267c6..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/cql/FHIRHelpers.cql +++ /dev/null @@ -1,767 +0,0 @@ -library FHIRHelpers version '3.2.0' - -using FHIR version '3.2.0' - -define function ToInterval(period FHIR.Period): - if period is null then null - else if period."start" is null then Interval[period."start".value, period."end".value] - else Interval[period."start".value, period."end".value] - -define function ToCalendarUnit(unit System.String): - case unit - when 'ms' then 'millisecond' - when 's' then 'second' - when 'min' then 'minute' - when 'h' then 'hour' - when 'd' then 'day' - when 'wk' then 'week' - when 'mo' then 'month' - when 'a' then 'year' - else unit end - -define function ToQuantity(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.comparator is not null then Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.') - when quantity.system is null - or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end - -define function ToQuantityIgnoringComparator(quantity FHIR.Quantity): - case - when quantity is null then null - when quantity.value is null then null - when quantity.system is null - or quantity.system.value = 'http://unitsofmeasure.org' - or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } - else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end - -define function ToInterval(quantity FHIR.Quantity): - if quantity is null then null - else case quantity.comparator.value - when '<' then Interval[null, ToQuantityIgnoringComparator(quantity) ) - when '<=' then Interval[null, ToQuantityIgnoringComparator(quantity)] - when '>=' then Interval[ToQuantityIgnoringComparator(quantity), null] - when '>' then Interval ( ToQuantityIgnoringComparator(quantity), null] - else Interval[ToQuantity(quantity), ToQuantity(quantity)]end - -define function ToRatio(ratio FHIR.Ratio): - if ratio is null then null - else System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -define function ToInterval(range FHIR.Range): - if range is null then null - else Interval[ToQuantity(range.low), ToQuantity(range.high)] - -define function ToCode(coding FHIR.Coding): - if coding is null then null - else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value } - -define function ToConcept(concept FHIR.CodeableConcept): - if concept is null then null - else System.Concept { codes: concept.coding C - return ToCode(C), display: concept.text.value } - -define function ToString(value FHIR.uuid): - value.value - -define function ToString(value FHIR.TestScriptRequestMethodCode): - value.value - -define function ToString(value FHIR.BiologicallyDerivedProductStatus): - value.value - -define function ToString(value FHIR.RetirementStatus): - value.value - -define function ToString(value FHIR.UnitsOfTime): - value.value - -define function ToString(value FHIR.AddressType): - value.value - -define function ToString(value FHIR.AllergyIntoleranceCategory): - value.value - -define function ToString(value FHIR.IssueSeverity): - value.value - -define function ToString(value FHIR.CareTeamStatus): - 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.CarePlanActivityKind): - 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.CarePlanActivityStatus): - value.value - -define function ToString(value FHIR.InvoiceStatus): - value.value - -define function ToString(value FHIR.ActionList): - value.value - -define function ToString(value FHIR.ClaimProcessingCodes): - value.value - -define function ToString(value FHIR.ParticipationStatus): - value.value - -define function ToString(value FHIR.DocumentMode): - value.value - -define function ToString(value FHIR.AssertionOperatorType): - value.value - -define function ToString(value FHIR.DaysOfWeek): - value.value - -define function ToString(value FHIR.IssueType): - value.value - -define function ToString(value FHIR.StructureMapContextType): - value.value - -define function ToString(value FHIR.FamilyHistoryStatus): - value.value - -define function ToString(value FHIR.status): - value.value - -define function ToString(value FHIR.AssertionResponseTypes): - value.value - -define function ToString(value FHIR.RequestIntent): - value.value - -define function ToString(value FHIR.string): - value.value - -define function ToString(value FHIR.ActionRequiredBehavior): - value.value - -define function ToString(value FHIR.GraphCompartmentUse): - value.value - -define function ToString(value FHIR.AccountStatus): - value.value - -define function ToString(value FHIR.MedicationDispenseStatus): - value.value - -define function ToString(value FHIR.IdentifierUse): - 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.RequestPriority): - value.value - -define function ToString(value FHIR.ParticipantRequired): - value.value - -define function ToString(value FHIR.XPathUsageType): - value.value - -define function ToString(value FHIR.InstanceAvailability): - value.value - -define function ToString(value FHIR.id): - value.value - -define function ToString(value FHIR.FilterOperator): - value.value - -define function ToString(value FHIR.NamingSystemType): - value.value - -define function ToString(value FHIR.ContractResourceStatusCodes): - value.value - -define function ToString(value FHIR.validationType): - value.value - -define function ToString(value FHIR.ResearchSubjectStatus): - 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.SystemRestfulInteraction): - value.value - -define function ToString(value FHIR.AdverseEventActuality): - value.value - -define function ToString(value FHIR.SubscriptionChannelType): - value.value - -define function ToString(value FHIR.AssertionDirectionType): - value.value - -define function ToString(value FHIR.canPushUpdates): - value.value - -define function ToString(value FHIR.CarePlanIntent): - value.value - -define function ToString(value FHIR.ConsentState): - value.value - -define function ToString(value FHIR.AllergyIntoleranceCriticality): - value.value - -define function ToString(value FHIR.PropertyRepresentation): - value.value - -define function ToString(value FHIR.TriggerType): - 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.ListMode): - value.value - -define function ToString(value FHIR.ObservationStatus): - value.value - -define function ToString(value FHIR.ConsentScopeCodes): - value.value - -define function ToString(value FHIR.ResourceType): - value.value - -define function ToBoolean(value FHIR.boolean): - value.value - -define function ToString(value FHIR.StructureMapGroupTypeMode): - value.value - -define function ToString(value FHIR.SupplyRequestStatus): - value.value - -define function ToString(value FHIR.EncounterLocationStatus): - value.value - -define function ToString(value FHIR.CarePlanStatus): - value.value - -define function ToString(value FHIR.ConditionClinicalStatusCodes): - value.value - -define function ToString(value FHIR.ProcessOutcomeCodes): - value.value - -define function ToString(value FHIR.ConditionalDeleteStatus): - value.value - -define function ToString(value FHIR.NutritionOrderStatus): - value.value - -define function ToString(value FHIR.uri): - value.value - -define function ToString(value FHIR.Use): - value.value - -define function ToString(value FHIR.IdentityAssuranceLevel): - value.value - -define function ToString(value FHIR.DeviceMetricColor): - value.value - -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.SubscriptionStatus): - value.value - -define function ToString(value FHIR.DocumentReferenceStatus): - value.value - -define function ToString(value FHIR.repositoryType): - value.value - -define function ToString(value FHIR.LocationStatus): - value.value - -define function ToString(value FHIR.NoteType): - value.value - -define function ToString(value FHIR.TestReportStatus): - value.value - -define function ToString(value FHIR.CodeSystemContentMode): - 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 - -define function ToString(value FHIR.TypeDerivationRule): - value.value - -define function ToString(value FHIR.GuidanceResponseStatus): - value.value - -define function ToString(value FHIR.RelatedArtifactType): - value.value - -define function ToString(value FHIR.oid): - value.value - -define function ToString(value FHIR.MediaStatus): - value.value - -define function ToString(value FHIR.CompartmentType): - value.value - -define function ToString(value FHIR.DeviceMetricCalibrationState): - value.value - -define function ToString(value FHIR.InvoicePriceComponentType): - value.value - -define function ToString(value FHIR.GroupType): - value.value - -define function ToString(value FHIR.ImmunizationEvaluationStatusCodes): - value.value - -define function ToString(value FHIR.ExampleScenarioActorType): - value.value - -define function ToString(value FHIR.HazardousDutyWork): - value.value - -define function ToString(value FHIR.ProvenanceEntityRole): - value.value - -define function ToString(value FHIR.ContractDataMeaning): - value.value - -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.VisionEyes): - value.value - -define function ToString(value FHIR.ConsentDataMeaning): - value.value - -define function ToString(value FHIR.DocumentRelationshipType): - value.value - -define function ToString(value FHIR.AllergyIntoleranceClinicalStatus): - 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 ToDate(value FHIR.date): - value.value - -define function ToInteger(value FHIR.positiveInt): - value.value - -define function ToString(value FHIR.ClinicalImpressionStatus): - value.value - -define function ToString(value FHIR.NarrativeStatus): - value.value - -define function ToString(value FHIR.MeasmntPrinciple): - 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.BiologicallyDerivedProductCategory): - 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.ConfidentialityClassification): - value.value - -define function ToString(value FHIR.need): - value.value - -define function ToString(value FHIR.HistoryOfEmploymentStatus): - value.value - -define function ToString(value FHIR.DiscriminatorType): - value.value - -define function ToString(value FHIR.StructureMapInputMode): - 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.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.SpecimenContainedPreference): - value.value - -define function ToString(value FHIR.ActionRelationshipType): - value.value - -define function ToString(value FHIR.ConstraintSeverity): - value.value - -define function ToString(value FHIR.failureAction): - value.value - -define function ToString(value FHIR.EventCapabilityMode): - value.value - -define function ToString(value FHIR.CodeSearchSupport): - value.value - -define function ToString(value FHIR.UDIEntryType): - value.value - -define function ToString(value FHIR.UserSessionStatus): - value.value - -define function ToString(value FHIR.UserSessionStatusSource): - value.value - -define function ToString(value FHIR.DeviceMetricCategory): - value.value - -define function ToString(value FHIR.TestReportActionResult): - value.value - -define function ToString(value FHIR.CapabilityStatementKind): - 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.ActionGroupingBehavior): - value.value - -define function ToString(value FHIR.StructureMapModelMode): - value.value - -define function ToString(value FHIR.TaskStatus): - value.value - -define function ToString(value FHIR.BiologicallyDerivedProductStorageScale): - value.value - -define function ToString(value FHIR.GraphCompartmentRule): - value.value - -define function ToString(value FHIR.pushTypeAvailable): - value.value - -define function ToString(value FHIR.SlicingRules): - value.value - -define function ToString(value FHIR.ExplanationOfBenefitStatus): - value.value - -define function ToString(value FHIR.LinkType): - value.value - -define function ToString(value FHIR.ConceptMapEquivalence): - value.value - -define function ToString(value FHIR.FHIRAllTypes): - value.value - -define function ToString(value FHIR.AuditEventAction): - value.value - -define function ToString(value FHIR.SearchModifierCode): - value.value - -define function ToString(value FHIR.EventStatus): - value.value - -define function ToString(value FHIR.OperationParameterUse): - value.value - -define function ToString(value FHIR.ConsentProvisionType): - value.value - -define function ToString(value FHIR.ActionConditionKind): - value.value - -define function ToString(value FHIR.qualityType): - value.value - -define function ToString(value FHIR.AdministrativeGender): - value.value - -define function ToString(value FHIR.QuestionnaireItemType): - value.value - -define function ToString(value FHIR.DeviceMetricCalibrationType): - value.value - -define function ToString(value FHIR.code): - value.value - -define function ToString(value FHIR.ActionSelectionBehavior): - 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.UsualOccupation): - value.value - -define function ToString(value FHIR.ListStatus): - value.value - -define function ToBase64Binary(value FHIR.base64Binary): - value.value - -define function ToString(value FHIR.DeviceUseStatementStatus): - value.value - -define function ToString(value FHIR.AuditEventAgentNetworkType): - value.value - -define function ToString(value FHIR.ExpressionLanguage): - value.value - -define function ToString(value FHIR.AddressUse): - value.value - -define function ToString(value FHIR.ContactPointUse): - value.value - -define function ToString(value FHIR.DeviceMetricOperationalStatus): - value.value - -define function ToString(value FHIR.ContributorType): - value.value - -define function ToString(value FHIR.ReferenceVersionRules): - value.value - -define function ToString(value FHIR.MeasureReportStatus): - value.value - -define function ToString(value FHIR.SearchEntryMode): - value.value - -define function ToInteger(value FHIR.unsignedInt): - value.value - -define function ToString(value FHIR.NameUse): - value.value - -define function ToString(value FHIR.LocationMode): - value.value - -define function ToInteger(value FHIR.integer): - value.value - -define function ToString(value FHIR.FHIRSubstanceStatus): - value.value - -define function ToString(value FHIR.UnknownContentCode): - value.value - -define function ToString(value FHIR.HTTPVerb): - value.value - -define function ToString(value FHIR.EpisodeOfCareStatus): - value.value - -define function ToString(value FHIR.RemittanceOutcome): - value.value - -define function ToString(value FHIR.markdown): - value.value - -define function ToString(value FHIR.MedicationStatementStatus): - value.value - -define function ToString(value FHIR.QuantityComparator): - 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.CompositionAttestationMode): - value.value - -define function ToString(value FHIR.TypeRestfulInteraction): - value.value - -define function ToString(value FHIR.CodeSystemHierarchyMeaning): - value.value - -define function ToString(value FHIR.validationStatus): - 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 \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql deleted file mode 100644 index 8defc292f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql +++ /dev/null @@ -1,240 +0,0 @@ -library OutpatientPriorAuthorizationPrepopulation version '1.0.0' - -using FHIR version '4.0.1' - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - - - -include FHIRHelpers version '4.0.001' called FHIRHelpers -// valueset "AAN MCI Encounters Outpt and Care Plan": 'https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1040' - -/* parameter EncounterId String */ - - - -parameter ClaimId String default '14703' - -context Patient - -define ClaimResource: - First([Claim] C - where C.id = ClaimId - ) - -define OrganizationFacility: - First([Organization] O - where EndsWith(ClaimResource.provider.reference, O.id) - ) - -define "FacilityName": - OrganizationFacility.name.value - -define "FacilityNPI": - ( OrganizationFacility.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define function FindPractitioner(myCode String, mySequence Integer): - //If we can't find a Primary practicioner by code, use the sequence as a fallback. - - Coalesce(First([Practitioner] P //Practitioner who is on the careteam and contains a code that equals supplied code - - where EndsWith(First(ClaimResource.careTeam CT - where exists(CT.role.coding CTCode - where CTCode.code.value = myCode - ) - ).provider.reference, P.id - ) - ), First([Practitioner] P //Practitioner who is on the careteam and is of the supplied sequence - - where EndsWith(First(ClaimResource.careTeam CT - where CT.sequence = mySequence - ).provider.reference, P.id - ) - ) - ) - -define PractitionerOperatingPhysician: - FindPractitioner('primary', 1) - -define PractitionerAttendingPhysician: - FindPractitioner('assist', 2) - -// Should probably be seperate, Utiltiy files; but just for practice: - -//PATIENT INFO - - - -define OfficialName: - First(Patient.name name - where name.use.value = 'official' - ) - -define FirstName: - Patient.name[0] - -define BeneficiaryName: - Coalesce(OfficialName, FirstName) - -define "BeneficiaryFirstName": - BeneficiaryName.given[0].value - -define "BeneficiaryLastName": - BeneficiaryName.family.value - -define "BeneficiaryDOB": - Patient.birthDate.value - -define "BeneficiaryGender": - Patient.gender.value - -define RequestCoverage: - ClaimResource.insurance - -define CoverageResource: - First([Coverage] coverage - // pull coverage resource id from the service request insurance extension - - where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) - ) - -define "BeneficiaryMedicareID": - CoverageResource.subscriberId.value - -// OPERATING PHYSICIAN INFO - - -define "OperatingPhysicianFirstName": - PractitionerOperatingPhysician.name.given[0].value - -define "OperatingPhysicianLastName": - PractitionerOperatingPhysician.name.family.value - -define "OperatingPhysicianNPI": - ( PractitionerOperatingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define OperatingPhysicianAddress: - First(PractitionerOperatingPhysician.address address - where address.use.value = 'work' - ) - -define "OperatingPhysicianAddress1": - OperatingPhysicianAddress.line[0].value - -define "OperatingPhysicianAddress2": - OperatingPhysicianAddress.line[1].value - -define "OperatingPhysicianAddressCity": - OperatingPhysicianAddress.city.value - -define "OperatingPhysicianAddressState": - OperatingPhysicianAddress.state.value - -define "OperatingPhysicianAddressZip": - OperatingPhysicianAddress.postalCode.value - -// Attending PHYSICIAN INFO - - -define "AttendingPhysicianSame": - case - when PractitionerAttendingPhysician is not null then false - else true end - -define "AttendingPhysicianFirstName": - PractitionerAttendingPhysician.name.given[0].value - -define "AttendingPhysicianLastName": - PractitionerAttendingPhysician.name.family.value - -define "AttendingPhysicianNPI": - ( PractitionerAttendingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define AttendingPhysicianAddressWork: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'work' - ) - -define AttendingPhysicianAddressHome: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'home' - ) - -define AttendingPhysicianAddress: - Coalesce(AttendingPhysicianAddressWork, AttendingPhysicianAddressHome) - -define "AttendingPhysicianAddress1": - AttendingPhysicianAddress.line[0].value - -define "AttendingPhysicianAddress2": - AttendingPhysicianAddress.line[1].value - -define "AttendingPhysicianAddressCity": - AttendingPhysicianAddress.city.value - -define "AttendingPhysicianAddressState": - AttendingPhysicianAddress.state.value - -define "AttendingPhysicianAddressZip": - AttendingPhysicianAddress.postalCode.value - -//CLAIM INFORMATION - - -define ClaimDiagnosisReferenced: - First([Condition] C - where //First condition referenced by the Claim - exists(ClaimResource.diagnosis.diagnosis Condition - where EndsWith(Condition.reference, C.id) - ) - ).code.coding[0].code.value - -define ClaimDiagnosisCode: - ClaimResource.diagnosis.diagnosis.coding[0].code.value //TODO: Check for primary vs. secondary? - - -define "RequestDetailsPrimaryDiagnosisCode": - Coalesce(ClaimDiagnosisCode, ClaimDiagnosisReferenced) - -//PROCEDURE INFORMATION - - -define RelevantReferencedProcedures: - [Procedure] P - where P.status.value != 'completed' - and exists ( ClaimResource.procedure Procedure - where EndsWith(Procedure.procedure.reference, P.id) - ) - -define function FindProcedure(proc String): - exists ( ClaimResource.procedure.procedure.coding P - where P.code.value = proc - ) - or exists ( RelevantReferencedProcedures.code.coding coding - where coding.code.value = proc - ) - -define "RequestDetailsProcedureCode64612": - FindProcedure('64612') - -define "RequestDetailsProcedureCodeJ0586": - FindProcedure('J0586') - -define "RequestDetailsProcedureCode64615": - FindProcedure('64615') - -define "RequestDetailsProcedureCode20912": - FindProcedure('20912') - -define "RequestDetailsProcedureCode36478": - FindProcedure('36478') - -define "RequestDetailsProcedureCode22551": - FindProcedure('22551') \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Library-FHIRHelpers.json deleted file mode 100644 index 643e6e67f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Library-FHIRHelpers.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRHelpers", - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "4.0.001", - "name": "FHIRHelpers", - "title": "FHIR Helpers", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRHelpers.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json deleted file mode 100644 index de46c31b2..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "resourceType": "Library", - "id": "OutpatientPriorAuthorizationPrepopulation", - "meta": { - "versionId": "4", - "lastUpdated": "2023-01-04T22:42:31.776+00:00", - "source": "#jvktlnzFIHZuPkeq" - }, - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationPrepopulation", - "title": "Outpatient Prior Authorization Prepopulation", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "relatedArtifact": [ - { - "type": "depends-on", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|1.0.0" - } - ], - "dataRequirement": [ - { - "type": "ServiceRequest" - }, - { - "type": "Procedure" - }, - { - "type": "Claim" - }, - { - "type": "Organization" - }, - { - "type": "Practitioner" - }, - { - "type": "Coverage" - }, - { - "type": "Condition" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/OutpatientPriorAuthorizationPrepopulation.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-definition.json deleted file mode 100644 index 905f66c0a..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-definition.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "definition", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorization-prepopulation" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://hl7.org/fhir/us/davinci-dtr/Library/BasicPatientInfo-prepopulation" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/definition", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueCode": "Organization" - } - ], - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "definition": "http://hl7.org/fhir/Organization#Organization.name", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityContractRegion" - } - } - ], - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueCode": "Patient" - } - ], - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "definition": "http://hl7.org/fhir/Patient#Patient.name.given", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "definition": "http://hl7.org/fhir/Patient#Patient.name.family", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "definition": "http://hl7.org/fhir/Patient#Patient.birthDate", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "2.4.0", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.system", - "type": "string", - "initial": [ - { - "valueString": "http://hl7.org/fhir/sid/us-medicare" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.value", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "definition": "http://hl7.org/fhir/Patient#Patient.gender", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/vocabulary/CodeSystem/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/vocabulary/CodeSystem/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/vocabulary/ValueSet/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/vocabulary/ValueSet/ValueSet-AdministrativeGender.json deleted file mode 100644 index 156220f9b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/vocabulary/ValueSet/ValueSet-AdministrativeGender.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "AdministrativeGender", - "meta": { - "versionId": "1", - "lastUpdated": "2022-02-11T20:37:50.811+00:00", - "source": "#5pAPnFaiCW12WWid" - }, - "url": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender", - "version": "1.1.0", - "name": "AdministrativeGender", - "title": "Administrative Gender", - "status": "draft", - "date": "2022-04-04T23:44:44+00:00", - "publisher": "Health Level Seven International", - "contact": [ - { - "name": "HL7 International - Public Health", - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pher" - } - ] - }, - { - "name": "Cynthia Bush, Health Scientist (Informatics), CDC/National Center for Health Statistics", - "telecom": [ - { - "system": "email", - "value": "pdz1@cdc.gov" - } - ] - }, - { - "name": "AbdulMalik Shakir, FHL7, President and Chief Informatics Scientist Hi3 Solutions", - "telecom": [ - { - "system": "email", - "value": "abdulmalik.shakir@hi3solutions.com" - } - ] - } - ], - "description": "The gender of a person used for administrative purposes.\n\n**Inter-jurisdictional Exchange (IJE) concept mapping**\n\n|VRDR IG Code | VRDR IG Display Name | IJE Code |IJE Display Name\n| -------- | -------- | -------- | --------|\n|male|Male|M|Male|\n|female|Female|F|Female|\n|UNK|unknown|U|Unknown|", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ], - "text": "US Realm" - } - ], - "compose": { - "include": [ - { - "system": "http://hl7.org/fhir/administrative-gender", - "concept": [ - { - "code": "male", - "display": "Male" - }, - { - "code": "female", - "display": "Female" - } - ] - }, - { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "concept": [ - { - "code": "UNK", - "display": "unknown" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/FHIRHelpers.cql deleted file mode 100644 index e941c378b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/FHIRHelpers.cql +++ /dev/null @@ -1,807 +0,0 @@ -library FHIRHelpers version '4.0.001' - -using FHIR version '4.0.1' - -context Patient - -define function "ToInterval"(period FHIR.Period): - if period is null then null - else Interval[period."start".value, period."end".value] - -define function "ToQuantity"(quantity FHIR.Quantity): - if quantity is null then null - else System.Quantity { value: quantity.value.value, unit: quantity.unit.value } - -define function "ToRatio"(ratio FHIR.Ratio): - if ratio is null then null - else System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -define function "ToInterval"(range FHIR.Range): - if range is null then null - else Interval[ToQuantity(range.low), ToQuantity(range.high)] - -define function "ToCode"(coding FHIR.Coding): - if coding is null then null - else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value } - -define function "ToConcept"(concept FHIR.CodeableConcept): - if concept is null then null - else System.Concept { codes: concept.coding C - return ToCode(C), display: concept.text.value } - -define function "ToString"(value AccountStatus): - value.value - -define function "ToString"(value ActionCardinalityBehavior): - value.value - -define function "ToString"(value ActionConditionKind): - value.value - -define function "ToString"(value ActionGroupingBehavior): - value.value - -define function "ToString"(value ActionParticipantType): - value.value - -define function "ToString"(value ActionPrecheckBehavior): - value.value - -define function "ToString"(value ActionRelationshipType): - value.value - -define function "ToString"(value ActionRequiredBehavior): - value.value - -define function "ToString"(value ActionSelectionBehavior): - value.value - -define function "ToString"(value ActivityDefinitionKind): - value.value - -define function "ToString"(value ActivityParticipantType): - value.value - -define function "ToString"(value AddressType): - value.value - -define function "ToString"(value AddressUse): - value.value - -define function "ToString"(value AdministrativeGender): - value.value - -define function "ToString"(value AdverseEventActuality): - value.value - -define function "ToString"(value AggregationMode): - value.value - -define function "ToString"(value AllergyIntoleranceCategory): - value.value - -define function "ToString"(value AllergyIntoleranceCriticality): - value.value - -define function "ToString"(value AllergyIntoleranceSeverity): - value.value - -define function "ToString"(value AllergyIntoleranceType): - value.value - -define function "ToString"(value AppointmentStatus): - value.value - -define function "ToString"(value AssertionDirectionType): - value.value - -define function "ToString"(value AssertionOperatorType): - value.value - -define function "ToString"(value AssertionResponseTypes): - value.value - -define function "ToString"(value AuditEventAction): - value.value - -define function "ToString"(value AuditEventAgentNetworkType): - value.value - -define function "ToString"(value AuditEventOutcome): - value.value - -define function "ToString"(value BindingStrength): - value.value - -define function "ToString"(value BiologicallyDerivedProductCategory): - value.value - -define function "ToString"(value BiologicallyDerivedProductStatus): - value.value - -define function "ToString"(value BiologicallyDerivedProductStorageScale): - value.value - -define function "ToString"(value BundleType): - value.value - -define function "ToString"(value CapabilityStatementKind): - value.value - -define function "ToString"(value CarePlanActivityKind): - value.value - -define function "ToString"(value CarePlanActivityStatus): - value.value - -define function "ToString"(value CarePlanIntent): - value.value - -define function "ToString"(value CarePlanStatus): - value.value - -define function "ToString"(value CareTeamStatus): - value.value - -define function "ToString"(value CatalogEntryRelationType): - value.value - -define function "ToString"(value ChargeItemDefinitionPriceComponentType): - value.value - -define function "ToString"(value ChargeItemStatus): - value.value - -define function "ToString"(value ClaimResponseStatus): - value.value - -define function "ToString"(value ClaimStatus): - value.value - -define function "ToString"(value ClinicalImpressionStatus): - value.value - -define function "ToString"(value CodeSearchSupport): - value.value - -define function "ToString"(value CodeSystemContentMode): - value.value - -define function "ToString"(value CodeSystemHierarchyMeaning): - value.value - -define function "ToString"(value CommunicationPriority): - value.value - -define function "ToString"(value CommunicationRequestStatus): - value.value - -define function "ToString"(value CommunicationStatus): - value.value - -define function "ToString"(value CompartmentCode): - value.value - -define function "ToString"(value CompartmentType): - value.value - -define function "ToString"(value CompositionAttestationMode): - value.value - -define function "ToString"(value CompositionStatus): - value.value - -define function "ToString"(value ConceptMapEquivalence): - value.value - -define function "ToString"(value ConceptMapGroupUnmappedMode): - value.value - -define function "ToString"(value ConditionalDeleteStatus): - value.value - -define function "ToString"(value ConditionalReadStatus): - value.value - -define function "ToString"(value ConsentDataMeaning): - value.value - -define function "ToString"(value ConsentProvisionType): - value.value - -define function "ToString"(value ConsentState): - value.value - -define function "ToString"(value ConstraintSeverity): - value.value - -define function "ToString"(value ContactPointSystem): - value.value - -define function "ToString"(value ContactPointUse): - value.value - -define function "ToString"(value ContractPublicationStatus): - value.value - -define function "ToString"(value ContractStatus): - value.value - -define function "ToString"(value ContributorType): - value.value - -define function "ToString"(value CoverageStatus): - value.value - -define function "ToString"(value CurrencyCode): - value.value - -define function "ToString"(value DayOfWeek): - value.value - -define function "ToString"(value DaysOfWeek): - value.value - -define function "ToString"(value DetectedIssueSeverity): - value.value - -define function "ToString"(value DetectedIssueStatus): - value.value - -define function "ToString"(value DeviceMetricCalibrationState): - value.value - -define function "ToString"(value DeviceMetricCalibrationType): - value.value - -define function "ToString"(value DeviceMetricCategory): - value.value - -define function "ToString"(value DeviceMetricColor): - value.value - -define function "ToString"(value DeviceMetricOperationalStatus): - value.value - -define function "ToString"(value DeviceNameType): - value.value - -define function "ToString"(value DeviceRequestStatus): - value.value - -define function "ToString"(value DeviceUseStatementStatus): - value.value - -define function "ToString"(value DiagnosticReportStatus): - value.value - -define function "ToString"(value DiscriminatorType): - value.value - -define function "ToString"(value DocumentConfidentiality): - value.value - -define function "ToString"(value DocumentMode): - value.value - -define function "ToString"(value DocumentReferenceStatus): - value.value - -define function "ToString"(value DocumentRelationshipType): - value.value - -define function "ToString"(value EligibilityRequestPurpose): - value.value - -define function "ToString"(value EligibilityRequestStatus): - value.value - -define function "ToString"(value EligibilityResponsePurpose): - value.value - -define function "ToString"(value EligibilityResponseStatus): - value.value - -define function "ToString"(value EnableWhenBehavior): - value.value - -define function "ToString"(value EncounterLocationStatus): - value.value - -define function "ToString"(value EncounterStatus): - value.value - -define function "ToString"(value EndpointStatus): - value.value - -define function "ToString"(value EnrollmentRequestStatus): - value.value - -define function "ToString"(value EnrollmentResponseStatus): - value.value - -define function "ToString"(value EpisodeOfCareStatus): - value.value - -define function "ToString"(value EventCapabilityMode): - value.value - -define function "ToString"(value EventTiming): - value.value - -define function "ToString"(value EvidenceVariableType): - value.value - -define function "ToString"(value ExampleScenarioActorType): - value.value - -define function "ToString"(value ExplanationOfBenefitStatus): - value.value - -define function "ToString"(value ExposureState): - value.value - -define function "ToString"(value ExtensionContextType): - value.value - -define function "ToString"(value FHIRAllTypes): - value.value - -define function "ToString"(value FHIRDefinedType): - value.value - -define function "ToString"(value FHIRDeviceStatus): - value.value - -define function "ToString"(value FHIRResourceType): - value.value - -define function "ToString"(value FHIRSubstanceStatus): - value.value - -define function "ToString"(value FHIRVersion): - value.value - -define function "ToString"(value FamilyHistoryStatus): - value.value - -define function "ToString"(value FilterOperator): - value.value - -define function "ToString"(value FlagStatus): - value.value - -define function "ToString"(value GoalLifecycleStatus): - value.value - -define function "ToString"(value GraphCompartmentRule): - value.value - -define function "ToString"(value GraphCompartmentUse): - value.value - -define function "ToString"(value GroupMeasure): - value.value - -define function "ToString"(value GroupType): - value.value - -define function "ToString"(value GuidanceResponseStatus): - value.value - -define function "ToString"(value GuidePageGeneration): - value.value - -define function "ToString"(value GuideParameterCode): - value.value - -define function "ToString"(value HTTPVerb): - value.value - -define function "ToString"(value IdentifierUse): - value.value - -define function "ToString"(value IdentityAssuranceLevel): - value.value - -define function "ToString"(value ImagingStudyStatus): - value.value - -define function "ToString"(value ImmunizationEvaluationStatus): - value.value - -define function "ToString"(value ImmunizationStatus): - value.value - -define function "ToString"(value InvoicePriceComponentType): - value.value - -define function "ToString"(value InvoiceStatus): - value.value - -define function "ToString"(value IssueSeverity): - value.value - -define function "ToString"(value IssueType): - value.value - -define function "ToString"(value LinkType): - value.value - -define function "ToString"(value LinkageType): - value.value - -define function "ToString"(value ListMode): - value.value - -define function "ToString"(value ListStatus): - value.value - -define function "ToString"(value LocationMode): - value.value - -define function "ToString"(value LocationStatus): - value.value - -define function "ToString"(value MeasureReportStatus): - value.value - -define function "ToString"(value MeasureReportType): - value.value - -define function "ToString"(value MediaStatus): - value.value - -define function "ToString"(value MedicationAdministrationStatus): - value.value - -define function "ToString"(value MedicationDispenseStatus): - value.value - -define function "ToString"(value MedicationKnowledgeStatus): - value.value - -define function "ToString"(value MedicationRequestIntent): - value.value - -define function "ToString"(value MedicationRequestPriority): - value.value - -define function "ToString"(value MedicationRequestStatus): - value.value - -define function "ToString"(value MedicationStatementStatus): - value.value - -define function "ToString"(value MedicationStatus): - value.value - -define function "ToString"(value MessageSignificanceCategory): - value.value - -define function "ToString"(value Messageheader_Response_Request): - value.value - -define function "ToString"(value MimeType): - value.value - -define function "ToString"(value NameUse): - value.value - -define function "ToString"(value NamingSystemIdentifierType): - value.value - -define function "ToString"(value NamingSystemType): - value.value - -define function "ToString"(value NarrativeStatus): - value.value - -define function "ToString"(value NoteType): - value.value - -define function "ToString"(value NutritiionOrderIntent): - value.value - -define function "ToString"(value NutritionOrderStatus): - value.value - -define function "ToString"(value ObservationDataType): - value.value - -define function "ToString"(value ObservationRangeCategory): - value.value - -define function "ToString"(value ObservationStatus): - value.value - -define function "ToString"(value OperationKind): - value.value - -define function "ToString"(value OperationParameterUse): - value.value - -define function "ToString"(value OrientationType): - value.value - -define function "ToString"(value ParameterUse): - value.value - -define function "ToString"(value ParticipantRequired): - value.value - -define function "ToString"(value ParticipantStatus): - value.value - -define function "ToString"(value ParticipationStatus): - value.value - -define function "ToString"(value PaymentNoticeStatus): - value.value - -define function "ToString"(value PaymentReconciliationStatus): - value.value - -define function "ToString"(value ProcedureStatus): - value.value - -define function "ToString"(value PropertyRepresentation): - value.value - -define function "ToString"(value PropertyType): - value.value - -define function "ToString"(value ProvenanceEntityRole): - value.value - -define function "ToString"(value PublicationStatus): - value.value - -define function "ToString"(value QualityType): - value.value - -define function "ToString"(value QuantityComparator): - value.value - -define function "ToString"(value QuestionnaireItemOperator): - value.value - -define function "ToString"(value QuestionnaireItemType): - value.value - -define function "ToString"(value QuestionnaireResponseStatus): - value.value - -define function "ToString"(value ReferenceHandlingPolicy): - value.value - -define function "ToString"(value ReferenceVersionRules): - value.value - -define function "ToString"(value ReferredDocumentStatus): - value.value - -define function "ToString"(value RelatedArtifactType): - value.value - -define function "ToString"(value RemittanceOutcome): - value.value - -define function "ToString"(value RepositoryType): - value.value - -define function "ToString"(value RequestIntent): - value.value - -define function "ToString"(value RequestPriority): - value.value - -define function "ToString"(value RequestStatus): - value.value - -define function "ToString"(value ResearchElementType): - value.value - -define function "ToString"(value ResearchStudyStatus): - value.value - -define function "ToString"(value ResearchSubjectStatus): - value.value - -define function "ToString"(value ResourceType): - value.value - -define function "ToString"(value ResourceVersionPolicy): - value.value - -define function "ToString"(value ResponseType): - value.value - -define function "ToString"(value RestfulCapabilityMode): - value.value - -define function "ToString"(value RiskAssessmentStatus): - value.value - -define function "ToString"(value SPDXLicense): - value.value - -define function "ToString"(value SearchComparator): - value.value - -define function "ToString"(value SearchEntryMode): - value.value - -define function "ToString"(value SearchModifierCode): - value.value - -define function "ToString"(value SearchParamType): - value.value - -define function "ToString"(value SectionMode): - value.value - -define function "ToString"(value SequenceType): - value.value - -define function "ToString"(value ServiceRequestIntent): - value.value - -define function "ToString"(value ServiceRequestPriority): - value.value - -define function "ToString"(value ServiceRequestStatus): - value.value - -define function "ToString"(value SlicingRules): - value.value - -define function "ToString"(value SlotStatus): - value.value - -define function "ToString"(value SortDirection): - value.value - -define function "ToString"(value SpecimenContainedPreference): - value.value - -define function "ToString"(value SpecimenStatus): - value.value - -define function "ToString"(value Status): - value.value - -define function "ToString"(value StrandType): - value.value - -define function "ToString"(value StructureDefinitionKind): - value.value - -define function "ToString"(value StructureMapContextType): - value.value - -define function "ToString"(value StructureMapGroupTypeMode): - value.value - -define function "ToString"(value StructureMapInputMode): - value.value - -define function "ToString"(value StructureMapModelMode): - value.value - -define function "ToString"(value StructureMapSourceListMode): - value.value - -define function "ToString"(value StructureMapTargetListMode): - value.value - -define function "ToString"(value StructureMapTransform): - value.value - -define function "ToString"(value SubscriptionChannelType): - value.value - -define function "ToString"(value SubscriptionStatus): - value.value - -define function "ToString"(value SupplyDeliveryStatus): - value.value - -define function "ToString"(value SupplyRequestStatus): - value.value - -define function "ToString"(value SystemRestfulInteraction): - value.value - -define function "ToString"(value TaskIntent): - value.value - -define function "ToString"(value TaskPriority): - value.value - -define function "ToString"(value TaskStatus): - value.value - -define function "ToString"(value TestReportActionResult): - value.value - -define function "ToString"(value TestReportParticipantType): - value.value - -define function "ToString"(value TestReportResult): - value.value - -define function "ToString"(value TestReportStatus): - value.value - -define function "ToString"(value TestScriptRequestMethodCode): - value.value - -define function "ToString"(value TriggerType): - value.value - -define function "ToString"(value TypeDerivationRule): - value.value - -define function "ToString"(value TypeRestfulInteraction): - value.value - -define function "ToString"(value UDIEntryType): - value.value - -define function "ToString"(value UnitsOfTime): - value.value - -define function "ToString"(value Use): - value.value - -define function "ToString"(value VariableType): - value.value - -define function "ToString"(value VisionBase): - value.value - -define function "ToString"(value VisionEyes): - value.value - -define function "ToString"(value VisionStatus): - value.value - -define function "ToString"(value XPathUsageType): - value.value - -define function "ToString"(value base64Binary): - value.value - -define function "ToString"(value id): - value.value - -define function "ToBoolean"(value boolean): - value.value - -define function "ToDate"(value date): - value.value - -define function "ToDateTime"(value dateTime): - value.value - -define function "ToDecimal"(value decimal): - value.value - -define function "ToDateTime"(value instant): - value.value - -define function "ToInteger"(value integer): - value.value - -define function "ToString"(value string): - value.value - -define function "ToTime"(value time): - value.value - -define function "ToString"(value uri): - value.value - -define function "ToString"(value xhtml): - value.value \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/HelloWorld.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/HelloWorld.cql deleted file mode 100644 index 08a64478d..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/HelloWorld.cql +++ /dev/null @@ -1,29 +0,0 @@ -library HelloWorld version '1.0.0' - -using FHIR version '4.0.1' - -/* include FHIRHelpers version '4.0.1'*/ - - -context Patient - -define "Info": - 'info' - -define "Warning": - 'warning' - -define "Critical": - 'critical' - -define "Main Action Condition Expression Is True": - true - -define "Get Title": - 'Hello World!' - -define "Get Description": - 'The CDS Service is alive and communicating successfully!' - -define "Get Indicator": - 'info' \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql deleted file mode 100644 index 291662050..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql +++ /dev/null @@ -1,286 +0,0 @@ -library OutpatientPriorAuthorizationPrepopulation version '1.0.0' - -using FHIR version '4.0.1' - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - - - - - -include - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - -FHIRHelpers - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - -version - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - -'4.0.001' - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - -called - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - -FHIRHelpers - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers -// valueset "AAN MCI Encounters Outpt and Care Plan": 'https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1040' - -/* parameter EncounterId String */ - - - - - -parameter -// valueset "AAN MCI Encounters Outpt and Care Plan": 'https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1040' - -/* parameter EncounterId String */ - -ClaimId String default '14703' - -context Patient - -define "Claim Is Applicable": - true - -define ClaimResource: - First([Claim] C - where C.id = ClaimId - ) - -define OrganizationFacility: - First([Organization] O - where EndsWith(ClaimResource.provider.reference, O.id) - ) - -define "FacilityName": - OrganizationFacility.name.value - -define "FacilityNPI": - ( OrganizationFacility.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define function FindPractitioner(myCode String, mySequence Integer): - //If we can't find a Primary practicioner by code, use the sequence as a fallback. - - Coalesce(First([Practitioner] P //Practitioner who is on the careteam and contains a code that equals supplied code - - where EndsWith(First(ClaimResource.careTeam CT - where exists(CT.role.coding CTCode - where CTCode.code.value = myCode - ) - ).provider.reference, P.id - ) - ), First([Practitioner] P //Practitioner who is on the careteam and is of the supplied sequence - - where EndsWith(First(ClaimResource.careTeam CT - where CT.sequence = mySequence - ).provider.reference, P.id - ) - ) - ) - -define PractitionerOperatingPhysician: - FindPractitioner('primary', 1) - -define PractitionerAttendingPhysician: - FindPractitioner('assist', 2) - -// Should probably be seperate, Utiltiy files; but just for practice: - -//PATIENT INFO - - - -define OfficialName: - First(Patient.name name - where name.use.value = 'official' - ) - -define FirstName: - Patient.name[0] - -define BeneficiaryName: - Coalesce(OfficialName, FirstName) - -define "BeneficiaryFirstName": - BeneficiaryName.given[0].value - -define "BeneficiaryFirstNames": - BeneficiaryName.given - -define "BeneficiaryLastName": - BeneficiaryName.family.value - -define "BeneficiaryDOB": - Patient.birthDate.value - -define "BeneficiaryGender": - Patient.gender.value - -define RequestCoverage: - ClaimResource.insurance - -define CoverageResource: - First([Coverage] coverage - // pull coverage resource id from the service request insurance extension - - where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) - ) - -define "BeneficiaryMedicareID": - CoverageResource.subscriberId.value - -// OPERATING PHYSICIAN INFO - - -define "OperatingPhysicianFirstName": - PractitionerOperatingPhysician.name.given[0].value - -define "OperatingPhysicianLastName": - PractitionerOperatingPhysician.name.family.value - -define "OperatingPhysicianNPI": - ( PractitionerOperatingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define OperatingPhysicianAddress: - First(PractitionerOperatingPhysician.address address - where address.use.value = 'work' - ) - -define "OperatingPhysicianAddress1": - OperatingPhysicianAddress.line[0].value - -define "OperatingPhysicianAddress2": - OperatingPhysicianAddress.line[1].value - -define "OperatingPhysicianAddressCity": - OperatingPhysicianAddress.city.value - -define "OperatingPhysicianAddressState": - OperatingPhysicianAddress.state.value - -define "OperatingPhysicianAddressZip": - OperatingPhysicianAddress.postalCode.value - -// Attending PHYSICIAN INFO - - -define "AttendingPhysicianSame": - case - when PractitionerAttendingPhysician is not null then false - else true end - -define "AttendingPhysicianFirstName": - PractitionerAttendingPhysician.name.given[0].value - -define "AttendingPhysicianLastName": - PractitionerAttendingPhysician.name.family.value - -define "AttendingPhysicianNPI": - ( PractitionerAttendingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define AttendingPhysicianAddressWork: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'work' - ) - -define AttendingPhysicianAddressHome: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'home' - ) - -define AttendingPhysicianAddress: - Coalesce(AttendingPhysicianAddressWork, AttendingPhysicianAddressHome) - -define "AttendingPhysicianAddress1": - AttendingPhysicianAddress.line[0].value - -define "AttendingPhysicianAddress2": - AttendingPhysicianAddress.line[1].value - -define "AttendingPhysicianAddressCity": - AttendingPhysicianAddress.city.value - -define "AttendingPhysicianAddressState": - AttendingPhysicianAddress.state.value - -define "AttendingPhysicianAddressZip": - AttendingPhysicianAddress.postalCode.value - -//CLAIM INFORMATION - - -define ClaimDiagnosisReferenced: - First([Condition] C - where //First condition referenced by the Claim - exists(ClaimResource.diagnosis.diagnosis Condition - where EndsWith(Condition.reference, C.id) - ) - ).code.coding[0].code.value - -define ClaimDiagnosisCode: - ClaimResource.diagnosis.diagnosis.coding[0].code.value //TODO: Check for primary vs. secondary? - - -define "RequestDetailsPrimaryDiagnosisCode": - Coalesce(ClaimDiagnosisCode, ClaimDiagnosisReferenced) - -//PROCEDURE INFORMATION - - -define RelevantReferencedProcedures: - [Procedure] P - where P.status.value != 'completed' - and exists ( ClaimResource.procedure Procedure - where EndsWith(Procedure.procedure.reference, P.id) - ) - -define function FindProcedure(proc String): - exists ( ClaimResource.procedure.procedure.coding P - where P.code.value = proc - ) - or exists ( RelevantReferencedProcedures.code.coding coding - where coding.code.value = proc - ) - -define "RequestDetailsProcedureCode64612": - FindProcedure('64612') - -define "RequestDetailsProcedureCodeJ0586": - FindProcedure('J0586') - -define "RequestDetailsProcedureCode64615": - FindProcedure('64615') - -define "RequestDetailsProcedureCode20912": - FindProcedure('20912') - -define "RequestDetailsProcedureCode36478": - FindProcedure('36478') - -define "RequestDetailsProcedureCode22551": - FindProcedure('22551') \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/ActivityDefinition-complete-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/ActivityDefinition-complete-questionnaire.json deleted file mode 100644 index 8d6738bec..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/ActivityDefinition-complete-questionnaire.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "resourceType": "ActivityDefinition", - "id": "complete-questionnaire", - "url": "http://fhir.org/guides/cdc/opioid-cds/ActivityDefinition/complete-questionnaire", - "name": "ActivityDefinition_CompleteQuestionnaire", - "title": "CompleteQuestionnaire", - "status": "draft", - "description": "Create a task to complete a Questionnaire.", - "library": [], - "kind": "Task", - "productCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/CodeSystem/task-code", - "code": "approve" - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-FHIRHelpers.json deleted file mode 100644 index 36b6cadff..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-FHIRHelpers.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRHelpers", - "url": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers", - "version": "4.0.001", - "name": "FHIRHelpers", - "title": "FHIR Helpers", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRHelpers.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json deleted file mode 100644 index 8cdb7cbd1..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "resourceType": "Library", - "id": "OutpatientPriorAuthorizationPrepopulation", - "meta": { - "versionId": "4", - "lastUpdated": "2023-01-04T22:42:31.776+00:00", - "source": "#jvktlnzFIHZuPkeq" - }, - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationPrepopulation", - "title": "Outpatient Prior Authorization Prepopulation", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "relatedArtifact": [ - { - "type": "depends-on", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.001" - } - ], - "dataRequirement": [ - { - "type": "ServiceRequest" - }, - { - "type": "Procedure" - }, - { - "type": "Claim" - }, - { - "type": "Organization" - }, - { - "type": "Practitioner" - }, - { - "type": "Coverage" - }, - { - "type": "Condition" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/OutpatientPriorAuthorizationPrepopulation.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-generate-questionnaire.json deleted file mode 100644 index 5018d216e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-generate-questionnaire.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "generate-questionnaire", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-questionnaire-generate", - "valueBoolean": true - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/generate-questionnaire", - "identifier": [ - { - "use": "official", - "value": "generate-questionnaire-sample" - } - ], - "version": "1.0.0", - "name": "Generate Questionnaire", - "title": "Generate Questionnaire from StructureDefinition profile of action input", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "eca-rule", - "display": "ECA Rule" - } - ] - }, - "status": "draft", - "experimental": true, - "date": "2021-05-26T00:00:00-08:00", - "publisher": "Alphora", - "description": "This PlanDefinition defines a simple recommendation with inputs to generate a Questionnaire.", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "version": "4.0.1", - "code": "focus", - "display": "Clinical Focus" - } - } - ], - "jurisdiction": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/iso3166-1-3", - "version": "4.0.1", - "code": "USA", - "display": "United States of America" - } - ] - } - ], - "purpose": "The purpose of this is to test the system to make sure we have complete end-to-end functionality", - "usage": "This is to be used in conjunction with a patient-facing FHIR application.", - "copyright": "© CDC 2016+.", - "library": [ - "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - ], - "action": [ - { - "extension": [], - "title": "Prior Auth Route One", - "description": "", - "condition": [ - { - "kind": "applicability", - "expression": { - "language": "text/cql.identifier", - "expression": "Claim Is Applicable" - } - } - ], - "input": [ - { - "type": "Claim", - "profile": [ - "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/PAClaim" - ] - } - ], - "definitionCanonical": "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/route-one" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-hello-world-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-hello-world-patient-view.json deleted file mode 100644 index 7c721e601..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-hello-world-patient-view.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "hello-world-patient-view", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition" - ] - }, - "url": "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/hello-world-patient-view", - "identifier": [ - { - "use": "official", - "value": "helloworld-patient-view-sample" - } - ], - "version": "1.0.0", - "name": "HelloWorldPatientView", - "title": "Hello World (patient-view)", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "eca-rule", - "display": "ECA Rule" - } - ] - }, - "status": "draft", - "experimental": true, - "date": "2021-05-26T00:00:00-08:00", - "publisher": "Alphora", - "description": "This PlanDefinition defines a simple Hello World recommendation that triggers on patient-view.", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "version": "4.0.1", - "code": "focus", - "display": "Clinical Focus" - } - } - ], - "jurisdiction": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/iso3166-1-3", - "version": "4.0.1", - "code": "USA", - "display": "United States of America" - } - ] - } - ], - "purpose": "The purpose of this is to test the system to make sure we have complete end-to-end functionality", - "usage": "This is to be used in conjunction with a patient-facing FHIR application.", - "copyright": "© CDC 2016+.", - "library": [ - "http://fhir.org/guides/cdc/opioid-cds/Library/HelloWorld" - ], - "action": [ - { - "title": "Hello World!", - "description": "A simple Hello World (patient-view) recommendation", - "trigger": [ - { - "type": "named-event", - "name": "patient-view" - } - ], - "condition": [ - { - "kind": "start", - "expression": { - "description": "Whether or not a Hello World! card should be returned", - "language": "text/cql.identifier", - "expression": "Main Action Condition Expression Is True" - } - } - ], - "dynamicValue": [ - { - "fhir_comments": [ - " dynamic card elements " - ], - "path": "action.title", - "expression": { - "language": "text/cql.identifier", - "expression": "Get Title" - } - }, - { - "path": "action.description", - "expression": { - "language": "text/cql.identifier", - "expression": "Get Description" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-prepopulate-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-prepopulate-noLibrary.json deleted file mode 100644 index 7feaa26b0..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-prepopulate-noLibrary.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "prepopulate-noLibrary", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition" - ] - }, - "url": "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/prepopulate-noLibrary", - "identifier": [ - { - "use": "official", - "value": "prepopulate-sample" - } - ], - "version": "1.0.0", - "name": "Prepopulate", - "title": "Prepopulate", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "eca-rule", - "display": "ECA Rule" - } - ] - }, - "status": "draft", - "experimental": true, - "date": "2021-05-26T00:00:00-08:00", - "publisher": "Alphora", - "description": "This PlanDefinition defines a simple recommendation to fill out a prepopulated Questionnaire.", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "version": "4.0.1", - "code": "focus", - "display": "Clinical Focus" - } - } - ], - "jurisdiction": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/iso3166-1-3", - "version": "4.0.1", - "code": "USA", - "display": "United States of America" - } - ] - } - ], - "purpose": "The purpose of this is to test the system to make sure we have complete end-to-end functionality", - "usage": "This is to be used in conjunction with a patient-facing FHIR application.", - "copyright": "© CDC 2016+.", - "action": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate-parameter", - "valueString": "ClaimId" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-lookupQuestionnaire", - "valueCanonical": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-noLibrary" - } - ] - } - ], - "title": "Prepopulate!", - "description": "A simple recommendation to complete a prepopulated Questionnaire", - "definitionCanonical": "http://fhir.org/guides/cdc/opioid-cds/ActivityDefinition/complete-questionnaire" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-prepopulate.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-prepopulate.json deleted file mode 100644 index 0f1f9ead5..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-prepopulate.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "prepopulate", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition" - ] - }, - "url": "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/prepopulate", - "identifier": [ - { - "use": "official", - "value": "prepopulate-sample" - } - ], - "version": "1.0.0", - "name": "Prepopulate", - "title": "Prepopulate", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "eca-rule", - "display": "ECA Rule" - } - ] - }, - "status": "draft", - "experimental": true, - "date": "2021-05-26T00:00:00-08:00", - "publisher": "Alphora", - "description": "This PlanDefinition defines a simple recommendation to fill out a prepopulated Questionnaire.", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "version": "4.0.1", - "code": "focus", - "display": "Clinical Focus" - } - } - ], - "jurisdiction": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/iso3166-1-3", - "version": "4.0.1", - "code": "USA", - "display": "United States of America" - } - ] - } - ], - "purpose": "The purpose of this is to test the system to make sure we have complete end-to-end functionality", - "usage": "This is to be used in conjunction with a patient-facing FHIR application.", - "copyright": "© CDC 2016+.", - "library": [ - "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - ], - "action": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate-parameter", - "valueString": "ClaimId" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-lookupQuestionnaire", - "valueCanonical": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest" - } - ] - } - ], - "title": "Prepopulate!", - "description": "A simple recommendation to complete a prepopulated Questionnaire", - "definitionCanonical": "http://fhir.org/guides/cdc/opioid-cds/ActivityDefinition/complete-questionnaire" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-route-one-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-route-one-noLibrary.json deleted file mode 100644 index 019f6f727..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-route-one-noLibrary.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "route-one-noLibrary", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition" - ] - }, - "url": "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/route-one-noLibrary", - "version": "1.0.0", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "eca-rule", - "display": "ECA Rule" - } - ] - }, - "status": "draft", - "experimental": true, - "date": "2021-05-26T00:00:00-08:00", - "publisher": "Alphora", - "description": "This PlanDefinition defines inputs for a route one questionnaire.", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "version": "4.0.1", - "code": "focus", - "display": "Clinical Focus" - } - } - ], - "jurisdiction": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/iso3166-1-3", - "version": "4.0.1", - "code": "USA", - "display": "United States of America" - } - ] - } - ], - "purpose": "The purpose of this is to test the system to make sure we have complete end-to-end functionality", - "usage": "This is to be used in conjunction with a patient-facing FHIR application.", - "copyright": "© CDC 2016+.", - "library": [ - "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - ], - "action": [ - { - "extension": [], - "title": "Facility Information", - "description": "", - "input": [ - { - "type": "Organization", - "profile": [ - "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization-noLibrary" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-route-one.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-route-one.json deleted file mode 100644 index d686db156..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-route-one.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "route-one", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-questionnaire-generate", - "valueBoolean": true - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/route-one", - "version": "1.0.0", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "eca-rule", - "display": "ECA Rule" - } - ] - }, - "status": "draft", - "experimental": true, - "date": "2021-05-26T00:00:00-08:00", - "publisher": "Alphora", - "description": "This PlanDefinition defines inputs for a route one questionnaire.", - "useContext": [ - { - "code": { - "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", - "version": "4.0.1", - "code": "focus", - "display": "Clinical Focus" - } - } - ], - "jurisdiction": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/ValueSet/iso3166-1-3", - "version": "4.0.1", - "code": "USA", - "display": "United States of America" - } - ] - } - ], - "purpose": "The purpose of this is to test the system to make sure we have complete end-to-end functionality", - "usage": "This is to be used in conjunction with a patient-facing FHIR application.", - "copyright": "© CDC 2016+.", - "library": [ - "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - ], - "action": [ - { - "extension": [], - "title": "Facility Information", - "description": "", - "input": [ - { - "type": "Organization", - "profile": [ - "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization" - ] - } - ] - }, - { - "title": "Beneficiary Information", - "description": "", - "input": [ - { - "type": "Patient", - "profile": [ - "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient" - ] - } - ] - }, - { - "title": "Operating Physician Information", - "description": "", - "input": [ - { - "type": "Practitioner", - "profile": [ - "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating" - ] - } - ] - }, - { - "title": "Attending Physician Information", - "description": "", - "input": [ - { - "type": "Practitioner", - "profile": [ - "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-us-ecr-specification.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-us-ecr-specification.json deleted file mode 100644 index 6968341ed..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/PlanDefinition-us-ecr-specification.json +++ /dev/null @@ -1,1113 +0,0 @@ -{ - "resourceType": "PlanDefinition", - "id": "us-ecr-specification", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/ecr/StructureDefinition/ersd-plandefinition" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/variable", - "valueExpression": { - "name": "normalReportingDuration", - "language": "text/fhirpath", - "expression": "14" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/variable", - "valueExpression": { - "name": "encounterStartDate", - "language": "text/fhirpath", - "expression": "{{context.encounterStartDate}}" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/variable", - "valueExpression": { - "name": "encounterEndDate", - "language": "text/fhirpath", - "expression": "{{context.encounterEndDate}}" - } - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/variable", - "valueExpression": { - "name": "lastReportSubmissionDate", - "language": "text/fhirpath", - "expression": "{{context.lastReportSubmissionDate}}" - } - } - ], - "url": "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification", - "version": "2.0.0", - "name": "US_eCR_Specification", - "title": "US eCR Specification", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/plan-definition-type", - "code": "workflow-definition", - "display": "Workflow Definition" - } - ] - }, - "status": "active", - "experimental": true, - "date": "2020-07-31T12:32:29.858-05:00", - "publisher": "eCR", - "contact": [ - { - "name": "HL7 International - Public Health", - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pher" - } - ] - } - ], - "description": "An example ersd PlanDefinition", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ], - "text": "United States of America" - } - ], - "effectivePeriod": { - "start": "2020-12-01" - }, - "relatedArtifact": [ - { - "type": "depends-on", - "label": "RCTC Value Set Library of Trigger Codes", - "resource": "http://ersd.aimsplatform.org/fhir/Library/rctc" - } - ], - "action": [ - { - "id": "start-workflow", - "description": "This action represents the start of the reporting workflow in response to the encounter-start event.", - "textEquivalent": "Start the reporting workflow in response to an encounter-start event", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "initiate-reporting-workflow", - "display": "Initiate a reporting workflow" - } - ] - } - ], - "trigger": [ - { - "id": "encounter-start", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-named-eventtype-extension", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-triggerdefinition-namedevents", - "code": "encounter-start", - "display": "Indicates the start of an encounter" - } - ] - } - } - ], - "type": "named-event", - "name": "encounter-start" - } - ], - "input": [ - { - "id": "patient", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "Patient/{{context.patientId}}" - } - ], - "type": "Patient" - }, - { - "id": "encounter", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "Encounter/{{context.encounterId}}" - } - ], - "type": "Encounter" - } - ], - "relatedAction": [ - { - "actionId": "check-for-immediate-reporting", - "relationship": "before-start", - "offsetDuration": { - "value": 1, - "system": "http://unitsofmeasure.org", - "code": "h" - } - } - ] - }, - { - "id": "check-for-immediate-reporting", - "description": "This action represents the start of the check suspected disorder reporting workflow in response to the encounter-start event.", - "textEquivalent": "Check suspected disorders for immediate reportability and setup jobs for future reportability checks.", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "execute-reporting-workflow" - } - ] - } - ], - "action": [ - { - "id": "is-encounter-immediately-reportable", - "description": "This action represents the check for suspected disorder reportability to create the patients eICR.", - "textEquivalent": "Check Trigger Codes based on Suspected Reportable and Lab Order Test Names Value set.", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "check-trigger-codes" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Suspected Disorder?", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%suspectedDisorderConditions.exists() or %suspectedDisorderLabOrders.exists()" - } - } - ], - "input": [ - { - "id": "suspectedDisorderConditions", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "Condition?patient=Patient/{{context.patientId}}" - } - ], - "type": "Condition", - "codeFilter": [ - { - "path": "code", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/sdtc" - } - ] - }, - { - "id": "suspectedDisorderLabOrders", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "ServiceRequest?patient=Patient/{{context.patientId}}" - } - ], - "type": "ServiceRequest", - "codeFilter": [ - { - "path": "code", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/lotc" - } - ] - } - ], - "relatedAction": [ - { - "actionId": "create-eicr", - "relationship": "before-start" - } - ] - }, - { - "id": "continue-check-reportable", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "evaluate-condition" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter In Progress and Within Normal Reporting Duration or 72h or less after end of encounter?", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%inprogressencounter.where((status = 'in-progress' and %encounterStartDate + 1 day * %normalReportingDuration >= now()) or (status = 'finished' and %encounterEndDate + 72 hours >= now())).select(true)" - } - } - ], - "input": [ - { - "id": "inprogressencounter", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter" - } - ], - "relatedAction": [ - { - "actionId": "check-reportable", - "relationship": "before-start", - "offsetDuration": { - "value": 6, - "comparator": "<=", - "system": "http://unitsofmeasure.org", - "code": "h" - } - } - ] - }, - { - "id": "terminate-late-encounter", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "terminate-reporting-workflow" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter Late", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%terminatedencounter.where((status = 'in-progress' and %encounterStartDate + 1 day * %normalReportingDuration < now()) or (status = 'finished' and %encounterEndDate + 72 hours < now())).select(true)" - } - } - ], - "input": [ - { - "id": "terminatedencounter", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter" - } - ] - }, - { - "id": "is-late-encounter-completed", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "complete-reporting" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter Complete", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%lateCompletedEncounter.exists(status = 'finished')" - } - } - ], - "input": [ - { - "id": "lateCompletedEncounter", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter" - } - ] - } - ] - }, - { - "id": "check-reportable", - "description": "This action represents the check for suspected reportability of the eICR.", - "textEquivalent": "Check Reportability and setup jobs for future reportability checks.", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "execute-reporting-workflow" - } - ] - } - ], - "action": [ - { - "id": "is-encounter-reportable", - "description": "This action represents the check for reportability to create the patients eICR.", - "textEquivalent": "Check Trigger Codes based on RCTC Value sets.", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "check-trigger-codes" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter Reportable and Within Normal Reporting Duration?", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "(%encounterStartDate + 1 day * %normalReportingDuration >= now()) and (%conditions.exists() or %encounters.exists() or %immunizations.exists() or %labOrders.exists() or %labTests.exists() or %labResults.exists() or %medicationAdministrations.exists() or %medicationOrders.exists() or %medicationDispenses.exists())" - } - } - ], - "input": [ - { - "id": "conditions", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "Condition?patient=Patient/{{context.patientId}}" - } - ], - "type": "Condition", - "codeFilter": [ - { - "path": "code", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc" - } - ] - }, - { - "id": "encounters", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter", - "codeFilter": [ - { - "path": "reasonCode", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/dxtc" - } - ] - }, - { - "id": "immunizations", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "Immunization?patient=Patient/{{context.patientId}}" - } - ], - "type": "Immunization", - "codeFilter": [ - { - "path": "vaccineCode", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc" - } - ] - }, - { - "id": "labOrders", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "ServiceRequest?patient=Patient/{{context.patientId}}" - } - ], - "type": "ServiceRequest", - "codeFilter": [ - { - "path": "code", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/lotc" - } - ] - }, - { - "id": "labTests", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "Observation?patient=Patient/{{context.patientId}}" - } - ], - "type": "Observation", - "codeFilter": [ - { - "path": "code", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/lotc" - } - ] - }, - { - "id": "diagnosticOrders", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "DiagnosticReport?patient=Patient/{{context.patientId}}" - } - ], - "type": "DiagnosticReport", - "codeFilter": [ - { - "path": "code", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/lotc" - } - ] - }, - { - "id": "medicationOrders", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "MedicationRequest?patient=Patient/{{context.patientId}}" - } - ], - "type": "MedicationRequest", - "codeFilter": [ - { - "path": "medication", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc" - } - ] - }, - { - "id": "medicationDispenses", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "MedicationDispense?patient=Patient/{{context.patientId}}" - } - ], - "type": "MedicationDispense", - "codeFilter": [ - { - "path": "medication", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc" - } - ] - }, - { - "id": "medicationAdministrations", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-fhirquerypattern-extension", - "valueString": "MedicationAdministration?patient=Patient/{{context.patientId}}" - } - ], - "type": "MedicationAdministration", - "codeFilter": [ - { - "path": "medication", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/mrtc" - } - ] - }, - { - "id": "labResults", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "labTests" - } - ], - "type": "Observation", - "codeFilter": [ - { - "path": "value", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/ostc" - } - ] - }, - { - "id": "diagnosticResults", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "diagnosticOrders" - } - ], - "type": "DiagnosticReport", - "codeFilter": [ - { - "path": "code", - "valueSet": "http://ersd.aimsplatform.org/fhir/ValueSet/ostc" - } - ] - } - ], - "relatedAction": [ - { - "actionId": "create-eicr", - "relationship": "before-start" - } - ] - }, - { - "id": "check-update-eicr", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "evaluate-condition" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Most recent eICR sent over 72 hours ago?", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%lastReportSubmissionDate < now() - 72 hours" - } - } - ], - "relatedAction": [ - { - "actionId": "create-eicr", - "relationship": "before-start" - } - ] - }, - { - "id": "is-encounter-in-progress", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "evaluate-condition" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter In Progress and Within Normal Reporting Duration or 72h or less after end of encounter?", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%inprogressencounter.where(status = 'in-progress' and %encounterStartDate + 1 day * %normalReportingDuration >= now() or (status = 'finished' and %encounterEndDate + 72 hours >= now())).exists()" - } - } - ], - "input": [ - { - "id": "inprogressencounter", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter" - } - ], - "relatedAction": [ - { - "actionId": "check-reportable", - "relationship": "before-start", - "offsetDuration": { - "value": 6, - "comparator": "<=", - "system": "http://unitsofmeasure.org", - "code": "h" - } - } - ] - }, - { - "id": "terminate-encounter", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "terminate-reporting-workflow" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter Late", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%termencounter.where((status = 'in-progress' and %encounterStartDate + 1 day * %normalReportingDuration < now()) or (status = 'finished' and %encounterEndDate + 72 hours < now())).select(true)" - } - } - ], - "input": [ - { - "id": "termencounter", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter" - } - ] - }, - { - "id": "is-encounter-completed", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "complete-reporting" - } - ] - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter Complete", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%completedEncounter.exists(status = 'finished')" - } - } - ], - "input": [ - { - "id": "completedEncounter", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter" - } - ] - } - ] - }, - { - "id": "create-eicr", - "description": "This action represents the creation of the eICR. It subsequently calls validate.", - "textEquivalent": "Create eICR", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "create-report" - } - ] - } - ], - "input": [ - { - "id": "patientdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "patient" - } - ], - "type": "Patient", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" - ] - }, - { - "id": "conditiondata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "conditions" - } - ], - "type": "Condition", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" - ] - }, - { - "id": "encounterdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "encounter" - } - ], - "type": "Encounter", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" - ] - }, - { - "id": "mrdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "medicationOrders" - } - ], - "type": "MedicationRequest", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" - ] - }, - { - "id": "immzdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "immunizations" - } - ], - "type": "Immunization", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization" - ] - }, - { - "id": "labResultdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "labResults" - } - ], - "type": "Observation", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab" - ] - }, - { - "id": "labOrderdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "labOrders" - } - ], - "type": "ServiceRequest", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/ServiceRequest" - ] - }, - { - "id": "diagnosticResultdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "diagnosticResults" - } - ], - "type": "DiagnosticReport", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab" - ] - }, - { - "id": "diagnosticOrderdata", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "diagnosticOrders" - } - ], - "type": "DiagnosticReport", - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab" - ] - } - ], - "output": [ - { - "id": "eicrreport", - "type": "Bundle", - "profile": [ - "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" - ] - } - ], - "relatedAction": [ - { - "actionId": "validate-eicr", - "relationship": "before-start" - } - ] - }, - { - "id": "validate-eicr", - "description": "This action represents the validation of the eICR. It subsequently calls route-and-send.", - "textEquivalent": "Validate eICR", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "validate-report" - } - ] - } - ], - "input": [ - { - "id": "generatedeicrreport", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "eicrreport" - } - ], - "type": "Bundle", - "profile": [ - "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" - ] - } - ], - "output": [ - { - "id": "valideicrreport", - "type": "Bundle", - "profile": [ - "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" - ] - } - ], - "relatedAction": [ - { - "actionId": "route-and-send-eicr", - "relationship": "before-start" - } - ] - }, - { - "id": "route-and-send-eicr", - "description": "This action represents the routing and sending of the eICR.", - "textEquivalent": "Route and send eICR", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "submit-report" - } - ] - } - ], - "input": [ - { - "id": "validatedeicrreport", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-relateddata-extension", - "valueString": "valideicrreport" - } - ], - "type": "Bundle", - "profile": [ - "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" - ] - } - ], - "output": [ - { - "id": "submittedeicrreport", - "type": "Bundle", - "profile": [ - "http://hl7.org/fhir/us/ecr/StructureDefinition/eicr-document-bundle" - ] - } - ] - }, - { - "id": "encounter-modified", - "description": "This action represents the start of the reporting workflow in response to the encounter-modified event", - "textEquivalent": "Start the reporting workflow in response to an encounter-modified event", - "code": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-plandefinition-actions", - "code": "initiate-reporting-workflow", - "display": "Initiate a reporting workflow" - } - ] - } - ], - "trigger": [ - { - "id": "encounter-modified-trigger", - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-named-eventtype-extension", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-triggerdefinition-namedevents", - "code": "encounter-modified", - "display": "Indicates modifications to data elements of an encounter" - } - ] - } - } - ], - "type": "named-event", - "name": "encounter-modified" - } - ], - "condition": [ - { - "kind": "applicability", - "expression": { - "extension": [ - { - "url": "http://hl7.org/fhir/us/ecr/StructureDefinition/us-ph-alternative-expression-extension", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Is Encounter Longer Than Normal Reporting Duration?", - "reference": "http://ersd.aimsplatform.org/fhir/Library/RuleFilters|2.1.0" - } - } - ], - "language": "text/fhirpath", - "expression": "%encounter.where(period.start + 1 day * %normalReportingDuration < now()).select(true)" - } - } - ], - "relatedAction": [ - { - "actionId": "create-eicr", - "relationship": "before-start" - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json deleted file mode 100644 index 1b793cac7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json +++ /dev/null @@ -1,568 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-Errors", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-Errors", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianPTAN" - } - } - ], - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianPTAN" - } - } - ], - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json deleted file mode 100644 index 553779fff..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-noLibrary", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-noLibrary", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json deleted file mode 100644 index f885604a6..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-definition.json deleted file mode 100644 index 905f66c0a..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-definition.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "definition", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorization-prepopulation" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://hl7.org/fhir/us/davinci-dtr/Library/BasicPatientInfo-prepopulation" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/definition", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueCode": "Organization" - } - ], - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "definition": "http://hl7.org/fhir/Organization#Organization.name", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "FacilityContractRegion" - } - } - ], - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueCode": "Patient" - } - ], - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "definition": "http://hl7.org/fhir/Patient#Patient.name.given", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "definition": "http://hl7.org/fhir/Patient#Patient.name.family", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "definition": "http://hl7.org/fhir/Patient#Patient.birthDate", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "2.4.0", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.system", - "type": "string", - "initial": [ - { - "valueString": "http://hl7.org/fhir/sid/us-medicare" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.value", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "definition": "http://hl7.org/fhir/Patient#Patient.gender", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-demographics.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-demographics.json deleted file mode 100644 index 41cebe17d..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-demographics.json +++ /dev/null @@ -1,271 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "demographics", - "meta": { - "profile": [ - "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-extr-defn" - ] - }, - "extension": [ - { - "extension": [ - { - "url": "name", - "valueCoding": { - "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", - "code": "patient" - } - }, - { - "url": "type", - "valueCode": "Patient" - } - ], - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueExpression": { - "language": "application/x-fhir-query", - "expression": "Patient?_id={{%25patient.id}}" - } - } - ], - "url": "http://hl7.org/fhir/uv/sdc/Questionnaire/demographics", - "version": "3.0.0", - "name": "DemographicExample", - "title": "Questionnaire - Demographics Example", - "status": "draft", - "experimental": true, - "subjectType": [ - "Patient" - ], - "date": "2022-10-01T05:09:13+00:00", - "publisher": "HL7 International - FHIR Infrastructure Work Group", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/Special/committees/fiwg" - } - ] - } - ], - "description": "A sample questionnaire using context-based population and extraction", - "jurisdiction": [ - { - "coding": [ - { - "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", - "code": "001" - } - ] - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%patient.id" - } - } - ], - "linkId": "patient.id", - "definition": "Patient.id", - "text": "(internal use)", - "type": "string", - "readOnly": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%patient.birthDate" - } - } - ], - "linkId": "patient.birthDate", - "definition": "Patient.birthDate", - "text": "Date of birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "name": "patientName", - "language": "text/fhirpath", - "expression": "%patient.name" - } - } - ], - "linkId": "patient.name", - "definition": "Patient.name", - "text": "Name(s)", - "type": "group", - "repeats": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%patientName.family" - } - } - ], - "linkId": "patient.name.family", - "definition": "Patient.name.family", - "text": "Family name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%patientName.given" - } - } - ], - "linkId": "patient.name.given", - "definition": "Patient.name.given", - "text": "Given name(s)", - "type": "string", - "required": true, - "repeats": true - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "name": "relative", - "language": "application/x-fhir-query", - "expression": "RelatedPerson?patient={{%patient.id}}" - } - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueExpression": { - "language": "application/x-fhir-query", - "expression": "RelatedPerson?patient={{%patient.id}}" - } - } - ], - "linkId": "relative", - "text": "Relatives, caregivers and other personal relationships", - "type": "group", - "repeats": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%relative.id" - } - } - ], - "linkId": "relative.id", - "definition": "RelatedPerson.id", - "text": "(internal use)", - "type": "string", - "readOnly": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%relative.relationship" - } - } - ], - "linkId": "relative.relationship", - "definition": "RelatedPerson.relationship", - "text": "Name(s)", - "type": "choice", - "required": true, - "repeats": true, - "answerValueSet": "http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "name": "relativeName", - "language": "text/fhirpath", - "expression": "%relative.name" - } - } - ], - "linkId": "relative.name", - "definition": "RelatedPerson.name", - "text": "Name(s)", - "type": "group", - "repeats": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%relativeName.family" - } - } - ], - "linkId": "relative.name.family", - "definition": "RelatedPerson.name.family", - "text": "Family name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", - "valueExpression": { - "language": "text/fhirpath", - "expression": "%relativeName.given" - } - } - ], - "linkId": "relative.name.given", - "definition": "RelatedPerson.name.given", - "text": "Given name(s)", - "type": "string", - "required": true, - "repeats": true - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-mypain-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-mypain-questionnaire.json deleted file mode 100644 index b413f3ee1..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-mypain-questionnaire.json +++ /dev/null @@ -1,3999 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "mypain-questionnaire", - "meta": { - "versionId": "1", - "lastUpdated": "2022-01-11T12:04:40.195-07:00", - "source": "#JlLhTMllkhhiyM1r", - "profile": [ - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-shareablequestionnaire", - "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7" - ], - "tag": [ - { - "code": "lformsVersion: 25.1.3" - } - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "shareable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "publishable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "narrative" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "computable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "structured" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", - "valueCode": "executable" - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", - "valueCode": "executable" - } - ], - "url": "http://fhir.org/guide/cqf/cds4cpm", - "name": "mypainquestionnaire", - "title": "MyPain Questionnaire", - "status": "active", - "experimental": false, - "subjectType": [ - "Patient" - ], - "description": "A questionnaire to use with the MyPAIN application for a patient to assess their pain levels, locations, and treatments for use in consultation with a clinician to determine further treatments.", - "item": [ - { - "linkId": "1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "pain-location", - "display": "Please describe the location(s) of any pain you have had in the past 7 days." - } - ], - "prefix": "My Pain Location", - "text": "We’d like to ask you a few questions about your pain and how it is affecting your life. Please describe the location(s) of any pain you have had in the past 7 days. Please select only one pain type per location.", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1038", - "display": "What type of HEAD pain have you had in the last 7 days?" - } - ], - "prefix": "Head", - "text": "What type of HEAD pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.2", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1039", - "display": "What type of NECK pain have you had in the last 7 days?" - } - ], - "prefix": "Neck", - "text": "What type of NECK pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.3", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1040", - "display": "What type of SHOULDERS pain have you had in the last 7 days?" - } - ], - "prefix": "Shoulders", - "text": "What type of SHOULDERS pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.4", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1041", - "display": "What type of ARMS pain have you had in the last 7 days?" - } - ], - "prefix": "Arms", - "text": "What type of ARMS pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.5", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1042", - "display": "What type of UPPER BACK pain have you had in the last 7 days?" - } - ], - "prefix": "Upper Back", - "text": "What type of UPPER BACK pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.6", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1043", - "display": "What type of LOWER BACK pain have you had in the last 7 days?" - } - ], - "prefix": "Lower Back", - "text": "What type of LOWER BACK pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.7", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1044", - "display": "What type of HANDS pain have you had in the last 7 days?" - } - ], - "prefix": "Hands", - "text": "What type of HANDS pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.8", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1045", - "display": "What type of ABDOMEN pain have you had in the last 7 days?" - } - ], - "prefix": "Abdomen", - "text": "What type of ABDOMEN pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.9", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1046", - "display": "What type of PELVIS pain have you had in the last 7 days?" - } - ], - "prefix": "Pelvis", - "text": "What type of PELVIS pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.10", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1047", - "display": "What type of HIPS pain have you had in the last 7 days?" - } - ], - "prefix": "Hips", - "text": "What type of HIPS pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.11", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1048", - "display": "What type of UPPER LEGS pain have you had in the last 7 days?" - } - ], - "prefix": "Upper Legs", - "text": "What type of UPPER LEGS pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.12", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1049", - "display": "What type of KNEES pain have you had in the last 7 days?" - } - ], - "prefix": "Knees", - "text": "What type of KNEES pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.13", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1050", - "display": "What type of LOWER LEGS pain have you had in the last 7 days?" - } - ], - "prefix": "Lower Legs", - "text": "What type of LOWER LEGS pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.14", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1051", - "display": "What type of FEET pain have you had in the last 7 days?" - } - ], - "prefix": "Feet", - "text": "What type of FEET pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/pain-types" - } - ], - "linkId": "1.15", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1052", - "display": "What type of EVERYWHERE pain have you had in the last 7 days?" - } - ], - "prefix": "Everywhere", - "text": "What type of EVERYWHERE pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "36349006", - "display": "Burning" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "27635008", - "display": "Aching" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "786837007", - "display": "Tingling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - }, - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "29695002", - "display": "Throbbing" - } - } - ] - }, - { - "linkId": "1.16", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1053", - "display": "What OTHER pain have you had in the last 7 days? Please describe" - } - ], - "prefix": "Other, please describe", - "text": "Other, please describe", - "type": "text", - "required": false - } - ] - }, - { - "linkId": "2", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "my-pain-intensity", - "display": "Thinking about your overall pain, in the past 7 days, please respond to the questions below:" - } - ], - "prefix": "My Pain Intensity", - "text": "Thinking about your overall pain, in the past 7 days, please respond to the questions below:", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL2949-7" - } - ], - "linkId": "2.1", - "code": [ - { - "system": "http://loinc.org", - "code": "75262-6", - "display": "How intense was your pain at its worse in the past 7 days" - } - ], - "text": "How intense was your pain at its worst?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13879-4", - "display": "Had no pain" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6752-5", - "display": "Mild" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6751-7", - "display": "Moderate" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13958-6", - "display": "Very Severe" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL2949-7" - } - ], - "linkId": "2.2", - "code": [ - { - "system": "http://loinc.org", - "code": "75261-8", - "display": "How intense was your average pain in the past 7 days" - } - ], - "text": "How intense was your average pain?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13879-4", - "display": "Had no pain" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6752-5", - "display": "Mild" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6751-7", - "display": "Moderate" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13958-6", - "display": "Very Severe" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL2951-3" - } - ], - "linkId": "2.3", - "code": [ - { - "system": "http://loinc.org", - "code": "75260-0", - "display": "What is your level of pain right now" - } - ], - "text": "What is your level of pain right now?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA131-5", - "display": "Had no pain" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6752-5", - "display": "Mild" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6751-7", - "display": "Moderate" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13958-6", - "display": "Very Severe" - } - } - ] - } - ] - }, - { - "linkId": "3", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "my-pain-interference", - "display": "Thinking about your overall pain, in the past 7 days, please respond to the questions below:" - } - ], - "prefix": "My Pain Interference", - "text": "Thinking about your overall pain, in the past 7 days, please respond to the questions below:", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "3.1", - "code": [ - { - "system": "http://loinc.org", - "code": "61758-9", - "display": "How much did pain interfere with your day to day activities in past 7 days" - } - ], - "text": "How much did pain interfere with your day to day activities?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "3.2", - "code": [ - { - "system": "http://loinc.org", - "code": "61769-6", - "display": "How much did pain interfere with work around the home in past 7 days" - } - ], - "text": "How much did pain interfere with your work around the home?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "3.3", - "code": [ - { - "system": "http://loinc.org", - "code": "61773-8", - "display": "How much did pain interfere with your ability to participate in social activities in past 7 days" - } - ], - "text": "How much did pain interfere with your ability to participate in social activities?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "3.4", - "code": [ - { - "system": "http://loinc.org", - "code": "61775-3", - "display": "How much did pain interfere with your household chores in past 7 days" - } - ], - "text": "How much did pain interfere with your household chores?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - } - ] - }, - { - "linkId": "4", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "my-pain-interference", - "display": "Thinking about your overall pain, in the past 7 days, please respond to the questions below:" - } - ], - "prefix": "My Pain Interference", - "text": "Thinking about your overall pain, in the past 7 days, please respond to the questions below:", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "4.1", - "code": [ - { - "system": "http://loinc.org", - "code": "61761-3", - "display": "How much did pain interfere with the things you usually do for fun in past 7 days" - } - ], - "text": "How much did pain interfere with the things you usually do for fun?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "4.2", - "code": [ - { - "system": "http://loinc.org", - "code": "61777-9", - "display": "How much did pain interfere with your enjoyment of social activities in past 7 days" - } - ], - "text": "How much did pain interfere with your enjoyment of social activities?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "4.3", - "code": [ - { - "system": "http://loinc.org", - "code": "61794-4", - "display": "How much did pain interfere with your enjoyment of life in past 7 days" - } - ], - "text": "How much did pain interfere with your enjoyment of life?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1017-4" - } - ], - "linkId": "4.4", - "code": [ - { - "system": "http://loinc.org", - "code": "61762-1", - "display": "How much did pain interfere with your family life in past 7 days" - } - ], - "text": "How much did pain interfere with your family life?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6568-5", - "display": "Not at all" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13863-8", - "display": "A little bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13909-9", - "display": "Somewhat" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13902-4", - "display": "Quite a bit" - } - }, - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA13914-9", - "display": "Very much" - } - } - ] - } - ] - }, - { - "linkId": "5", - "prefix": "About My Treatments", - "text": "We’d like to know more about how you manage your pain and what has worked for you. When answering these questions, please focus on pain related to what brings you in for your upcoming medical visit.

These treatments are organized into sections by type:
Basic therapies
Mind-body therapies
New therapies
Non-prescription medicines
Prescription medicines", - "type": "display" - }, - { - "linkId": "6", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "about-my-treatments", - "display": "What have you tried in the past 6 months to help you with your pain? Select all answers that apply. We also want to know if it worked for you." - } - ], - "prefix": "About My Treatments", - "text": "What have you tried in the past 6 months to help you with your pain? Select all answers that apply. We also want to know if it worked for you.", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1008", - "display": "How often have Exercises at home (such as those assigned by a therapist) or outside (such as walking, jogging, swimming) you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Exercises at home (such as those assigned by a therapist) or outside (such as walking, jogging, swimming)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.2", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1009", - "display": "How often have Sleep positioners or devices (such as additional pillows, padding, etc.) you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Sleep positioners or devices (such as additional pillows, padding, etc.)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.3", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1010", - "display": "How often has Stretching you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Stretching", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.4", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1011", - "display": "How often has Weight loss or changes in your diet you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Weight loss or changes in your diet", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.5", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1012", - "display": "How often has Setting and reaching activity goals you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Setting and reaching activity goals", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.6", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1013", - "display": "How often has Ice or heat therapy you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Ice or Heat Therapy", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.7", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1014", - "display": "How often has Physical therapy you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Physical Therapy", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.8", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1015", - "display": "How often has Acupuncture you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Acupuncture", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "6.9", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1016", - "display": "How often has Chiropractic treatment you have tried in the past 6 months helped you with your pain?" - } - ], - "prefix": "Chiropractic treatment", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "linkId": "6.10", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1054", - "display": "How often have Other strategies or methods you have tried in the last 6 months helped with your pain? Please describe" - } - ], - "prefix": "Other, please describe", - "text": "Other, please describe", - "type": "text", - "required": false - } - ] - }, - { - "linkId": "7", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "about-my-treatments", - "display": "Have you used any of the following items you can buy without a prescription from your doctor to help with your pain in the last 6 months (select all that apply)?" - } - ], - "prefix": "About My Treatments", - "text": "Have you used any of the following items you can buy without a prescription from your doctor to help with your pain in the last 6 months (select all that apply)?", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "7.1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1017", - "display": "How often have Pain relievers (such as Advil, Aleve, Aspirin, Ibuprofen, Motrin, Tylenol) you can buy without a prescription from your doctor that you have used in the last 6 months helped with your pain?" - } - ], - "prefix": "Pain relievers (such as Advil, Aleve, Aspirin, Ibuprofen, Motrin, Tylenol)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "7.2", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1018", - "display": "How often have Herbal or nutritional pain relievers (such as ginseng or kava kava) that you have used in the last 6 months helped with your pain?" - } - ], - "prefix": "Herbal or nutritional pain relievers (such as ginseng or kava kava)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "7.3", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1019", - "display": "How often have Cremes, lotions, gels or patches applied to the skin (for example Bengay, Tiger Balm or BioFreeze) that you have used in the last 6 months helped with your pain?" - } - ], - "prefix": "Cremes, lotions, gels or patches applied to the skin (for example BENGAY®, TIGER BALM® or BiOFREEZE®)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "linkId": "7.4", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1055", - "display": "Have you used any Other items you can buy without a prescription from your doctor to help with your pain in the last 6 months? Please describe" - } - ], - "prefix": "Other items you can buy without a prescription from your doctor, please describe", - "text": "Other, please describe", - "type": "text", - "required": false - } - ] - }, - { - "linkId": "8", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "about-my-treatments", - "display": "Have you used any of the following prescription medications to help with your pain in the last 6 months?" - } - ], - "prefix": "About My Treatments", - "text": "Have you used any of the following prescription medications to help with your pain in the last 6 months?", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "8.1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1020", - "display": "How often have prescription Opioid medications (such as hydrocodone, oxycodone, codeine, morphine and fentanyl) helped with your pain in the last 6 months?" - } - ], - "prefix": "Opioid medications (such as hydrocodone, oxycodone, codeine, morphine and fentanyl)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "8.2", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1021", - "display": "How often have prescription Cortisone injections (a shot to relieve inflammation) helped with your pain in the last 6 months?" - } - ], - "prefix": "Procedure or Injection (such as a shot to relieve inflammation)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "8.3", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1022", - "display": "How often have prescription Non-opioid medications as prescribed by a doctor (such as Celebrex, Cymbalta) helped with your pain in the last 6 months?" - } - ], - "prefix": "Non-opioid medications as prescribed by a doctor (such as Celebrex or Cymbalta)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "8.4", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1056", - "display": "How often has Medical marijuana helped with your pain in the last 6 months?" - } - ], - "prefix": "Medical marijuana", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "linkId": "8.5", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1057", - "display": "Have you used any Other prescription medications to help with your pain in the last 6 months?: Please describe" - } - ], - "prefix": "Other, please describe", - "text": "Other, please describe", - "type": "text", - "required": false - } - ] - }, - { - "linkId": "9", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "about-my-treatments", - "display": "Have you tried any of the following new therapies to help with your pain in the last 6 months (select all that apply)?" - } - ], - "prefix": "About My Treatments", - "text": "Have you tried any of the following new therapies to help with your pain in the last 6 months (select all that apply)?", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1023", - "display": "How often has Yoga helped with your pain in the last 6 months?" - } - ], - "prefix": "Yoga", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.2", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1024", - "display": "How often has Massage helped with your pain in the last 6 months?" - } - ], - "prefix": "Massage", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.3", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1025", - "display": "How often has Meditation helped with your pain in the last 6 months?" - } - ], - "prefix": "Meditation", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.4", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1026", - "display": "How often has Relaxation or mindfulness-based training helped with your pain in the last 6 months?" - } - ], - "prefix": "Relaxation or mindfulness-based training", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.5", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1027", - "display": "How often has Group or individual therapy for pain helped with your pain in the last 6 months?" - } - ], - "prefix": "Group or individual therapy for pain", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.6", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1058", - "display": "How often has Cognitive behavioral therapy helped with your pain in the last 6 months?" - } - ], - "prefix": "Cognitive behavioral therapy", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.7", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1028", - "display": "How often has Acceptance and commitment therapy helped with your pain in the last 6 months?" - } - ], - "prefix": "Acceptance or commitment therapy", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "9.8", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1029", - "display": "How often has Sleep management (such as a sleep study or CPAP) helped with your pain in the last 6 months?" - } - ], - "prefix": "Sleep management (such as a sleep study or CPAP)", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "linkId": "9.9", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1059", - "display": "Have you tried any Other mind-body techniques or therapies to help with your pain in the last 6 months? Please describe" - } - ], - "prefix": "Other, please describe", - "text": "Other, please describe", - "type": "text", - "required": false - } - ] - }, - { - "linkId": "10", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "about-my-treatments", - "display": "Have you tried any of the following new therapies to help with your pain in the last 6 months (select all that apply)?" - } - ], - "prefix": "About My Treatments", - "text": "Have you tried any of the following new therapies to help with your pain in the last 6 months (select all that apply)?", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "10.1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1030", - "display": "How often has Aromatherapy helped with your pain in the last 6 months?" - } - ], - "prefix": "Aromatherapy", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "10.2", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1031", - "display": "How often have Crystals helped with your pain in the last 6 months?" - } - ], - "prefix": "Crystals", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "10.3", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1032", - "display": "How often have Essential oils helped with your pain in the last 6 months?" - } - ], - "prefix": "Essential oils", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "10.4", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1060", - "display": "How often has CBD oil helped with your pain in the last 6 months?" - } - ], - "prefix": "CBD oil", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://fhir.org/guides/cqf/cds4cpm/ValueSet/three-item-likert" - } - ], - "linkId": "10.5", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1033", - "display": "How often has Music therapy helped with your pain in the last 6 months?" - } - ], - "prefix": "Music therapy", - "text": "Did it work?", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1000", - "display": "Never" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1001", - "display": "Sometimes" - } - }, - { - "valueCoding": { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaireresponse-codes", - "code": "mpqr-1002", - "display": "Always" - } - } - ] - }, - { - "linkId": "10.6", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1034", - "display": "Have you tried any Other new treatments to help with your pain in the last 6 months? Please describe" - } - ], - "prefix": "Other, please describe", - "text": "Other, please describe", - "type": "text", - "required": false - } - ] - }, - { - "linkId": "11", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "about-my-goals", - "display": "We’d like to know more about you and your goals." - }, - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1035", - "display": "What are your most important activity goals? For example: I’d like to be able to walk without pain." - } - ], - "prefix": "About My Goals", - "text": "We’d like to know more about you and your goals. What are your most important activity goals? For example: I’d like to be able to walk without pain.", - "type": "text", - "required": false - }, - { - "linkId": "12", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "about-my-goals", - "display": "We’d like to know more about you and your goals." - }, - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1036", - "display": "What are the biggest barriers to achieving your activity goals? For example: I have a lot of stress from work which makes my pain worse." - } - ], - "prefix": "About My Goals", - "text": "What are the biggest barriers to achieving your activity goals? For example: I have a lot of stress from work which makes my pain worse.", - "type": "text", - "required": false - }, - { - "linkId": "13", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1061", - "display": "Did the patient view the 4 flat tires video" - } - ], - "prefix": "Managing Chronic Pain", - "text": "Below is a link to a video produced by the American Chronic Pain Association about living with chronic pain. We’d like to suggest you watch the video to help you prepare for your upcoming visit. This video can help you prepare to ask questions that are important to you when you visit with your provider.

", - "type": "text" - }, - { - "linkId": "14", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1062", - "display": "Did the patient access the US Chronic Pain website" - } - ], - "prefix": "Managing Chronic Pain", - "text": "The website linked below provides some information from the U.S. Pain Foundation about the causes and diagnosis of pain in general, treatment options and self management and well-being when living with pain. This information can help you prepare to ask questions that are important to you when you visit with your provider.

", - "type": "text" - }, - { - "linkId": "15", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mypain-feedback", - "display": "Feedback about your use of MyPAIN" - } - ], - "prefix": "MyPAIN Feedback", - "text": "Please indicate your level of agreement with the following statement:", - "type": "group", - "required": false, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://hl7.org/fhir/questionnaire-item-control", - "code": "drop-down", - "display": "Drop down" - } - ], - "text": "Drop down" - } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-answerValueSetSource", - "valueCanonical": "http://loinc.org/vs/LL1606-4" - } - ], - "linkId": "15.1", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1063", - "display": "Please indicate your level of agreement with the following statement: Using the MyPAIN tool has helped me begin preparing for a conversation with my provider about managing my pain." - } - ], - "text": "Using the MyPAIN tool has helped me begin preparing for a conversation with my provider about managing my pain.", - "type": "choice", - "required": false, - "answerOption": [ - { - "valueCoding": { - "system": "https://loinc.org/LL1606-4/", - "code": "LA15238-1", - "display": "Disagree a lot" - } - }, - { - "valueCoding": { - "system": "https://loinc.org/LL1606-4/", - "code": "LA15239-9", - "display": "Disagree a little" - } - }, - { - "valueCoding": { - "system": "https://loinc.org/LL1606-4/", - "code": "LA15240-7", - "display": "Neither agree nor disagree" - } - }, - { - "valueCoding": { - "system": "https://loinc.org/LL1606-4/", - "code": "LA15241-5", - "display": "Agree a little" - } - }, - { - "valueCoding": { - "system": "https://loinc.org/LL1606-4/", - "code": "LA15242-3", - "display": "Agree a lot" - } - } - ] - } - ] - }, - { - "linkId": "16", - "code": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1064", - "display": "Do you have any other feedback or thoughts to share on your use of MyPAIN?" - }, - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mypain-feedback", - "display": "Feedback on your use of MyPAIN" - } - ], - "prefix": "MyPAIN Feedback", - "text": "Do you have any other feedback or thoughts to share on your use of MyPAIN?", - "type": "text", - "required": false - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-PAClaim.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-PAClaim.json deleted file mode 100644 index 825ee7497..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-PAClaim.json +++ /dev/null @@ -1,6298 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "PAClaim", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Financial.Billing" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "trial-use" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 2 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "patient" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "fm" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/PAClaim", - "version": "4.3.0", - "name": "PAClaim", - "title": "Prior Auth Claim", - "status": "draft", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Financial Management)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/fm/index.cfm" - } - ] - } - ], - "description": "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.", - "purpose": "The Claim resource is used by providers to exchange services and products rendered to patients or planned to be rendered with insurers for reimbuserment. It is also used by insurers to exchange claims information with statutory reporting and data analytics firms.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "workflow", - "uri": "http://hl7.org/fhir/workflow", - "name": "Workflow Pattern" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - }, - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - } - ], - "kind": "resource", - "abstract": false, - "type": "Claim", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Claim", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Claim", - "path": "Claim", - "short": "Claim, Pre-determination or Pre-authorization", - "definition": "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.", - "comment": "The Claim resource fulfills three information request requirements: Claim - a request for adjudication for reimbursement for products and/or services provided; Preauthorization - a request to authorize the future provision of products and/or services including an anticipated adjudication; and, Predetermination - a request for a non-bind adjudication of possible future products and/or services.", - "alias": [ - "Adjudication Request", - "Preauthorization Request", - "Predetermination Request" - ], - "min": 0, - "max": "*", - "base": { - "path": "Claim", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "workflow", - "map": "Request" - }, - { - "identity": "w5", - "map": "financial.billing" - } - ] - }, - { - "id": "Claim.id", - "path": "Claim.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Claim.meta", - "path": "Claim.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Claim.implicitRules", - "path": "Claim.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Claim.language", - "path": "Claim.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Claim.text", - "path": "Claim.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Claim.contained", - "path": "Claim.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Claim" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.extension", - "path": "Claim.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.modifierExtension", - "path": "Claim.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.identifier", - "path": "Claim.identifier", - "short": "Business Identifier for claim", - "definition": "A unique identifier assigned to this claim.", - "requirements": "Allows claims to be distinguished and referenced.", - "alias": [ - "Claim Number" - ], - "min": 0, - "max": "*", - "base": { - "path": "Claim.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "workflow", - "map": "Request.identifier" - }, - { - "identity": "w5", - "map": "FiveWs.identifier" - } - ] - }, - { - "id": "Claim.status", - "path": "Claim.status", - "short": "active | cancelled | draft | entered-in-error", - "definition": "The status of the resource instance.", - "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.", - "requirements": "Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.status", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ClaimStatus" - } - ], - "strength": "required", - "description": "A code specifying the state of the resource instance.", - "valueSet": "http://hl7.org/fhir/ValueSet/fm-status|4.3.0" - }, - "mapping": [ - { - "identity": "workflow", - "map": "Request.status" - }, - { - "identity": "w5", - "map": "FiveWs.status" - } - ] - }, - { - "id": "Claim.type", - "path": "Claim.type", - "short": "Category or discipline", - "definition": "The category of claim, e.g. oral, pharmacy, vision, institutional, professional.", - "comment": "The majority of jurisdictions use: oral, pharmacy, vision, professional and institutional, or variants on those terms, as the general styles of claims. The valueset is extensible to accommodate other jurisdictional requirements.", - "requirements": "Claim type determine the general sets of business rules applied for information requirements and adjudication.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.type", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ClaimType" - } - ], - "strength": "extensible", - "description": "The type or discipline-style of the claim.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-type" - }, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.class" - } - ] - }, - { - "id": "Claim.subType", - "path": "Claim.subType", - "short": "More granular claim type", - "definition": "A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.", - "comment": "This may contain the local bill type codes, for example the US UB-04 bill type code or the CMS bill type.", - "requirements": "Some jurisdictions need a finer grained claim type for routing and adjudication.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.subType", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ClaimSubType" - } - ], - "strength": "example", - "description": "A more granular claim typecode.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-subtype" - }, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.class" - } - ] - }, - { - "id": "Claim.use", - "path": "Claim.use", - "short": "claim | preauthorization | predetermination", - "definition": "A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future.", - "requirements": "This element is required to understand the nature of the request for adjudication.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.use", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Use" - } - ], - "strength": "required", - "description": "The purpose of the Claim: predetermination, preauthorization, claim.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-use|4.3.0" - }, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.class" - } - ] - }, - { - "id": "Claim.patient", - "path": "Claim.patient", - "short": "The recipient of the products and services", - "definition": "The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought.", - "requirements": "The patient must be supplied to the insurer so that confirmation of coverage and service history may be considered as part of the authorization and/or adjudiction.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.patient", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Patient" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "workflow", - "map": "Request.subject" - }, - { - "identity": "w5", - "map": "FiveWs.subject[x]" - }, - { - "identity": "w5", - "map": "FiveWs.subject" - } - ] - }, - { - "id": "Claim.billablePeriod", - "path": "Claim.billablePeriod", - "short": "Relevant time frame for the claim", - "definition": "The period for which charges are being submitted.", - "comment": "Typically this would be today or in the past for a claim, and today or in the future for preauthorizations and predeterminations. Typically line item dates of service should fall within the billing period if one is specified.", - "requirements": "A number jurisdictions required the submission of the billing period when submitting claims for example for hospital stays or long-term care.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.billablePeriod", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.done[x]" - } - ] - }, - { - "id": "Claim.created", - "path": "Claim.created", - "short": "Resource creation date", - "definition": "The date this resource was created.", - "comment": "This field is independent of the date of creation of the resource as it may reflect the creation date of a source document prior to digitization. Typically for claims all services must be completed as of this date.", - "requirements": "Need to record a timestamp for use by both the recipient and the issuer.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.created", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "dateTime" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "workflow", - "map": "Request.authoredOn" - }, - { - "identity": "w5", - "map": "FiveWs.recorded" - } - ] - }, - { - "id": "Claim.enterer", - "path": "Claim.enterer", - "short": "Author of the claim", - "definition": "Individual who created the claim, predetermination or preauthorization.", - "requirements": "Some jurisdictions require the contact information for personnel completing claims.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.enterer", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Practitioner", - "http://hl7.org/fhir/StructureDefinition/PractitionerRole" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.author" - } - ] - }, - { - "id": "Claim.insurer", - "path": "Claim.insurer", - "short": "Target", - "definition": "The Insurer who is target of the request.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.insurer", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "workflow", - "map": "Request.performer" - } - ] - }, - { - "id": "Claim.provider", - "path": "Claim.provider", - "short": "Party responsible for the claim", - "definition": "The provider which is responsible for the claim, predetermination or preauthorization.", - "comment": "Typically this field would be 1..1 where this party is responsible for the claim but not necessarily professionally responsible for the provision of the individual products and services listed below.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.provider", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Practitioner", - "http://hl7.org/fhir/StructureDefinition/PractitionerRole", - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "workflow", - "map": "Request.requester" - }, - { - "identity": "w5", - "map": "FiveWs.source" - } - ] - }, - { - "id": "Claim.priority", - "path": "Claim.priority", - "short": "Desired processing ugency", - "definition": "The provider-required urgency of processing the request. Typical values include: stat, routine deferred.", - "comment": "If a claim processor is unable to complete the processing as per the priority then they should generate and error and not process the request.", - "requirements": "The provider may need to indicate their processing requirements so that the processor can indicate if they are unable to comply.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.priority", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ProcessPriority" - } - ], - "strength": "example", - "description": "The timeliness with which processing is required: stat, normal, deferred.", - "valueSet": "http://hl7.org/fhir/ValueSet/process-priority" - }, - "mapping": [ - { - "identity": "workflow", - "map": "Request.priority" - } - ] - }, - { - "id": "Claim.fundsReserve", - "path": "Claim.fundsReserve", - "short": "For whom to reserve funds", - "definition": "A code to indicate whether and for whom funds are to be reserved for future claims.", - "comment": "This field is only used for preauthorizations.", - "requirements": "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", - "alias": [ - "Fund pre-allocation" - ], - "min": 0, - "max": "1", - "base": { - "path": "Claim.fundsReserve", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "FundsReserve" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "example", - "description": "For whom funds are to be reserved: (Patient, Provider, None).", - "valueSet": "http://hl7.org/fhir/ValueSet/fundsreserve" - } - }, - { - "id": "Claim.related", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "RelatedClaim" - } - ], - "path": "Claim.related", - "short": "Prior or corollary claims", - "definition": "Other claims which are related to this claim such as prior submissions or claims for related services or for the same event.", - "comment": "For example, for the original treatment and follow-up exams.", - "requirements": "For workplace or other accidents it is common to relate separate claims arising from the same event.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.related", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.related.id", - "path": "Claim.related.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.related.extension", - "path": "Claim.related.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.related.modifierExtension", - "path": "Claim.related.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.related.claim", - "path": "Claim.related.claim", - "short": "Reference to the related claim", - "definition": "Reference to a related claim.", - "requirements": "For workplace or other accidents it is common to relate separate claims arising from the same event.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.related.claim", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Claim" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "workflow", - "map": "Request.replaces" - } - ] - }, - { - "id": "Claim.related.relationship", - "path": "Claim.related.relationship", - "short": "How the reference claim is related", - "definition": "A code to convey how the claims are related.", - "comment": "For example, prior claim or umbrella.", - "requirements": "Some insurers need a declaration of the type of relationship.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.related.relationship", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "RelatedClaimRelationship" - } - ], - "strength": "example", - "description": "Relationship of this claim to a related Claim.", - "valueSet": "http://hl7.org/fhir/ValueSet/related-claim-relationship" - } - }, - { - "id": "Claim.related.reference", - "path": "Claim.related.reference", - "short": "File or case reference", - "definition": "An alternate organizational reference to the case or file to which this particular claim pertains.", - "comment": "For example, Property/Casualty insurer claim # or Workers Compensation case # .", - "requirements": "In cases where an event-triggered claim is being submitted to an insurer which requires a reference number to be specified on all exchanges.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.related.reference", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.prescription", - "path": "Claim.prescription", - "short": "Prescription authorizing services and products", - "definition": "Prescription to support the dispensing of pharmacy, device or vision products.", - "requirements": "Required to authorize the dispensing of controlled substances and devices.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.prescription", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/DeviceRequest", - "http://hl7.org/fhir/StructureDefinition/MedicationRequest", - "http://hl7.org/fhir/StructureDefinition/VisionPrescription" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.originalPrescription", - "path": "Claim.originalPrescription", - "short": "Original prescription if superseded by fulfiller", - "definition": "Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products.", - "comment": "For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefore issues a new prescription for an alternate medication which has the same therapeutic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'.", - "requirements": "Often required when a fulfiller varies what is fulfilled from that authorized on the original prescription.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.originalPrescription", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/DeviceRequest", - "http://hl7.org/fhir/StructureDefinition/MedicationRequest", - "http://hl7.org/fhir/StructureDefinition/VisionPrescription" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.payee", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Payee" - } - ], - "path": "Claim.payee", - "short": "Recipient of benefits payable", - "definition": "The party to be reimbursed for cost of the products and services according to the terms of the policy.", - "comment": "Often providers agree to receive the benefits payable to reduce the near-term costs to the patient. The insurer may decline to pay the provider and choose to pay the subscriber instead.", - "requirements": "The provider needs to specify who they wish to be reimbursed and the claims processor needs express who they will reimburse.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.payee", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.payee.id", - "path": "Claim.payee.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.payee.extension", - "path": "Claim.payee.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.payee.modifierExtension", - "path": "Claim.payee.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.payee.type", - "path": "Claim.payee.type", - "short": "Category of recipient", - "definition": "Type of Party to be reimbursed: subscriber, provider, other.", - "requirements": "Need to know who should receive payment with the most common situations being the Provider (assignment of benefits) or the Subscriber.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.payee.type", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "PayeeType" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "example", - "description": "A code for the party to be reimbursed.", - "valueSet": "http://hl7.org/fhir/ValueSet/payeetype" - } - }, - { - "id": "Claim.payee.party", - "path": "Claim.payee.party", - "short": "Recipient reference", - "definition": "Reference to the individual or organization to whom any payment will be made.", - "comment": "Not required if the payee is 'subscriber' or 'provider'.", - "requirements": "Need to provide demographics if the payee is not 'subscriber' nor 'provider'.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.payee.party", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Practitioner", - "http://hl7.org/fhir/StructureDefinition/PractitionerRole", - "http://hl7.org/fhir/StructureDefinition/Organization", - "http://hl7.org/fhir/StructureDefinition/Patient", - "http://hl7.org/fhir/StructureDefinition/RelatedPerson" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.referral", - "path": "Claim.referral", - "short": "Treatment referral", - "definition": "A reference to a referral resource.", - "comment": "The referral resource which lists the date, practitioner, reason and other supporting information.", - "requirements": "Some insurers require proof of referral to pay for services or to pay specialist rates for services.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.referral", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/ServiceRequest" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.cause" - } - ] - }, - { - "id": "Claim.facility", - "path": "Claim.facility", - "short": "Servicing facility", - "definition": "Facility where the services were provided.", - "requirements": "Insurance adjudication can be dependant on where services were delivered.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.facility", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Location" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.where[x]" - } - ] - }, - { - "id": "Claim.careTeam", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "CareTeam" - } - ], - "path": "Claim.careTeam", - "short": "Members of the care team", - "definition": "The members of the team who provided the products and services.", - "requirements": "Common to identify the responsible and supporting practitioners.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.careTeam", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.careTeam.id", - "path": "Claim.careTeam.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.careTeam.extension", - "path": "Claim.careTeam.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.careTeam.modifierExtension", - "path": "Claim.careTeam.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.careTeam.sequence", - "path": "Claim.careTeam.sequence", - "short": "Order of care team", - "definition": "A number to uniquely identify care team entries.", - "requirements": "Necessary to maintain the order of the care team and provide a mechanism to link individuals to claim details.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.careTeam.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.careTeam.provider", - "path": "Claim.careTeam.provider", - "short": "Practitioner or organization", - "definition": "Member of the team who provided the product or service.", - "requirements": "Often a regulatory requirement to specify the responsible provider.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.careTeam.provider", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Practitioner", - "http://hl7.org/fhir/StructureDefinition/PractitionerRole", - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.actor" - } - ] - }, - { - "id": "Claim.careTeam.responsible", - "path": "Claim.careTeam.responsible", - "short": "Indicator of the lead practitioner", - "definition": "The party who is billing and/or responsible for the claimed products or services.", - "comment": "Responsible might not be required when there is only a single provider listed.", - "requirements": "When multiple parties are present it is required to distinguish the lead or responsible individual.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.careTeam.responsible", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.careTeam.role", - "path": "Claim.careTeam.role", - "short": "Function within the team", - "definition": "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", - "comment": "Role might not be required when there is only a single provider listed.", - "requirements": "When multiple parties are present it is required to distinguish the roles performed by each member.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.careTeam.role", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "CareTeamRole" - } - ], - "strength": "example", - "description": "The role codes for the care team members.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-careteamrole" - } - }, - { - "id": "Claim.careTeam.qualification", - "path": "Claim.careTeam.qualification", - "short": "Practitioner credential or specialization", - "definition": "The qualification of the practitioner which is applicable for this service.", - "requirements": "Need to specify which qualification a provider is delivering the product or service under.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.careTeam.qualification", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ProviderQualification" - } - ], - "strength": "example", - "description": "Provider professional qualifications.", - "valueSet": "http://hl7.org/fhir/ValueSet/provider-qualification" - } - }, - { - "id": "Claim.supportingInfo", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "SupportingInformation" - } - ], - "path": "Claim.supportingInfo", - "short": "Supporting information", - "definition": "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", - "comment": "Often there are multiple jurisdiction specific valuesets which are required.", - "requirements": "Typically these information codes are required to support the services rendered or the adjudication of the services rendered.", - "alias": [ - "Attachments\nException Codes\nOccurrence Codes\nValue codes" - ], - "min": 0, - "max": "*", - "base": { - "path": "Claim.supportingInfo", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "workflow", - "map": "Request.supportingInfo" - } - ] - }, - { - "id": "Claim.supportingInfo.id", - "path": "Claim.supportingInfo.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.supportingInfo.extension", - "path": "Claim.supportingInfo.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.supportingInfo.modifierExtension", - "path": "Claim.supportingInfo.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.supportingInfo.sequence", - "path": "Claim.supportingInfo.sequence", - "short": "Information instance identifier", - "definition": "A number to uniquely identify supporting information entries.", - "requirements": "Necessary to maintain the order of the supporting information items and provide a mechanism to link to claim details.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.supportingInfo.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.supportingInfo.category", - "path": "Claim.supportingInfo.category", - "short": "Classification of the supplied information", - "definition": "The general class of the information supplied: information; exception; accident, employment; onset, etc.", - "comment": "This may contain a category for the local bill type codes.", - "requirements": "Required to group or associate information items with common characteristics. For example: admission information or prior treatments.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.supportingInfo.category", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "InformationCategory" - } - ], - "strength": "example", - "description": "The valuset used for additional information category codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-informationcategory" - } - }, - { - "id": "Claim.supportingInfo.code", - "path": "Claim.supportingInfo.code", - "short": "Type of information", - "definition": "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", - "requirements": "Required to identify the kind of additional information.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.supportingInfo.code", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "InformationCode" - } - ], - "strength": "example", - "description": "The valuset used for additional information codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-exception" - } - }, - { - "id": "Claim.supportingInfo.timing[x]", - "path": "Claim.supportingInfo.timing[x]", - "short": "When it occurred", - "definition": "The date when or period to which this information refers.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.supportingInfo.timing[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "date" - }, - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.supportingInfo.value[x]", - "path": "Claim.supportingInfo.value[x]", - "short": "Data to be provided", - "definition": "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - "comment": "Could be used to provide references to other resources, document. For example could contain a PDF in an Attachment of the Police Report for an Accident.", - "requirements": "To convey the data content to be provided when the information is more than a simple code or period.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.supportingInfo.value[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - }, - { - "code": "string" - }, - { - "code": "Quantity" - }, - { - "code": "Attachment" - }, - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Resource" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.supportingInfo.reason", - "path": "Claim.supportingInfo.reason", - "short": "Explanation for the information", - "definition": "Provides the reason in the situation where a reason code is required in addition to the content.", - "comment": "For example: the reason for the additional stay, or why a tooth is missing.", - "requirements": "Needed when the supporting information has both a date and amount/value and requires explanation.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.supportingInfo.reason", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "MissingReason" - } - ], - "strength": "example", - "description": "Reason codes for the missing teeth.", - "valueSet": "http://hl7.org/fhir/ValueSet/missing-tooth-reason" - } - }, - { - "id": "Claim.diagnosis", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Diagnosis" - } - ], - "path": "Claim.diagnosis", - "short": "Pertinent diagnosis information", - "definition": "Information about diagnoses relevant to the claim items.", - "requirements": "Required for the adjudication by provided context for the services and product listed.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.diagnosis", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "workflow", - "map": "Request.reasonReference" - } - ] - }, - { - "id": "Claim.diagnosis.id", - "path": "Claim.diagnosis.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.diagnosis.extension", - "path": "Claim.diagnosis.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.diagnosis.modifierExtension", - "path": "Claim.diagnosis.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.diagnosis.sequence", - "path": "Claim.diagnosis.sequence", - "short": "Diagnosis instance identifier", - "definition": "A number to uniquely identify diagnosis entries.", - "comment": "Diagnosis are presented in list order to their expected importance: primary, secondary, etc.", - "requirements": "Necessary to maintain the order of the diagnosis items and provide a mechanism to link to claim details.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.diagnosis.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.diagnosis.diagnosis[x]", - "path": "Claim.diagnosis.diagnosis[x]", - "short": "Nature of illness or problem", - "definition": "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", - "requirements": "Provides health context for the evaluation of the products and/or services.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.diagnosis.diagnosis[x]", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - }, - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Condition" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ICD10" - } - ], - "strength": "example", - "description": "Example ICD10 Diagnostic codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/icd-10" - } - }, - { - "id": "Claim.diagnosis.type", - "path": "Claim.diagnosis.type", - "short": "Timing or nature of the diagnosis", - "definition": "When the condition was observed or the relative ranking.", - "comment": "For example: admitting, primary, secondary, discharge.", - "requirements": "Often required to capture a particular diagnosis, for example: primary or discharge.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.diagnosis.type", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "DiagnosisType" - } - ], - "strength": "example", - "description": "The type of the diagnosis: admitting, principal, discharge.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-diagnosistype" - } - }, - { - "id": "Claim.diagnosis.onAdmission", - "path": "Claim.diagnosis.onAdmission", - "short": "Present on admission", - "definition": "Indication of whether the diagnosis was present on admission to a facility.", - "requirements": "Many systems need to understand for adjudication if the diagnosis was present a time of admission.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.diagnosis.onAdmission", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "DiagnosisOnAdmission" - } - ], - "strength": "example", - "description": "Present on admission.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission" - } - }, - { - "id": "Claim.diagnosis.packageCode", - "path": "Claim.diagnosis.packageCode", - "short": "Package billing code", - "definition": "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", - "comment": "For example DRG (Diagnosis Related Group) or a bundled billing code. A patient may have a diagnosis of a Myocardial Infarction and a DRG for HeartAttack would be assigned. The Claim item (and possible subsequent claims) would refer to the DRG for those line items that were for services related to the heart attack event.", - "requirements": "Required to relate the current diagnosis to a package billing code that is then referenced on the individual claim items which are specific to the health condition covered by the package code.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.diagnosis.packageCode", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "DiagnosisRelatedGroup" - } - ], - "strength": "example", - "description": "The DRG codes associated with the diagnosis.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup" - } - }, - { - "id": "Claim.procedure", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Procedure" - } - ], - "path": "Claim.procedure", - "short": "Clinical procedures performed", - "definition": "Procedures performed on the patient relevant to the billing items with the claim.", - "requirements": "The specific clinical invention are sometimes required to be provided to justify billing a greater than customary amount for a service.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.procedure", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.procedure.id", - "path": "Claim.procedure.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.procedure.extension", - "path": "Claim.procedure.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.procedure.modifierExtension", - "path": "Claim.procedure.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.procedure.sequence", - "path": "Claim.procedure.sequence", - "short": "Procedure instance identifier", - "definition": "A number to uniquely identify procedure entries.", - "requirements": "Necessary to provide a mechanism to link to claim details.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.procedure.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.procedure.type", - "path": "Claim.procedure.type", - "short": "Category of Procedure", - "definition": "When the condition was observed or the relative ranking.", - "comment": "For example: primary, secondary.", - "requirements": "Often required to capture a particular diagnosis, for example: primary or discharge.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.procedure.type", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ProcedureType" - } - ], - "strength": "example", - "description": "Example procedure type codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-procedure-type" - } - }, - { - "id": "Claim.procedure.date", - "path": "Claim.procedure.date", - "short": "When the procedure was performed", - "definition": "Date and optionally time the procedure was performed.", - "requirements": "Required for auditing purposes.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.procedure.date", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "dateTime" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.procedure.procedure[x]", - "path": "Claim.procedure.procedure[x]", - "short": "Specific clinical procedure", - "definition": "The code or reference to a Procedure resource which identifies the clinical intervention performed.", - "requirements": "This identifies the actual clinical procedure.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.procedure.procedure[x]", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - }, - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Procedure" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ICD10_Procedures" - } - ], - "strength": "example", - "description": "Example ICD10 Procedure codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/icd-10-procedures" - } - }, - { - "id": "Claim.procedure.udi", - "path": "Claim.procedure.udi", - "short": "Unique device identifier", - "definition": "Unique Device Identifiers associated with this line item.", - "requirements": "The UDI code allows the insurer to obtain device level information on the product supplied.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.procedure.udi", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Device" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.insurance", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Insurance" - } - ], - "path": "Claim.insurance", - "short": "Patient insurance information", - "definition": "Financial instruments for reimbursement for the health care products and services specified on the claim.", - "comment": "All insurance coverages for the patient which may be applicable for reimbursement, of the products and services listed in the claim, are typically provided in the claim to allow insurers to confirm the ordering of the insurance coverages relative to local 'coordination of benefit' rules. One coverage (and only one) with 'focal=true' is to be used in the adjudication of this claim. Coverages appearing before the focal Coverage in the list, and where 'Coverage.subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim.", - "requirements": "At least one insurer is required for a claim to be a claim.", - "min": 1, - "max": "*", - "base": { - "path": "Claim.insurance", - "min": 1, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "Coverage" - } - ] - }, - { - "id": "Claim.insurance.id", - "path": "Claim.insurance.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.insurance.extension", - "path": "Claim.insurance.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.insurance.modifierExtension", - "path": "Claim.insurance.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.insurance.sequence", - "path": "Claim.insurance.sequence", - "short": "Insurance instance identifier", - "definition": "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", - "requirements": "To maintain order of the coverages.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.insurance.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Claim.insurance.focal", - "path": "Claim.insurance.focal", - "short": "Coverage to be used for adjudication", - "definition": "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", - "comment": "A patient may (will) have multiple insurance policies which provide reimbursement for healthcare services and products. For example a person may also be covered by their spouse's policy and both appear in the list (and may be from the same insurer). This flag will be set to true for only one of the listed policies and that policy will be used for adjudicating this claim. Other claims would be created to request adjudication against the other listed policies.", - "requirements": "To identify which coverage in the list is being used to adjudicate this claim.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.insurance.focal", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Claim.insurance.identifier", - "path": "Claim.insurance.identifier", - "short": "Pre-assigned Claim number", - "definition": "The business identifier to be used when the claim is sent for adjudication against this insurance policy.", - "comment": "Only required in jurisdictions where insurers, rather than the provider, are required to send claims to insurers that appear after them in the list. This element is not required when 'subrogation=true'.", - "requirements": "This will be the claim number should it be necessary to create this claim in the future. This is provided so that payors may forward claims to other payors in the Coordination of Benefit for adjudication rather than the provider being required to initiate each adjudication.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.insurance.identifier", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Identifier" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "workflow", - "map": "Request.identifier" - }, - { - "identity": "w5", - "map": "FiveWs.identifier" - } - ] - }, - { - "id": "Claim.insurance.coverage", - "path": "Claim.insurance.coverage", - "short": "Insurance information", - "definition": "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", - "requirements": "Required to allow the adjudicator to locate the correct policy and history within their information system.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.insurance.coverage", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Coverage" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Claim.insurance.businessArrangement", - "path": "Claim.insurance.businessArrangement", - "short": "Additional provider contract number", - "definition": "A business agreement number established between the provider and the insurer for special business processing purposes.", - "requirements": "Providers may have multiple business arrangements with a given insurer and must supply the specific contract number for adjudication.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.insurance.businessArrangement", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "string" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.insurance.preAuthRef", - "path": "Claim.insurance.preAuthRef", - "short": "Prior authorization reference number", - "definition": "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", - "comment": "This value is an alphanumeric string that may be provided over the phone, via text, via paper, or within a ClaimResponse resource and is not a FHIR Identifier.", - "requirements": "Providers must quote previously issued authorization reference numbers in order to obtain adjudication as previously advised on the Preauthorization.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.insurance.preAuthRef", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "string" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.insurance.claimResponse", - "path": "Claim.insurance.claimResponse", - "short": "Adjudication results", - "definition": "The result of the adjudication of the line items for the Coverage specified in this insurance.", - "comment": "Must not be specified when 'focal=true' for this insurance.", - "requirements": "An insurer need the adjudication results from prior insurers to determine the outstanding balance remaining by item for the items in the curent claim.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.insurance.claimResponse", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/ClaimResponse" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.accident", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Accident" - } - ], - "path": "Claim.accident", - "short": "Details of the event", - "definition": "Details of an accident which resulted in injuries which required the products and services listed in the claim.", - "requirements": "When healthcare products and services are accident related, benefits may be payable under accident provisions of policies, such as automotive, etc before they are payable under normal health insurance.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.accident", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.accident.id", - "path": "Claim.accident.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.accident.extension", - "path": "Claim.accident.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.accident.modifierExtension", - "path": "Claim.accident.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.accident.date", - "path": "Claim.accident.date", - "short": "When the incident occurred", - "definition": "Date of an accident event related to the products and services contained in the claim.", - "comment": "The date of the accident has to precede the dates of the products and services but within a reasonable timeframe.", - "requirements": "Required for audit purposes and adjudication.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.accident.date", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "date" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.accident.type", - "path": "Claim.accident.type", - "short": "The nature of the accident", - "definition": "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", - "requirements": "Coverage may be dependant on the type of accident.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.accident.type", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "AccidentType" - } - ], - "strength": "extensible", - "description": "Type of accident: work place, auto, etc.", - "valueSet": "http://terminology.hl7.org/ValueSet/v3-ActIncidentCode" - } - }, - { - "id": "Claim.accident.location[x]", - "path": "Claim.accident.location[x]", - "short": "Where the event occurred", - "definition": "The physical location of the accident event.", - "requirements": "Required for audit purposes and determination of applicable insurance liability.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.accident.location[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Address" - }, - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Location" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Item" - } - ], - "path": "Claim.item", - "short": "Product or service provided", - "definition": "A claim line. Either a simple product or service or a 'group' of details which can each be a simple items or groups of sub-details.", - "requirements": "The items to be processed for adjudication.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.id", - "path": "Claim.item.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.item.extension", - "path": "Claim.item.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.item.modifierExtension", - "path": "Claim.item.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.item.sequence", - "path": "Claim.item.sequence", - "short": "Item instance identifier", - "definition": "A number to uniquely identify item entries.", - "requirements": "Necessary to provide a mechanism to link to items from within the claim and within the adjudication details of the ClaimResponse.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.item.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.careTeamSequence", - "path": "Claim.item.careTeamSequence", - "short": "Applicable careTeam members", - "definition": "CareTeam members related to this service or product.", - "requirements": "Need to identify the individuals and their roles in the provision of the product or service.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.careTeamSequence", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.diagnosisSequence", - "path": "Claim.item.diagnosisSequence", - "short": "Applicable diagnoses", - "definition": "Diagnosis applicable for this service or product.", - "requirements": "Need to related the product or service to the associated diagnoses.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.diagnosisSequence", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.procedureSequence", - "path": "Claim.item.procedureSequence", - "short": "Applicable procedures", - "definition": "Procedures applicable for this service or product.", - "requirements": "Need to provide any listed specific procedures to support the product or service being claimed.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.procedureSequence", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.informationSequence", - "path": "Claim.item.informationSequence", - "short": "Applicable exception and supporting information", - "definition": "Exceptions, special conditions and supporting information applicable for this service or product.", - "requirements": "Need to reference the supporting information items that relate directly to this product or service.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.informationSequence", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.revenue", - "path": "Claim.item.revenue", - "short": "Revenue or cost center code", - "definition": "The type of revenue or cost center providing the product and/or service.", - "requirements": "Needed in the processing of institutional claims.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.revenue", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "RevenueCenter" - } - ], - "strength": "example", - "description": "Codes for the revenue or cost centers supplying the service and/or products.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-revenue-center" - } - }, - { - "id": "Claim.item.category", - "path": "Claim.item.category", - "short": "Benefit classification", - "definition": "Code to identify the general type of benefits under which products and services are provided.", - "comment": "Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage.", - "requirements": "Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.category", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "BenefitCategory" - } - ], - "strength": "example", - "description": "Benefit categories such as: oral-basic, major, glasses.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-benefitcategory" - } - }, - { - "id": "Claim.item.productOrService", - "path": "Claim.item.productOrService", - "short": "Billing, service, product, or drug code", - "definition": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - "comment": "If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'.", - "requirements": "Necessary to state what was provided or done.", - "alias": [ - "Drug Code", - "Bill Code", - "Service Code" - ], - "min": 1, - "max": "1", - "base": { - "path": "Claim.item.productOrService", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ServiceProduct" - } - ], - "strength": "example", - "description": "Allowable service and product codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/service-uscls" - } - }, - { - "id": "Claim.item.modifier", - "path": "Claim.item.modifier", - "short": "Product or service billing modifiers", - "definition": "Item typification or modifiers codes to convey additional context for the product or service.", - "comment": "For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or outside of office hours.", - "requirements": "To support inclusion of the item for adjudication or to charge an elevated fee.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.modifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Modifiers" - } - ], - "strength": "example", - "description": "Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-modifiers" - } - }, - { - "id": "Claim.item.programCode", - "path": "Claim.item.programCode", - "short": "Program the product or service is provided under", - "definition": "Identifies the program under which this may be recovered.", - "comment": "For example: Neonatal program, child dental program or drug users recovery program.", - "requirements": "Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.programCode", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ProgramCode" - } - ], - "strength": "example", - "description": "Program specific reason codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-program-code" - } - }, - { - "id": "Claim.item.serviced[x]", - "path": "Claim.item.serviced[x]", - "short": "Date or dates of service or product delivery", - "definition": "The date or dates when the service or product was supplied, performed or completed.", - "requirements": "Needed to determine whether the service or product was provided during the term of the insurance coverage.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.serviced[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "date" - }, - { - "code": "Period" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.done[x]" - } - ] - }, - { - "id": "Claim.item.location[x]", - "path": "Claim.item.location[x]", - "short": "Place of service or where product was supplied", - "definition": "Where the product or service was provided.", - "requirements": "The location can alter whether the item was acceptable for insurance purposes or impact the determination of the benefit amount.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.location[x]", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - }, - { - "code": "Address" - }, - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Location" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ServicePlace" - } - ], - "strength": "example", - "description": "Place of service: pharmacy, school, prison, etc.", - "valueSet": "http://hl7.org/fhir/ValueSet/service-place" - }, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.where[x]" - } - ] - }, - { - "id": "Claim.item.quantity", - "path": "Claim.item.quantity", - "short": "Count of products or services", - "definition": "The number of repetitions of a service or product.", - "requirements": "Required when the product or service code does not convey the quantity provided.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.quantity", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Quantity", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.unitPrice", - "path": "Claim.item.unitPrice", - "short": "Fee, charge or cost per item", - "definition": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - "requirements": "The amount charged to the patient by the provider for a single unit.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.unitPrice", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Money" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.factor", - "path": "Claim.item.factor", - "short": "Price scaling factor", - "definition": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - "comment": "To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10).", - "requirements": "When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.factor", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "decimal" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.net", - "path": "Claim.item.net", - "short": "Total item cost", - "definition": "The quantity times the unit price for an additional service or product or charge.", - "comment": "For example, the formula: quantity * unitPrice * factor = net. Quantity and factor are assumed to be 1 if not supplied.", - "requirements": "Provides the total amount claimed for the group (if a grouper) or the line item.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.net", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Money" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.udi", - "path": "Claim.item.udi", - "short": "Unique device identifier", - "definition": "Unique Device Identifiers associated with this line item.", - "requirements": "The UDI code allows the insurer to obtain device level information on the product supplied.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.udi", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Device" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.bodySite", - "path": "Claim.item.bodySite", - "short": "Anatomical location", - "definition": "Physical service site on the patient (limb, tooth, etc.).", - "comment": "For example: Providing a tooth code, allows an insurer to identify a provider performing a filling on a tooth that was previously removed.", - "requirements": "Allows insurer to validate specific procedures.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.bodySite", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "OralSites" - } - ], - "strength": "example", - "description": "The code for the teeth, quadrant, sextant and arch.", - "valueSet": "http://hl7.org/fhir/ValueSet/tooth" - } - }, - { - "id": "Claim.item.subSite", - "path": "Claim.item.subSite", - "short": "Anatomical sub-location", - "definition": "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", - "requirements": "Allows insurer to validate specific procedures.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.subSite", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Surface" - } - ], - "strength": "example", - "description": "The code for the tooth surface and surface combinations.", - "valueSet": "http://hl7.org/fhir/ValueSet/surface" - } - }, - { - "id": "Claim.item.encounter", - "path": "Claim.item.encounter", - "short": "Encounters related to this billed item", - "definition": "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.", - "comment": "This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter.", - "requirements": "Used in some jurisdictions to link clinical events to claim items.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.encounter", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Encounter" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "workflow", - "map": "Request.context" - } - ] - }, - { - "id": "Claim.item.detail", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "Detail" - } - ], - "path": "Claim.item.detail", - "short": "Product or service provided", - "definition": "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", - "requirements": "The items to be processed for adjudication.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.id", - "path": "Claim.item.detail.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.item.detail.extension", - "path": "Claim.item.detail.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.item.detail.modifierExtension", - "path": "Claim.item.detail.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.item.detail.sequence", - "path": "Claim.item.detail.sequence", - "short": "Item instance identifier", - "definition": "A number to uniquely identify item entries.", - "requirements": "Necessary to provide a mechanism to link to items from within the claim and within the adjudication details of the ClaimResponse.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.item.detail.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.revenue", - "path": "Claim.item.detail.revenue", - "short": "Revenue or cost center code", - "definition": "The type of revenue or cost center providing the product and/or service.", - "requirements": "Needed in the processing of institutional claims.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.revenue", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "RevenueCenter" - } - ], - "strength": "example", - "description": "Codes for the revenue or cost centers supplying the service and/or products.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-revenue-center" - } - }, - { - "id": "Claim.item.detail.category", - "path": "Claim.item.detail.category", - "short": "Benefit classification", - "definition": "Code to identify the general type of benefits under which products and services are provided.", - "comment": "Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage.", - "requirements": "Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.category", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "BenefitCategory" - } - ], - "strength": "example", - "description": "Benefit categories such as: oral-basic, major, glasses.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-benefitcategory" - } - }, - { - "id": "Claim.item.detail.productOrService", - "path": "Claim.item.detail.productOrService", - "short": "Billing, service, product, or drug code", - "definition": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - "comment": "If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'.", - "requirements": "Necessary to state what was provided or done.", - "alias": [ - "Drug Code", - "Bill Code", - "Service Code" - ], - "min": 1, - "max": "1", - "base": { - "path": "Claim.item.detail.productOrService", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ServiceProduct" - } - ], - "strength": "example", - "description": "Allowable service and product codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/service-uscls" - } - }, - { - "id": "Claim.item.detail.modifier", - "path": "Claim.item.detail.modifier", - "short": "Service/Product billing modifiers", - "definition": "Item typification or modifiers codes to convey additional context for the product or service.", - "comment": "For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours.", - "requirements": "To support inclusion of the item for adjudication or to charge an elevated fee.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail.modifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Modifiers" - } - ], - "strength": "example", - "description": "Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-modifiers" - } - }, - { - "id": "Claim.item.detail.programCode", - "path": "Claim.item.detail.programCode", - "short": "Program the product or service is provided under", - "definition": "Identifies the program under which this may be recovered.", - "comment": "For example: Neonatal program, child dental program or drug users recovery program.", - "requirements": "Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail.programCode", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ProgramCode" - } - ], - "strength": "example", - "description": "Program specific reason codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-program-code" - } - }, - { - "id": "Claim.item.detail.quantity", - "path": "Claim.item.detail.quantity", - "short": "Count of products or services", - "definition": "The number of repetitions of a service or product.", - "requirements": "Required when the product or service code does not convey the quantity provided.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.quantity", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Quantity", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.unitPrice", - "path": "Claim.item.detail.unitPrice", - "short": "Fee, charge or cost per item", - "definition": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - "requirements": "The amount charged to the patient by the provider for a single unit.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.unitPrice", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Money" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.factor", - "path": "Claim.item.detail.factor", - "short": "Price scaling factor", - "definition": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - "comment": "To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10).", - "requirements": "When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.factor", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "decimal" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.net", - "path": "Claim.item.detail.net", - "short": "Total item cost", - "definition": "The quantity times the unit price for an additional service or product or charge.", - "comment": "For example, the formula: quantity * unitPrice * factor = net. Quantity and factor are assumed to be 1 if not supplied.", - "requirements": "Provides the total amount claimed for the group (if a grouper) or the line item.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.net", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Money" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.udi", - "path": "Claim.item.detail.udi", - "short": "Unique device identifier", - "definition": "Unique Device Identifiers associated with this line item.", - "requirements": "The UDI code allows the insurer to obtain device level information on the product supplied.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail.udi", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Device" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.subDetail", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", - "valueString": "SubDetail" - } - ], - "path": "Claim.item.detail.subDetail", - "short": "Product or service provided", - "definition": "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", - "requirements": "The items to be processed for adjudication.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail.subDetail", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.subDetail.id", - "path": "Claim.item.detail.subDetail.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.item.detail.subDetail.extension", - "path": "Claim.item.detail.subDetail.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Claim.item.detail.subDetail.modifierExtension", - "path": "Claim.item.detail.subDetail.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Claim.item.detail.subDetail.sequence", - "path": "Claim.item.detail.subDetail.sequence", - "short": "Item instance identifier", - "definition": "A number to uniquely identify item entries.", - "requirements": "Necessary to provide a mechanism to link to items from within the claim and within the adjudication details of the ClaimResponse.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.sequence", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "positiveInt" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.subDetail.revenue", - "path": "Claim.item.detail.subDetail.revenue", - "short": "Revenue or cost center code", - "definition": "The type of revenue or cost center providing the product and/or service.", - "requirements": "Needed in the processing of institutional claims.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.revenue", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "RevenueCenter" - } - ], - "strength": "example", - "description": "Codes for the revenue or cost centers supplying the service and/or products.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-revenue-center" - } - }, - { - "id": "Claim.item.detail.subDetail.category", - "path": "Claim.item.detail.subDetail.category", - "short": "Benefit classification", - "definition": "Code to identify the general type of benefits under which products and services are provided.", - "comment": "Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage.", - "requirements": "Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.category", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "BenefitCategory" - } - ], - "strength": "example", - "description": "Benefit categories such as: oral-basic, major, glasses.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-benefitcategory" - } - }, - { - "id": "Claim.item.detail.subDetail.productOrService", - "path": "Claim.item.detail.subDetail.productOrService", - "short": "Billing, service, product, or drug code", - "definition": "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - "comment": "If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'.", - "requirements": "Necessary to state what was provided or done.", - "min": 1, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.productOrService", - "min": 1, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ServiceProduct" - } - ], - "strength": "example", - "description": "Allowable service and product codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/service-uscls" - } - }, - { - "id": "Claim.item.detail.subDetail.modifier", - "path": "Claim.item.detail.subDetail.modifier", - "short": "Service/Product billing modifiers", - "definition": "Item typification or modifiers codes to convey additional context for the product or service.", - "comment": "For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours.", - "requirements": "To support inclusion of the item for adjudication or to charge an elevated fee.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail.subDetail.modifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Modifiers" - } - ], - "strength": "example", - "description": "Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", - "valueSet": "http://hl7.org/fhir/ValueSet/claim-modifiers" - } - }, - { - "id": "Claim.item.detail.subDetail.programCode", - "path": "Claim.item.detail.subDetail.programCode", - "short": "Program the product or service is provided under", - "definition": "Identifies the program under which this may be recovered.", - "comment": "For example: Neonatal program, child dental program or drug users recovery program.", - "requirements": "Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail.subDetail.programCode", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ProgramCode" - } - ], - "strength": "example", - "description": "Program specific reason codes.", - "valueSet": "http://hl7.org/fhir/ValueSet/ex-program-code" - } - }, - { - "id": "Claim.item.detail.subDetail.quantity", - "path": "Claim.item.detail.subDetail.quantity", - "short": "Count of products or services", - "definition": "The number of repetitions of a service or product.", - "requirements": "Required when the product or service code does not convey the quantity provided.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.quantity", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Quantity", - "profile": [ - "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.subDetail.unitPrice", - "path": "Claim.item.detail.subDetail.unitPrice", - "short": "Fee, charge or cost per item", - "definition": "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - "requirements": "The amount charged to the patient by the provider for a single unit.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.unitPrice", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Money" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.subDetail.factor", - "path": "Claim.item.detail.subDetail.factor", - "short": "Price scaling factor", - "definition": "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - "comment": "To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10).", - "requirements": "When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.factor", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "decimal" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.subDetail.net", - "path": "Claim.item.detail.subDetail.net", - "short": "Total item cost", - "definition": "The quantity times the unit price for an additional service or product or charge.", - "comment": "For example, the formula: quantity * unitPrice * factor = net. Quantity and factor are assumed to be 1 if not supplied.", - "requirements": "Provides the total amount claimed for the group (if a grouper) or the line item.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.item.detail.subDetail.net", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Money" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.item.detail.subDetail.udi", - "path": "Claim.item.detail.subDetail.udi", - "short": "Unique device identifier", - "definition": "Unique Device Identifiers associated with this line item.", - "requirements": "The UDI code allows the insurer to obtain device level information on the product supplied.", - "min": 0, - "max": "*", - "base": { - "path": "Claim.item.detail.subDetail.udi", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Device" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - }, - { - "id": "Claim.total", - "path": "Claim.total", - "short": "Total claim cost", - "definition": "The total value of the all the items in the claim.", - "requirements": "Used for control total purposes.", - "min": 0, - "max": "1", - "base": { - "path": "Claim.total", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Money" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false - } - ] - }, - "differential": { - "element": [ - { - "id": "Claim.id", - "path": "Claim.id", - "label": "Claim Id", - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Claim.status", - "path": "Claim.status", - "type": [ - { - "code": "string" - } - ], - "fixedString": "active" - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOrganization.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOrganization.json deleted file mode 100644 index 33daa518b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOrganization.json +++ /dev/null @@ -1,1461 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "RouteOneOrganization", - "meta": { - "lastUpdated": "2022-05-28T12:47:40.239+10:00" - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category", - "valueString": "Base.Entities" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", - "valueCode": "trial-use" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", - "valueInteger": 3 - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category", - "valueCode": "business" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", - "valueCode": "pa" - } - ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization", - "version": "4.3.0", - "name": "RouteOneOrganization", - "title": "Facility Information", - "status": "draft", - "experimental": false, - "date": "2022-05-28T12:47:40+10:00", - "publisher": "Health Level Seven International (Patient Administration)", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/fhir" - } - ] - }, - { - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pafm/index.cfm" - } - ] - } - ], - "description": "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.", - "fhirVersion": "4.3.0", - "mapping": [ - { - "identity": "v2", - "uri": "http://hl7.org/v2", - "name": "HL7 v2 Mapping" - }, - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - }, - { - "identity": "servd", - "uri": "http://www.omg.org/spec/ServD/1.0/", - "name": "ServD" - }, - { - "identity": "w5", - "uri": "http://hl7.org/fhir/fivews", - "name": "FiveWs Pattern Mapping" - } - ], - "kind": "resource", - "abstract": false, - "type": "Organization", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Organization", - "derivation": "specialization", - "snapshot": { - "element": [ - { - "id": "Organization", - "path": "Organization", - "short": "A grouping of people or organizations with a common purpose", - "definition": "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.", - "min": 0, - "max": "*", - "base": { - "path": "Organization", - "min": 0, - "max": "*" - }, - "constraint": [ - { - "key": "dom-2", - "severity": "error", - "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", - "expression": "contained.contained.empty()", - "xpath": "not(parent::f:contained and f:contained)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-3", - "severity": "error", - "human": "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": "contained.where(((id.exists() and ('#'+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(uri) = '#').exists()).not()).trace('unmatched', id).empty()", - "xpath": "not(exists(for $contained in f:contained return $contained[not(exists(parent::*/descendant::f:reference/@value=concat('#', $contained/*/f:id/@value)) or exists(descendant::f:reference[@value='#']))]))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-4", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", - "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "dom-5", - "severity": "error", - "human": "If a resource is contained in another resource, it SHALL NOT have a security label", - "expression": "contained.meta.security.empty()", - "xpath": "not(exists(f:contained/*/f:meta/f:security))", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", - "valueMarkdown": "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." - } - ], - "key": "dom-6", - "severity": "warning", - "human": "A resource should have narrative for robust management", - "expression": "text.`div`.exists()", - "xpath": "exists(f:text/h:div)", - "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" - }, - { - "key": "org-1", - "severity": "error", - "human": "The organization SHALL at least have a name or an identifier, and possibly more than one", - "expression": "(identifier.count() + name.count()) > 0", - "xpath": "count(f:identifier | f:name) > 0", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Entity. Role, or Act" - }, - { - "identity": "v2", - "map": "(also see master files messages)" - }, - { - "identity": "rim", - "map": "Organization(classCode=ORG, determinerCode=INST)" - }, - { - "identity": "servd", - "map": "Organization" - }, - { - "identity": "w5", - "map": "administrative.group" - } - ] - }, - { - "id": "Organization.id", - "path": "Organization.id", - "short": "Logical id of this artifact", - "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "id" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Organization.meta", - "path": "Organization.meta", - "short": "Metadata about the resource", - "definition": "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": 0, - "max": "1", - "base": { - "path": "Resource.meta", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Meta" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true - }, - { - "id": "Organization.implicitRules", - "path": "Organization.implicitRules", - "short": "A set of rules under which this content was created", - "definition": "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": "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": 0, - "max": "1", - "base": { - "path": "Resource.implicitRules", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "uri" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "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": true - }, - { - "id": "Organization.language", - "path": "Organization.language", - "short": "Language of the resource content", - "definition": "The base language in which the resource is written.", - "comment": "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": 0, - "max": "1", - "base": { - "path": "Resource.language", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "code" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", - "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "Language" - }, - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", - "valueBoolean": true - } - ], - "strength": "preferred", - "description": "IETF language tag", - "valueSet": "http://hl7.org/fhir/ValueSet/languages" - } - }, - { - "id": "Organization.text", - "path": "Organization.text", - "short": "Text summary of the resource, for human interpretation", - "definition": "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": "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": [ - "narrative", - "html", - "xhtml", - "display" - ], - "min": 0, - "max": "1", - "base": { - "path": "DomainResource.text", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Narrative" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "Act.text?" - } - ] - }, - { - "id": "Organization.contained", - "path": "Organization.contained", - "short": "Contained, inline Resources", - "definition": "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": "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": [ - "inline resources", - "anonymous resources", - "contained resources" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.contained", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Resource" - } - ], - "constraint": [ - { - "key": "dom-r4b", - "severity": "warning", - "human": "Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems", - "expression": "($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)", - "xpath": "not(f:Citation|f:Evidence|f:EvidenceReport|f:EvidenceVariable|f:MedicinalProductDefinition|f:PackagedProductDefinition|f:AdministrableProductDefinition|f:Ingredient|f:ClinicalUseDefinition|f:RegulatedAuthorization|f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic) or not(parent::f:Citation|parent::f:Evidence|parent::f:EvidenceReport|parent::f:EvidenceVariable|parent::f:MedicinalProductDefinition|parent::f:PackagedProductDefinition|parent::f:AdministrableProductDefinition|parent::f:Ingredient|parent::f:ClinicalUseDefinition|parent::f:RegulatedAuthorization|parent::f:SubstanceDefinition|f:SubscriptionStatus|f:SubscriptionTopic)", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.extension", - "path": "Organization.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.modifierExtension", - "path": "Organization.modifierExtension", - "short": "Extensions that cannot be ignored", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "DomainResource.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.identifier", - "path": "Organization.identifier", - "short": "Identifies this organization across multiple systems", - "definition": "Identifier for the organization that is used to identify the organization across multiple disparate systems.", - "requirements": "Organizations are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the organization.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.identifier", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Identifier" - } - ], - "condition": [ - "org-1" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.identifier" - }, - { - "identity": "v2", - "map": "XON.10 / XON.3" - }, - { - "identity": "rim", - "map": ".scopes[Role](classCode=IDENT)" - }, - { - "identity": "servd", - "map": "./Identifiers" - } - ] - }, - { - "id": "Organization.active", - "path": "Organization.active", - "short": "Whether the organization's record is still in active use", - "definition": "Whether the organization's record is still in active use.", - "comment": "This active flag is not intended to be used to mark an organization as temporarily closed or under construction. Instead the Location(s) within the Organization should have the suspended status. If further details of the reason for the suspension are required, then an extension on this element should be used.\n\nThis element is labeled as a modifier because it may be used to mark that the resource was created in error.", - "requirements": "Need a flag to indicate a record is no longer to be used and should generally be hidden for the user in the UI.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.active", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "boolean" - } - ], - "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element", - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": true, - "isModifierReason": "This element is labelled as a modifier because it is a status element that can indicate that a record should not be treated as valid", - "isSummary": true, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.status" - }, - { - "identity": "v2", - "map": "No equivalent in HL7 v2" - }, - { - "identity": "rim", - "map": ".status" - }, - { - "identity": "servd", - "map": "./Status (however this concept in ServD more covers why the organization is active or not, could be delisted, deregistered, not operational yet) this could alternatively be derived from ./StartDate and ./EndDate and given a context date." - } - ] - }, - { - "id": "Organization.type", - "path": "Organization.type", - "short": "Kind of organization", - "definition": "The kind(s) of organization that this is.", - "comment": "Organizations can be corporations, wards, sections, clinical teams, government departments, etc. Note that code is generally a classifier of the type of organization; in many applications, codes are used to identity a particular organization (say, ward) as opposed to another of the same type - these are identifiers, not codes\n\nWhen considering if multiple types are appropriate, you should evaluate if child organizations would be a more appropriate use of the concept, as different types likely are in different sub-areas of the organization. This is most likely to be used where type values have orthogonal values, such as a religious, academic and medical center.\n\nWe expect that some jurisdictions will profile this optionality to be a single cardinality.", - "requirements": "Need to be able to track the kind of organization that this is - different organization types have different uses.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.type", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "OrganizationType" - } - ], - "strength": "example", - "description": "Used to categorize the organization.", - "valueSet": "http://hl7.org/fhir/ValueSet/organization-type" - }, - "mapping": [ - { - "identity": "w5", - "map": "FiveWs.class" - }, - { - "identity": "v2", - "map": "No equivalent in v2" - }, - { - "identity": "rim", - "map": ".code" - }, - { - "identity": "servd", - "map": "n/a" - } - ] - }, - { - "id": "Organization.name", - "path": "Organization.name", - "short": "Name used for the organization", - "definition": "A name associated with the organization.", - "comment": "If the name of an organization changes, consider putting the old name in the alias column so that it can still be located through searches.", - "requirements": "Need to use the name as the label of the organization.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.name", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "string" - } - ], - "condition": [ - "org-1" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "XON.1" - }, - { - "identity": "rim", - "map": ".name" - }, - { - "identity": "servd", - "map": ".PreferredName/Name" - } - ] - }, - { - "id": "Organization.alias", - "path": "Organization.alias", - "short": "A list of alternate names that the organization is known as, or was known as in the past", - "definition": "A list of alternate names that the organization is known as, or was known as in the past.", - "comment": "There are no dates associated with the alias/historic names, as this is not intended to track when names were used, but to assist in searching so that older names can still result in identifying the organization.", - "requirements": "Over time locations and organizations go through many changes and can be known by different names.\n\nFor searching knowing previous names that the organization was known by can be very useful.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.alias", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "string" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".name" - } - ] - }, - { - "id": "Organization.telecom", - "path": "Organization.telecom", - "short": "A contact detail for the organization", - "definition": "A contact detail for the organization.", - "comment": "The use code 'home' is not to be used. Note that these contacts are not the contact details of people who are employed by or represent the organization, but official contacts for the organization itself.", - "requirements": "Human contact for the organization.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "condition": [ - "org-3" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "org-3", - "severity": "error", - "human": "The telecom of an organization can never be of use 'home'", - "expression": "where(use = 'home').empty()", - "xpath": "count(f:use[@value='home']) = 0", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "ORC-22?" - }, - { - "identity": "rim", - "map": ".telecom" - }, - { - "identity": "servd", - "map": "./ContactPoints" - } - ] - }, - { - "id": "Organization.address", - "path": "Organization.address", - "short": "An address for the organization", - "definition": "An address for the organization.", - "comment": "Organization may have multiple addresses with different uses or applicable periods. The use code 'home' is not to be used.", - "requirements": "May need to keep track of the organization's addresses for contacting, billing or reporting requirements.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.address", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Address" - } - ], - "condition": [ - "org-2" - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "org-2", - "severity": "error", - "human": "An address of an organization can never be of use 'home'", - "expression": "where(use = 'home').empty()", - "xpath": "count(f:use[@value='home']) = 0", - "source": "http://hl7.org/fhir/StructureDefinition/Organization" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "ORC-23?" - }, - { - "identity": "rim", - "map": ".address" - }, - { - "identity": "servd", - "map": "./PrimaryAddress and ./OtherAddresses" - } - ] - }, - { - "id": "Organization.partOf", - "path": "Organization.partOf", - "short": "The organization of which this organization forms a part", - "definition": "The organization of which this organization forms a part.", - "requirements": "Need to be able to track the hierarchy of organizations within an organization.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.partOf", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy", - "valueBoolean": true - } - ], - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Organization" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": true, - "mapping": [ - { - "identity": "v2", - "map": "No equivalent in HL7 v2" - }, - { - "identity": "rim", - "map": ".playedBy[classCode=Part].scoper" - }, - { - "identity": "servd", - "map": "n/a" - } - ] - }, - { - "id": "Organization.contact", - "path": "Organization.contact", - "short": "Contact for the organization for a certain purpose", - "definition": "Contact for the organization for a certain purpose.", - "comment": "Where multiple contacts for the same purpose are provided there is a standard extension that can be used to determine which one is the preferred contact to use.", - "requirements": "Need to keep track of assigned contact points within bigger organization.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.contact", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "BackboneElement" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children unless an empty Parameters resource", - "expression": "hasValue() or (children().count() > id.count()) or $this is Parameters", - "xpath": "@value|f:*|h:div|self::f:Parameters", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": ".contactParty" - } - ] - }, - { - "id": "Organization.contact.id", - "path": "Organization.contact.id", - "representation": [ - "xmlAttr" - ], - "short": "Unique id for inter-element referencing", - "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - "min": 0, - "max": "1", - "base": { - "path": "Element.id", - "min": 0, - "max": "1" - }, - "type": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", - "valueUrl": "string" - } - ], - "code": "http://hl7.org/fhirpath/System.String" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Organization.contact.extension", - "path": "Organization.contact.extension", - "short": "Additional content defined by implementations", - "definition": "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": "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": [ - "extensions", - "user content" - ], - "min": 0, - "max": "*", - "base": { - "path": "Element.extension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - }, - { - "id": "Organization.contact.modifierExtension", - "path": "Organization.contact.modifierExtension", - "short": "Extensions that cannot be ignored even if unrecognized", - "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - "comment": "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": "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": [ - "extensions", - "user content", - "modifiers" - ], - "min": 0, - "max": "*", - "base": { - "path": "BackboneElement.modifierExtension", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Extension" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - }, - { - "key": "ext-1", - "severity": "error", - "human": "Must have either extensions or value[x], not both", - "expression": "extension.exists() != value.exists()", - "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", - "source": "http://hl7.org/fhir/StructureDefinition/Extension" - } - ], - "isModifier": true, - "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", - "isSummary": true, - "mapping": [ - { - "identity": "rim", - "map": "N/A" - } - ] - }, - { - "id": "Organization.contact.purpose", - "path": "Organization.contact.purpose", - "short": "The type of contact", - "definition": "Indicates a purpose for which the contact can be reached.", - "requirements": "Need to distinguish between multiple contact persons.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.contact.purpose", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "CodeableConcept" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "binding": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", - "valueString": "ContactPartyType" - } - ], - "strength": "extensible", - "description": "The purpose for which you would contact a contact party.", - "valueSet": "http://hl7.org/fhir/ValueSet/contactentity-type" - }, - "mapping": [ - { - "identity": "rim", - "map": "./type" - } - ] - }, - { - "id": "Organization.contact.name", - "path": "Organization.contact.name", - "short": "A name associated with the contact", - "definition": "A name associated with the contact.", - "requirements": "Need to be able to track the person by name.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.contact.name", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "HumanName" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-5, PID-9" - }, - { - "identity": "rim", - "map": "./name" - } - ] - }, - { - "id": "Organization.contact.telecom", - "path": "Organization.contact.telecom", - "short": "Contact details (telephone, email, etc.) for a contact", - "definition": "A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.", - "requirements": "People have (primary) ways to contact them in some way such as phone, email.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.contact.telecom", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "ContactPoint" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-13, PID-14" - }, - { - "identity": "rim", - "map": "./telecom" - } - ] - }, - { - "id": "Organization.contact.address", - "path": "Organization.contact.address", - "short": "Visiting or postal addresses for the contact", - "definition": "Visiting or postal addresses for the contact.", - "requirements": "May need to keep track of a contact party's address for contacting, billing or reporting requirements.", - "min": 0, - "max": "1", - "base": { - "path": "Organization.contact.address", - "min": 0, - "max": "1" - }, - "type": [ - { - "code": "Address" - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "v2", - "map": "PID-11" - }, - { - "identity": "rim", - "map": "./addr" - } - ] - }, - { - "id": "Organization.endpoint", - "path": "Organization.endpoint", - "short": "Technical endpoints providing access to services operated for the organization", - "definition": "Technical endpoints providing access to services operated for the organization.", - "requirements": "Organizations have multiple systems that provide various services and need to be able to define the technical connection details for how to connect to them, and for what purpose.", - "min": 0, - "max": "*", - "base": { - "path": "Organization.endpoint", - "min": 0, - "max": "*" - }, - "type": [ - { - "code": "Reference", - "targetProfile": [ - "http://hl7.org/fhir/StructureDefinition/Endpoint" - ] - } - ], - "constraint": [ - { - "key": "ele-1", - "severity": "error", - "human": "All FHIR elements must have a @value or children", - "expression": "hasValue() or (children().count() > id.count())", - "xpath": "@value|f:*|h:div", - "source": "http://hl7.org/fhir/StructureDefinition/Element" - } - ], - "mustSupport": false, - "isModifier": false, - "isSummary": false, - "mapping": [ - { - "identity": "rim", - "map": "n/a" - } - ] - } - ] - }, - "differential": { - "element": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Organization.name", - "path": "Organization.name", - "label": "Name", - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Organization.identifier", - "path": "Organization.identifier", - "slicing": { - "discriminator": [ - { - "type": "value", - "path": "value" - }, - { - "type": "value", - "path": "system" - } - ], - "ordered": false, - "rules": "open" - } - }, - { - "id": "Organization.identifier:FacilityNPI", - "path": "Organization.identifier", - "sliceName": "FacilityNPI", - "min": 1, - "max": "1" - }, - { - "id": "Organization.identifier:FacilityNPI.system", - "path": "Organization.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://npi.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Organization.identifier:FacilityNPI.value", - "path": "Organization.identifier.value", - "label": "Facility NPI", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - }, - { - "id": "Organization.identifier:FacilityPTAN", - "path": "Organization.identifier", - "sliceName": "FacilityPTAN", - "min": 1, - "max": "1" - }, - { - "id": "Organization.identifier:FacilityPTAN.system", - "path": "Organization.identifier.system", - "min": 1, - "max": "1", - "type": [ - { - "code": "uri" - } - ], - "fixedUri": "http://ptan.org" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], - "id": "Organization.identifier:FacilityPTAN.value", - "path": "Organization.identifier.value", - "label": "Facility PTAN", - "min": 1, - "max": "1", - "type": [ - { - "code": "string" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-demographics-qr.json deleted file mode 100644 index 056b23d3f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-demographics-qr.json +++ /dev/null @@ -1,315 +0,0 @@ -{ - "resourceType": "Bundle", - "id": "demographics-qr", - "identifier": { - "value": "QuestionnaireResponse/QRSharonDecision" - }, - "type": "transaction", - "entry": [ - { - "resource": { - "resourceType": "Observation", - "id": "extract-QRSharonDecision.1.1", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/derivedFromLinkId", - "extension": [ - { - "url": "text", - "valueString": "1.1" - } - ] - } - ], - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/observation-category", - "code": "survey" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1038", - "display": "What type of HEAD pain have you had in the last 7 days?" - } - ] - }, - "subject": { - "reference": "Patient/sharondecision", - "display": "Sharon Decision" - }, - "effectiveDateTime": "2021-12-28T11:10:32-07:00", - "issued": "2021-12-28T11:10:32.000-07:00", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - ] - }, - "derivedFrom": [ - { - "reference": "QuestionnaireResponse/QRSharonDecision" - } - ] - }, - "request": { - "method": "PUT", - "url": "Observation/extract-QRSharonDecision.1.1" - } - }, - { - "resource": { - "resourceType": "Observation", - "id": "extract-QRSharonDecision.1.6", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/derivedFromLinkId", - "extension": [ - { - "url": "text", - "valueString": "1.6" - } - ] - } - ], - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/observation-category", - "code": "survey" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://fhir.org/guides/cqf/cds4cpm/CodeSystem/mypain-questionnaire-codes", - "code": "mpq-1043", - "display": "What type of LOWER BACK pain have you had in the last 7 days?" - } - ] - }, - "subject": { - "reference": "Patient/sharondecision", - "display": "Sharon Decision" - }, - "effectiveDateTime": "2021-12-28T11:10:32-07:00", - "issued": "2021-12-28T11:10:32.000-07:00", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - ] - }, - "derivedFrom": [ - { - "reference": "QuestionnaireResponse/QRSharonDecision" - } - ] - }, - "request": { - "method": "PUT", - "url": "Observation/extract-QRSharonDecision.1.6" - } - }, - { - "resource": { - "resourceType": "Observation", - "id": "extract-QRSharonDecision.2.1", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/derivedFromLinkId", - "extension": [ - { - "url": "text", - "valueString": "2.1" - } - ] - } - ], - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/observation-category", - "code": "survey" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "75262-6", - "display": "How intense was your pain at its worse in the past 7 days" - } - ] - }, - "subject": { - "reference": "Patient/sharondecision", - "display": "Sharon Decision" - }, - "effectiveDateTime": "2021-12-28T11:10:32-07:00", - "issued": "2021-12-28T11:10:32.000-07:00", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - ] - }, - "derivedFrom": [ - { - "reference": "QuestionnaireResponse/QRSharonDecision" - } - ] - }, - "request": { - "method": "PUT", - "url": "Observation/extract-QRSharonDecision.2.1" - } - }, - { - "resource": { - "resourceType": "Observation", - "id": "extract-QRSharonDecision.2.2", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/derivedFromLinkId", - "extension": [ - { - "url": "text", - "valueString": "2.2" - } - ] - } - ], - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/observation-category", - "code": "survey" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "75261-8", - "display": "How intense was your average pain in the past 7 days" - } - ] - }, - "subject": { - "reference": "Patient/sharondecision", - "display": "Sharon Decision" - }, - "effectiveDateTime": "2021-12-28T11:10:32-07:00", - "issued": "2021-12-28T11:10:32.000-07:00", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - ] - }, - "derivedFrom": [ - { - "reference": "QuestionnaireResponse/QRSharonDecision" - } - ] - }, - "request": { - "method": "PUT", - "url": "Observation/extract-QRSharonDecision.2.2" - } - }, - { - "resource": { - "resourceType": "Observation", - "id": "extract-QRSharonDecision.2.3", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/derivedFromLinkId", - "extension": [ - { - "url": "text", - "valueString": "2.3" - } - ] - } - ], - "status": "final", - "category": [ - { - "coding": [ - { - "system": "http://hl7.org/fhir/observation-category", - "code": "survey" - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://loinc.org", - "code": "75260-0", - "display": "What is your level of pain right now" - } - ] - }, - "subject": { - "reference": "Patient/sharondecision", - "display": "Sharon Decision" - }, - "effectiveDateTime": "2021-12-28T11:10:32-07:00", - "issued": "2021-12-28T11:10:32.000-07:00", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - ] - }, - "derivedFrom": [ - { - "reference": "QuestionnaireResponse/QRSharonDecision" - } - ] - }, - "request": { - "method": "PUT", - "url": "Observation/extract-QRSharonDecision.2.3" - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-generate-questionnaire.json deleted file mode 100644 index 1acd500e7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-generate-questionnaire.json +++ /dev/null @@ -1,459 +0,0 @@ -{ - "resourceType": "Bundle", - "id": "generate-questionnaire", - "type": "collection", - "entry": [ - { - "resource": { - "resourceType": "RequestGroup", - "id": "generate-questionnaire", - "instantiatesCanonical": [ - "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/generate-questionnaire", - "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/route-one" - ], - "status": "draft", - "intent": "proposal", - "subject": { - "reference": "OPA-Patient1" - }, - "action": [ - { - "title": "Prior Auth Route One", - "resource": { - "reference": "RequestGroup/route-one" - } - } - ] - } - }, - { - "resource": { - "resourceType": "RequestGroup", - "id": "route-one", - "instantiatesCanonical": [ - "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/route-one" - ], - "status": "draft", - "intent": "proposal", - "subject": { - "reference": "OPA-Patient1" - }, - "action": [ - { - "title": "Facility Information" - }, - { - "title": "Beneficiary Information" - }, - { - "title": "Operating Physician Information" - }, - { - "title": "Attending Physician Information" - } - ] - } - }, - { - "resource": { - "resourceType": "Questionnaire", - "id": "generate-questionnaire", - "item": [ - { - "linkId": "1", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/PAClaim", - "text": "Prior Auth Claim", - "type": "group", - "item": [ - { - "linkId": "1.1", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/PAClaim#Claim.id", - "text": "Claim Id", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "1.2", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/PAClaim#Claim.status", - "text": "Claim.status", - "type": "string", - "required": false, - "readOnly": true, - "initial": [ - { - "valueString": "active" - } - ] - } - ] - }, - { - "linkId": "2", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization", - "text": "Facility Information", - "type": "group", - "item": [ - { - "linkId": "2.1", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization#Organization.name", - "text": "Name", - "type": "string", - "required": false, - "initial": [ - { - "valueString": "Acme Clinic" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "2.2", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization#Organization.identifier.system", - "text": "Organization.identifier.system", - "type": "string", - "required": true, - "readOnly": true, - "initial": [ - { - "valueUri": "http://npi.org" - } - ] - }, - { - "linkId": "2.3", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization#Organization.identifier.value", - "text": "Facility NPI", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "1407071236" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "2.4", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization#Organization.identifier.system", - "text": "Organization.identifier.system", - "type": "string", - "required": true, - "readOnly": true, - "initial": [ - { - "valueUri": "http://ptan.org" - } - ] - }, - { - "linkId": "2.5", - "text": "An error occurred during item creation: Could not resolve expression reference 'FacilityPTAN' in library 'OutpatientPriorAuthorizationPrepopulation'.", - "type": "display" - } - ] - }, - { - "linkId": "3", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "linkId": "3.1", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient#Patient.name.given", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "Peter" - } - ] - }, - { - "linkId": "3.2", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient#Patient.name.family", - "text": "Last Name", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "Chalmers" - } - ] - }, - { - "linkId": "3.3", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient#Patient.birthDate", - "text": "Date of Birth", - "type": "date", - "required": true, - "initial": [ - { - "valueDate": "1974-12-25" - } - ] - }, - { - "linkId": "3.4", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient#Patient.gender", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "valueCoding": { - "system": "http://hl7.org/fhir/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "code": "UNK", - "display": "unknown" - } - } - ], - "initial": [ - { - "valueString": "male" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "3.5", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient#Patient.identifier.system", - "text": "Patient.identifier.system", - "type": "string", - "required": true, - "readOnly": true, - "initial": [ - { - "valueUri": "http://medicare.org" - } - ] - }, - { - "linkId": "3.6", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient#Patient.identifier.value", - "text": "Medicare ID", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "525697298M" - } - ] - } - ] - }, - { - "linkId": "4", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating", - "text": "Operation Physician Information", - "type": "group", - "item": [ - { - "linkId": "4.1", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating#Practitioner.name.given", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "Fielding" - } - ] - }, - { - "linkId": "4.2", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating#Practitioner.name.family", - "text": "Last Name", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "Kathy" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "4.3", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating#Practitioner.identifier.system", - "text": "Practitioner.identifier.system", - "type": "string", - "required": true, - "readOnly": true, - "initial": [ - { - "valueUri": "http://npi.org" - } - ] - }, - { - "linkId": "4.4", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating#Practitioner.identifier.value", - "text": "NPI", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "1245319599" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "4.5", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating#Practitioner.identifier.system", - "text": "Practitioner.identifier.system", - "type": "string", - "required": true, - "readOnly": true, - "initial": [ - { - "valueUri": "http://ptan.org" - } - ] - }, - { - "linkId": "4.6", - "text": "An error occurred during item creation: Could not resolve expression reference 'OperatingPhysicianPTAN' in library 'OutpatientPriorAuthorizationPrepopulation'.", - "type": "display" - } - ] - }, - { - "linkId": "5", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "linkId": "5.1", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending#Practitioner.name.given", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "Ronald" - } - ] - }, - { - "linkId": "5.2", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending#Practitioner.name.family", - "text": "Last Name", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "Bone" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "5.3", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending#Practitioner.identifier.system", - "text": "Practitioner.identifier.system", - "type": "string", - "required": true, - "readOnly": true, - "initial": [ - { - "valueUri": "http://npi.org" - } - ] - }, - { - "linkId": "5.4", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending#Practitioner.identifier.value", - "text": "NPI", - "type": "string", - "required": true, - "initial": [ - { - "valueString": "9941339108" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", - "valueBoolean": true - } - ], - "linkId": "5.5", - "definition": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending#Practitioner.identifier.system", - "text": "Practitioner.identifier.system", - "type": "string", - "required": true, - "readOnly": true, - "initial": [ - { - "valueUri": "http://ptan.org" - } - ] - }, - { - "linkId": "5.6", - "text": "An error occurred during item creation: Could not resolve expression reference 'AttendingPhysicianPTAN' in library 'OutpatientPriorAuthorizationPrepopulation'.", - "type": "display" - } - ] - } - ] - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-hello-world-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-hello-world-patient-view.json deleted file mode 100644 index 31c0a5e73..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-hello-world-patient-view.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "resourceType": "Bundle", - "id": "hello-world-patient-view", - "type": "collection", - "entry": [ - { - "resource": { - "resourceType": "RequestGroup", - "id": "hello-world-patient-view", - "instantiatesCanonical": [ - "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/hello-world-patient-view" - ], - "status": "draft", - "intent": "proposal", - "subject": { - "reference": "helloworld-patient-1" - }, - "encounter": { - "reference": "helloworld-patient-1-encounter-1" - }, - "action": [ - { - "title": "Hello World!", - "description": "The CDS Service is alive and communicating successfully!" - } - ] - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate-errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate-errors.json deleted file mode 100644 index e003306b3..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate-errors.json +++ /dev/null @@ -1,942 +0,0 @@ -{ - "resourceType": "Bundle", - "id": "prepopulate-errors", - "type": "collection", - "entry": [ - { - "resource": { - "resourceType": "RequestGroup", - "id": "prepopulate-errors", - "instantiatesCanonical": [ - "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/prepopulate-errors" - ], - "status": "draft", - "intent": "proposal", - "subject": { - "reference": "OPA-Patient1" - }, - "action": [ - { - "title": "Prepopulate!", - "description": "A simple recommendation to complete a prepopulated Questionnaire", - "resource": { - "reference": "Task/complete-questionnaire" - } - } - ] - } - }, - { - "resource": { - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-Errors-OPA-Patient1", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "contained": [ - { - "resourceType": "OperationOutcome", - "id": "populate-outcome-OutpatientPriorAuthorizationRequest-Errors-OPA-Patient1", - "issue": [ - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityPTAN) for item (1.3): Could not resolve expression reference 'FacilityPTAN' in library 'OutpatientPriorAuthorizationPrepopulation'." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianPTAN) for item (3.4): Could not resolve expression reference 'OperatingPhysicianPTAN' in library 'OutpatientPriorAuthorizationPrepopulation'." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianPTAN) for item (4.2.4): Could not resolve expression reference 'AttendingPhysicianPTAN' in library 'OutpatientPriorAuthorizationPrepopulation'." - } - ] - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate-subject", - "valueReference": { - "reference": "Patient/OPA-Patient1" - } - }, - { - "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-messages", - "valueReference": { - "reference": "#populate-outcome-OutpatientPriorAuthorizationRequest-Errors-OPA-Patient1" - } - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-Errors", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Acme Clinic" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1407071236" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Peter" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Chalmers" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueDate": "1974-12-25" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "525697298M" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ], - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "male" - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Fielding" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Kathy" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1245319599" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianPTAN" - } - } - ], - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1080 FIRST COLONIAL RD" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Virginia Beach" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "VA" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "21454-2406" - } - ] - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueBoolean": false - } - ] - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Ronald" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Bone" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "9941339108" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianPTAN" - } - } - ], - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1003 Healthcare Drive" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Amherst" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "MA" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "01002" - } - ] - } - ] - } - ] - } - ] - } - ] - } - }, - { - "resource": { - "resourceType": "Task", - "id": "complete-questionnaire", - "basedOn": [ - { - "reference": "RequestGroup/prepopulate", - "type": "RequestGroup" - } - ], - "status": "draft", - "intent": "proposal", - "description": "Create a task to complete a Questionnaire.", - "focus": { - "reference": "Questionnaire/OutpatientPriorAuthorizationRequest-OPA-Patient1" - }, - "for": { - "reference": "OPA-Patient1" - } - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate-noLibrary.json deleted file mode 100644 index 450f9e85f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate-noLibrary.json +++ /dev/null @@ -1,776 +0,0 @@ -{ - "resourceType": "Bundle", - "id": "prepopulate-noLibrary", - "type": "collection", - "entry": [ - { - "resource": { - "resourceType": "RequestGroup", - "id": "prepopulate-noLibrary", - "instantiatesCanonical": [ - "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/prepopulate-noLibrary" - ], - "status": "draft", - "intent": "proposal", - "subject": { - "reference": "OPA-Patient1" - }, - "action": [ - { - "title": "Prepopulate!", - "description": "A simple recommendation to complete a prepopulated Questionnaire", - "resource": { - "reference": "Task/complete-questionnaire" - } - } - ] - } - }, - { - "resource": { - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "contained": [ - { - "resourceType": "OperationOutcome", - "id": "populate-outcome-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1", - "issue": [ - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityName) for item (1.1): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityNPI) for item (1.2): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityPTAN) for item (1.3): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryFirstName) for item (2.1): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryLastName) for item (2.2): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryDOB) for item (2.3): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryMedicareID) for item (2.4): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryGender) for item (2.5): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianFirstName) for item (3.1): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianLastName) for item (3.2): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianNPI) for item (3.3): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianPTAN) for item (3.4): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddress1) for item (3.5.1): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddress2) for item (3.5.2): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressCity) for item (3.5.3): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressState) for item (3.5.4): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressZip) for item (3.5.5): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianSame) for item (4.1): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianFirstName) for item (4.2.1): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianLastName) for item (4.2.2): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianNPI) for item (4.2.3): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianPTAN) for item (4.2.4): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddress1) for item (4.2.5.1): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddress2) for item (4.2.5.2): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressCity) for item (4.2.5.3): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressState) for item (4.2.5.4): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressZip) for item (4.2.5.5): Unable to resolve library (OutpatientPriorAuthorizationPrepopulation-noLibrary): Could not load source for library OutpatientPriorAuthorizationPrepopulation-noLibrary, version null." - } - ] - } - ], - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation-noLibrary" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate-subject", - "valueReference": { - "reference": "Patient/OPA-Patient1" - } - }, - { - "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-messages", - "valueReference": { - "reference": "#populate-outcome-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1" - } - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-noLibrary", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN" - } - } - ], - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianPTAN" - } - } - ], - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianPTAN" - } - } - ], - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] - } - }, - { - "resource": { - "resourceType": "Task", - "id": "complete-questionnaire", - "basedOn": [ - { - "reference": "RequestGroup/prepopulate-noLibrary", - "type": "RequestGroup" - } - ], - "status": "draft", - "intent": "proposal", - "description": "Create a task to complete a Questionnaire.", - "focus": { - "reference": "Questionnaire/OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1" - }, - "for": { - "reference": "OPA-Patient1" - } - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate.json deleted file mode 100644 index af9344583..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-prepopulate.json +++ /dev/null @@ -1,886 +0,0 @@ -{ - "resourceType": "Bundle", - "id": "prepopulate", - "type": "collection", - "entry": [ - { - "resource": { - "resourceType": "RequestGroup", - "id": "prepopulate", - "instantiatesCanonical": [ - "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/prepopulate" - ], - "status": "draft", - "intent": "proposal", - "subject": { - "reference": "OPA-Patient1" - }, - "action": [ - { - "title": "Prepopulate!", - "description": "A simple recommendation to complete a prepopulated Questionnaire", - "resource": { - "reference": "Task/complete-questionnaire" - } - } - ] - } - }, - { - "resource": { - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest-OPA-Patient1", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-prepopulate-subject", - "valueReference": { - "reference": "Patient/OPA-Patient1" - } - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Acme Clinic" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1407071236" - } - ] - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Peter" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Chalmers" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueDate": "1974-12-25" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "525697298M" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ], - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "male" - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Fielding" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Kathy" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1245319599" - } - ] - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1080 FIRST COLONIAL RD" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Virginia Beach" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "VA" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "21454-2406" - } - ] - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueBoolean": false - } - ] - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Ronald" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Bone" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "9941339108" - } - ] - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "1003 Healthcare Drive" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "Amherst" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "MA" - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true, - "initial": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], - "valueString": "01002" - } - ] - } - ] - } - ] - } - ] - } - ] - } - }, - { - "resource": { - "resourceType": "Task", - "id": "complete-questionnaire", - "basedOn": [ - { - "reference": "RequestGroup/prepopulate", - "type": "RequestGroup" - } - ], - "status": "draft", - "intent": "proposal", - "description": "Create a task to complete a Questionnaire.", - "focus": { - "reference": "Questionnaire/OutpatientPriorAuthorizationRequest-OPA-Patient1" - }, - "for": { - "reference": "OPA-Patient1" - } - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-us-ecr-specification.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-us-ecr-specification.json deleted file mode 100644 index 5e79defa6..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-us-ecr-specification.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "resourceType": "Bundle", - "id": "us-ecr-specification", - "type": "collection", - "entry": [ - { - "resource": { - "resourceType": "RequestGroup", - "id": "us-ecr-specification", - "instantiatesCanonical": [ - "http://ersd.aimsplatform.org/fhir/PlanDefinition/us-ecr-specification" - ], - "status": "draft", - "intent": "proposal", - "subject": { - "reference": "helloworld-patient-1" - }, - "encounter": { - "reference": "helloworld-patient-1-encounter-1" - } - } - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Claim-OPA-Claim1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Claim-OPA-Claim1.json deleted file mode 100644 index 5021f98c3..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Claim-OPA-Claim1.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "resourceType": "Claim", - "id": "OPA-Claim1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-levelOfServiceCode", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1338", - "code": "U", - "display": "Urgent" - } - ] - } - } - ], - "identifier": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierJurisdiction", - "valueCodeableConcept": { - "coding": [ - { - "system": "https://www.usps.com/", - "code": "MA" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierSubDepartment", - "valueString": "223412" - } - ], - "system": "http://example.org/PATIENT_EVENT_TRACE_NUMBER", - "value": "111099", - "assigner": { - "identifier": { - "system": "http://example.org/USER_ASSIGNED", - "value": "9012345678" - } - } - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/claim-type", - "code": "professional" - } - ] - }, - "use": "preauthorization", - "patient": { - "reference": "Patient/OPA-Patient1" - }, - "created": "2005-05-02", - "insurer": { - "reference": "Organization/OPA-PayorOrganization1" - }, - "provider": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "facility": { - "reference": "Location/OPA-Location1" - }, - "priority": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/processpriority", - "code": "normal" - } - ] - }, - "careTeam": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 1, - "provider": { - "reference": "Practitioner/OPA-OperatingPhysician1" - } - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope", - "valueBoolean": true - } - ], - "sequence": 2, - "provider": { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - } - ], - "diagnosis": [ - { - "sequence": 123, - "diagnosisReference": { - "reference": "Condition/OPA-Condition1" - } - } - ], - "procedure": [ - { - "sequence": 1, - "procedureReference": { - "reference": "Procedure/OPA-Procedure1" - } - }, - { - "sequence": 2, - "procedureReference": { - "reference": "Procedure/OPA-Procedure2" - } - } - ], - "supportingInfo": [ - { - "sequence": 1, - "category": { - "coding": [ - { - "system": "http://hl7.org/us/davinci-pas/CodeSystem/PASSupportingInfoType", - "code": "patientEvent" - } - ] - }, - "timingPeriod": { - "start": "2015-10-01T00:00:00-07:00", - "end": "2015-10-05T00:00:00-07:00" - } - } - ], - "insurance": [ - { - "sequence": 1, - "focal": true, - "coverage": { - "reference": "Coverage/OPA-Coverage1" - } - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemTraceNumber", - "valueIdentifier": { - "system": "http://example.org/ITEM_TRACE_NUMBER", - "value": "1122334" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizationNumber", - "valueString": "1122445" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-administrationReferenceNumber", - "valueString": "9988311" - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceItemRequestType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1525", - "code": "SC", - "display": "Specialty Care Review" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-certificationType", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1322", - "code": "I", - "display": "Initial" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-requestedService", - "valueReference": { - "reference": "ServiceRequest/OPA-ServiceRequest1" - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-epsdtIndicator", - "valueBoolean": false - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeResidentialStatus", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1345", - "code": "2", - "display": "Newly Admitted" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeLevelOfCare", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1337", - "code": "2", - "display": "Intermediate Care Facility (ICF)" - } - ] - } - }, - { - "url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueUnitRateLimit", - "valueDecimal": 100 - } - ], - "sequence": 1, - "careTeamSequence": [ - 1 - ], - "diagnosisSequence": [ - 1 - ], - "productOrService": { - "coding": [ - { - "system": "http://codesystem.x12.org/005010/1365", - "code": "3", - "display": "Consultation" - } - ] - }, - "locationCodeableConcept": { - "coding": [ - { - "system": "https://www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set", - "code": "11" - } - ] - } - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Condition-OPA-Condition1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Condition-OPA-Condition1.json deleted file mode 100644 index a0c2ca681..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Condition-OPA-Condition1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Condition", - "id": "OPA-Condition1", - "code": { - "coding": [ - { - "system": "http://hl7.org/fhir/sid/icd-10-cm", - "code": "G1221", - "display": "G1221,Amyotrophic lateral sclerosis" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Coverage-OPA-Coverage1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Coverage-OPA-Coverage1.json deleted file mode 100644 index 53802b3e9..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Coverage-OPA-Coverage1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "resourceType": "Coverage", - "id": "OPA-Coverage1", - "meta": { - "versionId": "1", - "lastUpdated": "2019-07-11T06:27:08.949+00:00", - "profile": [ - "http://hl7.org/fhir/us/davinci-deqm/STU3/StructureDefinition/coverage-deqm" - ] - }, - "identifier": [ - { - "system": "http://benefitsinc.com/certificate", - "value": "10138556" - } - ], - "status": "active", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", - "code": "HIP", - "display": "health insurance plan policy" - } - ] - }, - "policyHolder": { - "reference": "Patient/OPA-Patient1" - }, - "subscriber": { - "reference": "Patient/OPA-Patient1" - }, - "subscriberId": "525697298M", - "beneficiary": { - "reference": "Patient/OPA-Patient1" - }, - "relationship": { - "coding": [ - { - "code": "self" - } - ] - }, - "payor": [ - { - "reference": "Organization/OPA-PayorOrganization1" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Coverage-helloworld-patient-1-coverage-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Coverage-helloworld-patient-1-coverage-1.json deleted file mode 100644 index 69036b6e5..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Coverage-helloworld-patient-1-coverage-1.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "resourceType": "Coverage", - "id": "helloworld-patient-1-coverage-1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage" - ] - }, - "status": "active", - "type": { - "coding": [ - { - "system": "https://nahdo.org/sopt", - "version": "9.2", - "code": "31", - "display": "Department of Defense" - } - ] - }, - "policyHolder": { - "reference": "Patient/helloworld-patient-1" - }, - "beneficiary": { - "reference": "Patient/helloworld-patient-1" - }, - "period": { - "start": "2020-01-01T00:00:00-07:00", - "end": "2021-01-01T00:00:00-07:00" - }, - "payor": [ - { - "reference": "Patient/helloworld-patient-1" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Encounter-helloworld-patient-1-encounter-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Encounter-helloworld-patient-1-encounter-1.json deleted file mode 100644 index 19c587c44..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Encounter-helloworld-patient-1-encounter-1.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "resourceType": "Encounter", - "id": "helloworld-patient-1-encounter-1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" - ] - }, - "status": "finished", - "class": { - "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", - "code": "AMB", - "display": "ambulatory" - }, - "type": [ - { - "coding": [ - { - "system": "http://snomed.info/sct", - "version": "2020-09", - "code": "185463005", - "display": "Visit out of hours (procedure)" - } - ] - } - ], - "subject": { - "reference": "Patient/helloworld-patient-1" - }, - "period": { - "start": "2020-01-01T10:00:00-07:00", - "end": "2020-01-01T11:00:00-07:00" - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Location-OPA-Location1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Location-OPA-Location1.json deleted file mode 100644 index 39eca622e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Location-OPA-Location1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "resourceType": "Location", - "id": "OPA-Location1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:28:20.715+00:00" - }, - "address": { - "line": [ - "100 Good St" - ], - "city": "Bedford", - "state": "MA", - "postalCode": "01730" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/MeasureReport-measurereport-helloworld-patient-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/MeasureReport-measurereport-helloworld-patient-1.json deleted file mode 100644 index 09537850f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/MeasureReport-measurereport-helloworld-patient-1.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "resourceType": "MeasureReport", - "id": "measurereport-helloworld-patient-1", - "contained": [ - { - "resourceType": "Observation", - "id": "256ebb02-c5d6-4b37-ae5f-66b027e67c53", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-measureInfo", - "extension": [ - { - "url": "measure", - "valueCanonical": "http://content.alphora.com/fhir/dqm/Measure/helloworld" - }, - { - "url": "populationId", - "valueString": "sde-race" - } - ] - } - ], - "status": "final", - "code": { - "text": "sde-race" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2106-3", - "display": "White" - } - ] - } - }, - { - "resourceType": "Observation", - "id": "54f1aa42-627e-45df-a655-18a88c5f5d6c", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-measureInfo", - "extension": [ - { - "url": "measure", - "valueCanonical": "http://content.alphora.com/fhir/dqm/Measure/helloworld" - }, - { - "url": "populationId", - "valueString": "sde-payer" - } - ] - } - ], - "status": "final", - "code": { - "text": "sde-payer" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "https://nahdo.org/sopt", - "code": "31", - "display": "Department of Defense" - } - ] - } - }, - { - "resourceType": "Observation", - "id": "2499fe18-2a97-4ad8-8d5f-154d94f5f4e9", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-measureInfo", - "extension": [ - { - "url": "measure", - "valueCanonical": "http://content.alphora.com/fhir/dqm/Measure/helloworld" - }, - { - "url": "populationId", - "valueString": "sde-ethnicity" - } - ] - } - ], - "status": "final", - "code": { - "text": "sde-ethnicity" - }, - "valueCodeableConcept": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2135-2", - "display": "Hispanic or Latino" - } - ] - } - }, - { - "resourceType": "Observation", - "id": "6f2b2210-564c-4614-bbe7-0fe5de354b99", - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-measureInfo", - "extension": [ - { - "url": "measure", - "valueCanonical": "http://content.alphora.com/fhir/dqm/Measure/helloworld" - }, - { - "url": "populationId", - "valueString": "sde-sex" - } - ] - } - ], - "status": "final", - "code": { - "text": "sde-sex" - }, - "valueCodeableConcept": { - "coding": [ - { - "code": "M" - } - ] - } - } - ], - "status": "complete", - "type": "individual", - "measure": "http://content.alphora.com/fhir/dqm/Measure/helloworld", - "subject": { - "reference": "Patient/helloworld-patient-1" - }, - "period": { - "start": "2020-01-01T00:00:00-07:00", - "end": "2020-12-31T00:00:00-07:00" - }, - "group": [ - { - "id": "group-1", - "population": [ - { - "code": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/measure-population", - "code": "initial-population", - "display": "Initial Population" - } - ] - }, - "count": 0 - }, - { - "code": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/measure-population", - "code": "numerator", - "display": "Numerator" - } - ] - }, - "count": 0 - }, - { - "code": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/measure-population", - "code": "denominator", - "display": "Denominator" - } - ] - }, - "count": 0 - } - ] - }, - { - "id": "group-2", - "population": [ - { - "code": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/measure-population", - "code": "initial-population", - "display": "Initial Population" - } - ] - }, - "count": 0 - }, - { - "code": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/measure-population", - "code": "numerator", - "display": "Numerator" - } - ] - }, - "count": 0 - }, - { - "code": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/measure-population", - "code": "denominator", - "display": "Denominator" - } - ] - }, - "count": 0 - } - ] - } - ], - "evaluatedResource": [ - { - "reference": "#256ebb02-c5d6-4b37-ae5f-66b027e67c53" - }, - { - "reference": "#54f1aa42-627e-45df-a655-18a88c5f5d6c" - }, - { - "reference": "#2499fe18-2a97-4ad8-8d5f-154d94f5f4e9" - }, - { - "reference": "#6f2b2210-564c-4614-bbe7-0fe5de354b99" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-deqm/StructureDefinition/extension-populationReference", - "valueString": "initial-population" - } - ], - "reference": "Coverage/helloworld-patient-1-coverage-1" - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-deqm/StructureDefinition/extension-populationReference", - "valueString": "initial-population" - } - ], - "reference": "Patient/helloworld-patient-1" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Organization-OPA-PayorOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Organization-OPA-PayorOrganization1.json deleted file mode 100644 index f8a998c72..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Organization-OPA-PayorOrganization1.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-PayorOrganization1", - "meta": { - "versionId": "1", - "lastUpdated": "2022-12-01T17:16:05.159+00:00" - }, - "name": "Palmetto GBA", - "address": [ - { - "use": "work", - "line": [ - "111 Dogwood Ave" - ], - "city": "Columbia", - "state": "SC", - "postalCode": "29999", - "country": "US" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Organization-OPA-ProviderOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Organization-OPA-ProviderOrganization1.json deleted file mode 100644 index 4830be3b8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Organization-OPA-ProviderOrganization1.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "resourceType": "Organization", - "id": "OPA-ProviderOrganization1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: example-organization-2

meta:

identifier: 1407071236, 121111111

active: true

type: Healthcare Provider (Details : {http://terminology.hl7.org/CodeSystem/organization-type code 'prov' = 'Healthcare Provider', given as 'Healthcare Provider'})

name: Acme Clinic

telecom: ph: (+1) 734-677-7777, customer-service@acme-clinic.org

address: 3300 Washtenaw Avenue, Suite 227 Amherst MA 01002 USA

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1407071236" - }, - { - "system": "http://example.org/fhir/sid/us-tin", - "value": "121111111" - } - ], - "active": true, - "type": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/organization-type", - "code": "prov", - "display": "Healthcare Provider" - } - ] - } - ], - "name": "Acme Clinic", - "telecom": [ - { - "system": "phone", - "value": "(+1) 734-677-7777" - }, - { - "system": "email", - "value": "customer-service@acme-clinic.org" - } - ], - "address": [ - { - "line": [ - "3300 Washtenaw Avenue, Suite 227" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002", - "country": "USA" - } - ], - "contact": [ - { - "name": { - "use": "official", - "family": "Dow", - "given": [ - "Jones" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "555-555-5555", - "use": "home" - } - ] - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-OPA-Patient1.json deleted file mode 100644 index 9dc299930..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-OPA-Patient1.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "resourceType": "Patient", - "id": "OPA-Patient1", - "extension": [ - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2106-3", - "display": "White" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1002-5", - "display": "American Indian or Alaska Native" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2028-9", - "display": "Asian" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1586-7", - "display": "Shoshone" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2036-2", - "display": "Filipino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "1735-0", - "display": "Alaska Native" - } - }, - { - "url": "text", - "valueString": "Mixed" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2135-2", - "display": "Hispanic or Latino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2184-0", - "display": "Dominican" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "urn:oid:2.16.840.1.113883.6.238", - "code": "2148-5", - "display": "Mexican" - } - }, - { - "url": "text", - "valueString": "Hispanic or Latino" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", - "valueCode": "M" - } - ], - "identifier": [ - { - "use": "usual", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0203", - "code": "MR" - } - ] - }, - "system": "urn:oid:1.2.36.146.595.217.0.1", - "value": "12345", - "period": { - "start": "2001-05-06" - }, - "assigner": { - "display": "Acme Healthcare" - } - } - ], - "active": true, - "name": [ - { - "use": "official", - "family": "Chalmers", - "given": [ - "Peter", - "James" - ] - }, - { - "use": "usual", - "family": "Chalmers", - "given": [ - "Jim" - ] - }, - { - "use": "maiden", - "family": "Windsor", - "given": [ - "Peter", - "James" - ], - "period": { - "end": "2002" - } - } - ], - "telecom": [ - { - "system": "phone", - "value": "(03) 5555 6473", - "use": "work", - "rank": 1 - }, - { - "system": "phone", - "value": "(03) 3410 5613", - "use": "mobile", - "rank": 2 - }, - { - "system": "phone", - "value": "(03) 5555 8834", - "use": "old", - "period": { - "end": "2014" - } - } - ], - "gender": "male", - "birthDate": "1974-12-25", - "_birthDate": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime", - "valueDateTime": "1974-12-25T14:35:45-05:00" - } - ] - }, - "deceasedBoolean": false, - "address": [ - { - "use": "home", - "type": "both", - "text": "534 Erewhon St PeasantVille, Utah 84414", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "UT", - "postalCode": "84414", - "period": { - "start": "1974-12-25" - } - } - ], - "maritalStatus": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus", - "code": "M" - } - ] - }, - "contact": [ - { - "relationship": [ - { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0131", - "code": "N" - } - ] - } - ], - "name": { - "family": "du Marché", - "_family": { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", - "valueString": "VV" - } - ] - }, - "given": [ - "Bénédicte" - ] - }, - "telecom": [ - { - "system": "phone", - "value": "+33 (237) 998327" - } - ], - "address": { - "use": "home", - "type": "both", - "line": [ - "534 Erewhon St" - ], - "city": "PleasantVille", - "district": "Rainbow", - "state": "VT", - "postalCode": "3999", - "period": { - "start": "1974-12-25" - } - }, - "gender": "female", - "period": { - "start": "2012" - } - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-helloworld-patient-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-helloworld-patient-1.json deleted file mode 100644 index 062040d5b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-helloworld-patient-1.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "resourceType": "Patient", - "id": "helloworld-patient-1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2106-3", - "display": "White" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "1002-5", - "display": "American Indian or Alaska Native" - } - }, - { - "url": "ombCategory", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2028-9", - "display": "Asian" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "1586-7", - "display": "Shoshone" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2036-2", - "display": "Filipino" - } - }, - { - "url": "text", - "valueString": "Mixed" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", - "extension": [ - { - "url": "ombCategory", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2135-2", - "display": "Hispanic or Latino" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2184-0", - "display": "Dominican" - } - }, - { - "url": "detailed", - "valueCoding": { - "system": "http://terminology.hl7.org/CodeSystem/PHRaceAndEthnicityCDC", - "code": "2148-5", - "display": "Mexican" - } - }, - { - "url": "text", - "valueString": "Hispanic or Latino" - } - ] - }, - { - "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", - "valueCode": "M" - } - ], - "identifier": [ - { - "use": "usual", - "type": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/v2-0203", - "code": "MR" - } - ] - }, - "system": "urn:oid:1.2.36.146.595.217.0.1", - "value": "12345", - "period": { - "start": "2001-05-06" - }, - "assigner": { - "display": "Acme Healthcare" - } - } - ], - "active": true, - "name": [ - { - "use": "official", - "family": "Doe", - "given": [ - "John" - ] - } - ], - "gender": "male", - "birthDate": "1991-01-01", - "deceasedBoolean": false -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Practitioner-OPA-AttendingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Practitioner-OPA-AttendingPhysician1.json deleted file mode 100644 index f009f2c02..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Practitioner-OPA-AttendingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-AttendingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-1

meta:

identifier: 9941339108, 25456

name: Ronald Bone

address: 1003 Healthcare Drive Amherst MA 01002 (HOME)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "9941339108" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "25456" - } - ], - "name": [ - { - "family": "Bone", - "given": [ - "Ronald" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "home", - "line": [ - "1003 Healthcare Drive" - ], - "city": "Amherst", - "state": "MA", - "postalCode": "01002" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Practitioner-OPA-OperatingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Practitioner-OPA-OperatingPhysician1.json deleted file mode 100644 index 697350aa7..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Practitioner-OPA-OperatingPhysician1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "resourceType": "Practitioner", - "id": "OPA-OperatingPhysician1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" - ] - }, - "text": { - "status": "generated", - "div": "

Generated Narrative with Details

id: practitioner-2

meta:

identifier: 1245319599, 456789

name: Fielding Kathy

address: 1080 FIRST COLONIAL RD Virginia Beach VA 21454-2406 (WORK)

" - }, - "identifier": [ - { - "system": "http://hl7.org.fhir/sid/us-npi", - "value": "1245319599" - }, - { - "system": "http://www.acme.org/practitioners", - "value": "456789" - } - ], - "name": [ - { - "family": "Kathy", - "given": [ - "Fielding" - ], - "prefix": [ - "Dr" - ] - } - ], - "address": [ - { - "use": "work", - "line": [ - "1080 FIRST COLONIAL RD" - ], - "city": "Virginia Beach", - "state": "VA", - "postalCode": "21454-2406" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Procedure-OPA-Procedure1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Procedure-OPA-Procedure1.json deleted file mode 100644 index ecd62e960..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Procedure-OPA-Procedure1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure1", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64612", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL NERVE, UNILATERAL (EG, FOR BLEPHAROSPASM, HEMIFACIAL SPASM)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Procedure-OPA-Procedure2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Procedure-OPA-Procedure2.json deleted file mode 100644 index 909cb9680..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Procedure-OPA-Procedure2.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Procedure", - "id": "OPA-Procedure2", - "text": { - "status": "generated", - "div": "
Routine Appendectomy
" - }, - "status": "preparation", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "64615", - "display": "CHEMODENERVATION OF MUSCLE(S); MUSCLE(S) INNERVATED BY FACIAL, TRIGEMINAL, CERVICAL SPINAL AND ACCESSORY NERVES, BILATERAL (EG, FOR CHRONIC MIGRAINE)" - } - ], - "text": "Botox" - }, - "subject": { - "reference": "Patient/OPA-Patient1" - } -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json deleted file mode 100644 index ba82b1a92..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "OutpatientPriorAuthorizationRequest-OPA-Patient1", - "questionnaire": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "status": "completed", - "subject": { - "reference": "Patient/OPA-Patient1" - }, - "authored": "2021-12-01", - "item": [ - { - "linkId": "1", - "definition": "http://hl7.org/fhir/Organization#Organization", - "text": "Facility Information", - "item": [ - { - "linkId": "1.1", - "definition": "http://hl7.org/fhir/Organization#Organization.name", - "text": "Name", - "answer": [ - { - "valueString": "Test Facility" - } - ] - }, - { - "linkId": "1.2", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "NPI", - "answer": [] - }, - { - "linkId": "1.3", - "definition": "http://hl7.org/fhir/Organization#Organization.identifier", - "text": "PTAN", - "answer": [] - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "answer": [] - } - ] - }, - { - "linkId": "2", - "definition": "http://hl7.org/fhir/Patient#Patient", - "text": "Beneficiary Information", - "item": [ - { - "linkId": "2.1", - "definition": "http://hl7.org/fhir/Patient#Patient.name.given", - "text": "First Name", - "answer": [ - { - "valueString": "Test" - } - ] - }, - { - "linkId": "2.2", - "definition": "http://hl7.org/fhir/Patient#Patient.name.family", - "text": "Last Name", - "answer": [ - { - "valueString": "Man" - } - ] - }, - { - "linkId": "2.3", - "definition": "http://hl7.org/fhir/Patient#Patient.birthDate", - "text": "Date of Birth", - "answer": [ - { - "valueDate": "1950-01-01" - } - ] - }, - { - "linkId": "2.4.0", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.system", - "answer": [ - { - "valueUri": "http://hl7.org/fhir/sid/us-medicare" - } - ] - }, - { - "linkId": "2.4", - "definition": "http://hl7.org/fhir/Patient#Patient.identifier.value", - "text": "Medicare ID", - "answer": [ - { - "valueString": "123456789" - } - ] - }, - { - "linkId": "2.5", - "definition": "http://hl7.org/fhir/Patient#Patient.gender", - "text": "Gender", - "answer": [ - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/ServiceRequest-OPA-ServiceRequest1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/ServiceRequest-OPA-ServiceRequest1.json deleted file mode 100644 index 3c171b4b8..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/ServiceRequest-OPA-ServiceRequest1.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "resourceType": "ServiceRequest", - "id": "OPA-ServiceRequest1", - "meta": { - "profile": [ - "http://hl7.org/fhir/us/davinci-crd/R4/StructureDefinition/profile-servicerequest-r4" - ] - }, - "status": "draft", - "code": { - "coding": [ - { - "system": "http://www.ama-assn.org/go/cpt", - "code": "99241", - "display": "Testing Service for Outpatient Prior Auth" - } - ] - }, - "subject": { - "reference": "Patient/OPA-Patient1" - }, - "authoredOn": "2018-08-08", - "insurance": [ - { - "reference": "Coverage/OPA-Coverage1" - } - ], - "requester": { - "reference": "Organization/OPA-ProviderOrganization1" - }, - "performer": [ - { - "reference": "Practitioner/OPA-OperatingPhysician1" - }, - { - "reference": "Practitioner/OPA-AttendingPhysician1" - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/vocabulary/CodeSystem/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/vocabulary/CodeSystem/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/vocabulary/ValueSet/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/vocabulary/ValueSet/ValueSet-AdministrativeGender.json deleted file mode 100644 index 156220f9b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/vocabulary/ValueSet/ValueSet-AdministrativeGender.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "AdministrativeGender", - "meta": { - "versionId": "1", - "lastUpdated": "2022-02-11T20:37:50.811+00:00", - "source": "#5pAPnFaiCW12WWid" - }, - "url": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender", - "version": "1.1.0", - "name": "AdministrativeGender", - "title": "Administrative Gender", - "status": "draft", - "date": "2022-04-04T23:44:44+00:00", - "publisher": "Health Level Seven International", - "contact": [ - { - "name": "HL7 International - Public Health", - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pher" - } - ] - }, - { - "name": "Cynthia Bush, Health Scientist (Informatics), CDC/National Center for Health Statistics", - "telecom": [ - { - "system": "email", - "value": "pdz1@cdc.gov" - } - ] - }, - { - "name": "AbdulMalik Shakir, FHL7, President and Chief Informatics Scientist Hi3 Solutions", - "telecom": [ - { - "system": "email", - "value": "abdulmalik.shakir@hi3solutions.com" - } - ] - } - ], - "description": "The gender of a person used for administrative purposes.\n\n**Inter-jurisdictional Exchange (IJE) concept mapping**\n\n|VRDR IG Code | VRDR IG Display Name | IJE Code |IJE Display Name\n| -------- | -------- | -------- | --------|\n|male|Male|M|Male|\n|female|Female|F|Female|\n|UNK|unknown|U|Unknown|", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ], - "text": "US Realm" - } - ], - "compose": { - "include": [ - { - "system": "http://hl7.org/fhir/administrative-gender", - "concept": [ - { - "code": "male", - "display": "Male" - }, - { - "code": "female", - "display": "Female" - } - ] - }, - { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "concept": [ - { - "code": "UNK", - "display": "unknown" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/cql/FHIRHelpers.cql deleted file mode 100644 index e941c378b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/cql/FHIRHelpers.cql +++ /dev/null @@ -1,807 +0,0 @@ -library FHIRHelpers version '4.0.001' - -using FHIR version '4.0.1' - -context Patient - -define function "ToInterval"(period FHIR.Period): - if period is null then null - else Interval[period."start".value, period."end".value] - -define function "ToQuantity"(quantity FHIR.Quantity): - if quantity is null then null - else System.Quantity { value: quantity.value.value, unit: quantity.unit.value } - -define function "ToRatio"(ratio FHIR.Ratio): - if ratio is null then null - else System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) } - -define function "ToInterval"(range FHIR.Range): - if range is null then null - else Interval[ToQuantity(range.low), ToQuantity(range.high)] - -define function "ToCode"(coding FHIR.Coding): - if coding is null then null - else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value } - -define function "ToConcept"(concept FHIR.CodeableConcept): - if concept is null then null - else System.Concept { codes: concept.coding C - return ToCode(C), display: concept.text.value } - -define function "ToString"(value AccountStatus): - value.value - -define function "ToString"(value ActionCardinalityBehavior): - value.value - -define function "ToString"(value ActionConditionKind): - value.value - -define function "ToString"(value ActionGroupingBehavior): - value.value - -define function "ToString"(value ActionParticipantType): - value.value - -define function "ToString"(value ActionPrecheckBehavior): - value.value - -define function "ToString"(value ActionRelationshipType): - value.value - -define function "ToString"(value ActionRequiredBehavior): - value.value - -define function "ToString"(value ActionSelectionBehavior): - value.value - -define function "ToString"(value ActivityDefinitionKind): - value.value - -define function "ToString"(value ActivityParticipantType): - value.value - -define function "ToString"(value AddressType): - value.value - -define function "ToString"(value AddressUse): - value.value - -define function "ToString"(value AdministrativeGender): - value.value - -define function "ToString"(value AdverseEventActuality): - value.value - -define function "ToString"(value AggregationMode): - value.value - -define function "ToString"(value AllergyIntoleranceCategory): - value.value - -define function "ToString"(value AllergyIntoleranceCriticality): - value.value - -define function "ToString"(value AllergyIntoleranceSeverity): - value.value - -define function "ToString"(value AllergyIntoleranceType): - value.value - -define function "ToString"(value AppointmentStatus): - value.value - -define function "ToString"(value AssertionDirectionType): - value.value - -define function "ToString"(value AssertionOperatorType): - value.value - -define function "ToString"(value AssertionResponseTypes): - value.value - -define function "ToString"(value AuditEventAction): - value.value - -define function "ToString"(value AuditEventAgentNetworkType): - value.value - -define function "ToString"(value AuditEventOutcome): - value.value - -define function "ToString"(value BindingStrength): - value.value - -define function "ToString"(value BiologicallyDerivedProductCategory): - value.value - -define function "ToString"(value BiologicallyDerivedProductStatus): - value.value - -define function "ToString"(value BiologicallyDerivedProductStorageScale): - value.value - -define function "ToString"(value BundleType): - value.value - -define function "ToString"(value CapabilityStatementKind): - value.value - -define function "ToString"(value CarePlanActivityKind): - value.value - -define function "ToString"(value CarePlanActivityStatus): - value.value - -define function "ToString"(value CarePlanIntent): - value.value - -define function "ToString"(value CarePlanStatus): - value.value - -define function "ToString"(value CareTeamStatus): - value.value - -define function "ToString"(value CatalogEntryRelationType): - value.value - -define function "ToString"(value ChargeItemDefinitionPriceComponentType): - value.value - -define function "ToString"(value ChargeItemStatus): - value.value - -define function "ToString"(value ClaimResponseStatus): - value.value - -define function "ToString"(value ClaimStatus): - value.value - -define function "ToString"(value ClinicalImpressionStatus): - value.value - -define function "ToString"(value CodeSearchSupport): - value.value - -define function "ToString"(value CodeSystemContentMode): - value.value - -define function "ToString"(value CodeSystemHierarchyMeaning): - value.value - -define function "ToString"(value CommunicationPriority): - value.value - -define function "ToString"(value CommunicationRequestStatus): - value.value - -define function "ToString"(value CommunicationStatus): - value.value - -define function "ToString"(value CompartmentCode): - value.value - -define function "ToString"(value CompartmentType): - value.value - -define function "ToString"(value CompositionAttestationMode): - value.value - -define function "ToString"(value CompositionStatus): - value.value - -define function "ToString"(value ConceptMapEquivalence): - value.value - -define function "ToString"(value ConceptMapGroupUnmappedMode): - value.value - -define function "ToString"(value ConditionalDeleteStatus): - value.value - -define function "ToString"(value ConditionalReadStatus): - value.value - -define function "ToString"(value ConsentDataMeaning): - value.value - -define function "ToString"(value ConsentProvisionType): - value.value - -define function "ToString"(value ConsentState): - value.value - -define function "ToString"(value ConstraintSeverity): - value.value - -define function "ToString"(value ContactPointSystem): - value.value - -define function "ToString"(value ContactPointUse): - value.value - -define function "ToString"(value ContractPublicationStatus): - value.value - -define function "ToString"(value ContractStatus): - value.value - -define function "ToString"(value ContributorType): - value.value - -define function "ToString"(value CoverageStatus): - value.value - -define function "ToString"(value CurrencyCode): - value.value - -define function "ToString"(value DayOfWeek): - value.value - -define function "ToString"(value DaysOfWeek): - value.value - -define function "ToString"(value DetectedIssueSeverity): - value.value - -define function "ToString"(value DetectedIssueStatus): - value.value - -define function "ToString"(value DeviceMetricCalibrationState): - value.value - -define function "ToString"(value DeviceMetricCalibrationType): - value.value - -define function "ToString"(value DeviceMetricCategory): - value.value - -define function "ToString"(value DeviceMetricColor): - value.value - -define function "ToString"(value DeviceMetricOperationalStatus): - value.value - -define function "ToString"(value DeviceNameType): - value.value - -define function "ToString"(value DeviceRequestStatus): - value.value - -define function "ToString"(value DeviceUseStatementStatus): - value.value - -define function "ToString"(value DiagnosticReportStatus): - value.value - -define function "ToString"(value DiscriminatorType): - value.value - -define function "ToString"(value DocumentConfidentiality): - value.value - -define function "ToString"(value DocumentMode): - value.value - -define function "ToString"(value DocumentReferenceStatus): - value.value - -define function "ToString"(value DocumentRelationshipType): - value.value - -define function "ToString"(value EligibilityRequestPurpose): - value.value - -define function "ToString"(value EligibilityRequestStatus): - value.value - -define function "ToString"(value EligibilityResponsePurpose): - value.value - -define function "ToString"(value EligibilityResponseStatus): - value.value - -define function "ToString"(value EnableWhenBehavior): - value.value - -define function "ToString"(value EncounterLocationStatus): - value.value - -define function "ToString"(value EncounterStatus): - value.value - -define function "ToString"(value EndpointStatus): - value.value - -define function "ToString"(value EnrollmentRequestStatus): - value.value - -define function "ToString"(value EnrollmentResponseStatus): - value.value - -define function "ToString"(value EpisodeOfCareStatus): - value.value - -define function "ToString"(value EventCapabilityMode): - value.value - -define function "ToString"(value EventTiming): - value.value - -define function "ToString"(value EvidenceVariableType): - value.value - -define function "ToString"(value ExampleScenarioActorType): - value.value - -define function "ToString"(value ExplanationOfBenefitStatus): - value.value - -define function "ToString"(value ExposureState): - value.value - -define function "ToString"(value ExtensionContextType): - value.value - -define function "ToString"(value FHIRAllTypes): - value.value - -define function "ToString"(value FHIRDefinedType): - value.value - -define function "ToString"(value FHIRDeviceStatus): - value.value - -define function "ToString"(value FHIRResourceType): - value.value - -define function "ToString"(value FHIRSubstanceStatus): - value.value - -define function "ToString"(value FHIRVersion): - value.value - -define function "ToString"(value FamilyHistoryStatus): - value.value - -define function "ToString"(value FilterOperator): - value.value - -define function "ToString"(value FlagStatus): - value.value - -define function "ToString"(value GoalLifecycleStatus): - value.value - -define function "ToString"(value GraphCompartmentRule): - value.value - -define function "ToString"(value GraphCompartmentUse): - value.value - -define function "ToString"(value GroupMeasure): - value.value - -define function "ToString"(value GroupType): - value.value - -define function "ToString"(value GuidanceResponseStatus): - value.value - -define function "ToString"(value GuidePageGeneration): - value.value - -define function "ToString"(value GuideParameterCode): - value.value - -define function "ToString"(value HTTPVerb): - value.value - -define function "ToString"(value IdentifierUse): - value.value - -define function "ToString"(value IdentityAssuranceLevel): - value.value - -define function "ToString"(value ImagingStudyStatus): - value.value - -define function "ToString"(value ImmunizationEvaluationStatus): - value.value - -define function "ToString"(value ImmunizationStatus): - value.value - -define function "ToString"(value InvoicePriceComponentType): - value.value - -define function "ToString"(value InvoiceStatus): - value.value - -define function "ToString"(value IssueSeverity): - value.value - -define function "ToString"(value IssueType): - value.value - -define function "ToString"(value LinkType): - value.value - -define function "ToString"(value LinkageType): - value.value - -define function "ToString"(value ListMode): - value.value - -define function "ToString"(value ListStatus): - value.value - -define function "ToString"(value LocationMode): - value.value - -define function "ToString"(value LocationStatus): - value.value - -define function "ToString"(value MeasureReportStatus): - value.value - -define function "ToString"(value MeasureReportType): - value.value - -define function "ToString"(value MediaStatus): - value.value - -define function "ToString"(value MedicationAdministrationStatus): - value.value - -define function "ToString"(value MedicationDispenseStatus): - value.value - -define function "ToString"(value MedicationKnowledgeStatus): - value.value - -define function "ToString"(value MedicationRequestIntent): - value.value - -define function "ToString"(value MedicationRequestPriority): - value.value - -define function "ToString"(value MedicationRequestStatus): - value.value - -define function "ToString"(value MedicationStatementStatus): - value.value - -define function "ToString"(value MedicationStatus): - value.value - -define function "ToString"(value MessageSignificanceCategory): - value.value - -define function "ToString"(value Messageheader_Response_Request): - value.value - -define function "ToString"(value MimeType): - value.value - -define function "ToString"(value NameUse): - value.value - -define function "ToString"(value NamingSystemIdentifierType): - value.value - -define function "ToString"(value NamingSystemType): - value.value - -define function "ToString"(value NarrativeStatus): - value.value - -define function "ToString"(value NoteType): - value.value - -define function "ToString"(value NutritiionOrderIntent): - value.value - -define function "ToString"(value NutritionOrderStatus): - value.value - -define function "ToString"(value ObservationDataType): - value.value - -define function "ToString"(value ObservationRangeCategory): - value.value - -define function "ToString"(value ObservationStatus): - value.value - -define function "ToString"(value OperationKind): - value.value - -define function "ToString"(value OperationParameterUse): - value.value - -define function "ToString"(value OrientationType): - value.value - -define function "ToString"(value ParameterUse): - value.value - -define function "ToString"(value ParticipantRequired): - value.value - -define function "ToString"(value ParticipantStatus): - value.value - -define function "ToString"(value ParticipationStatus): - value.value - -define function "ToString"(value PaymentNoticeStatus): - value.value - -define function "ToString"(value PaymentReconciliationStatus): - value.value - -define function "ToString"(value ProcedureStatus): - value.value - -define function "ToString"(value PropertyRepresentation): - value.value - -define function "ToString"(value PropertyType): - value.value - -define function "ToString"(value ProvenanceEntityRole): - value.value - -define function "ToString"(value PublicationStatus): - value.value - -define function "ToString"(value QualityType): - value.value - -define function "ToString"(value QuantityComparator): - value.value - -define function "ToString"(value QuestionnaireItemOperator): - value.value - -define function "ToString"(value QuestionnaireItemType): - value.value - -define function "ToString"(value QuestionnaireResponseStatus): - value.value - -define function "ToString"(value ReferenceHandlingPolicy): - value.value - -define function "ToString"(value ReferenceVersionRules): - value.value - -define function "ToString"(value ReferredDocumentStatus): - value.value - -define function "ToString"(value RelatedArtifactType): - value.value - -define function "ToString"(value RemittanceOutcome): - value.value - -define function "ToString"(value RepositoryType): - value.value - -define function "ToString"(value RequestIntent): - value.value - -define function "ToString"(value RequestPriority): - value.value - -define function "ToString"(value RequestStatus): - value.value - -define function "ToString"(value ResearchElementType): - value.value - -define function "ToString"(value ResearchStudyStatus): - value.value - -define function "ToString"(value ResearchSubjectStatus): - value.value - -define function "ToString"(value ResourceType): - value.value - -define function "ToString"(value ResourceVersionPolicy): - value.value - -define function "ToString"(value ResponseType): - value.value - -define function "ToString"(value RestfulCapabilityMode): - value.value - -define function "ToString"(value RiskAssessmentStatus): - value.value - -define function "ToString"(value SPDXLicense): - value.value - -define function "ToString"(value SearchComparator): - value.value - -define function "ToString"(value SearchEntryMode): - value.value - -define function "ToString"(value SearchModifierCode): - value.value - -define function "ToString"(value SearchParamType): - value.value - -define function "ToString"(value SectionMode): - value.value - -define function "ToString"(value SequenceType): - value.value - -define function "ToString"(value ServiceRequestIntent): - value.value - -define function "ToString"(value ServiceRequestPriority): - value.value - -define function "ToString"(value ServiceRequestStatus): - value.value - -define function "ToString"(value SlicingRules): - value.value - -define function "ToString"(value SlotStatus): - value.value - -define function "ToString"(value SortDirection): - value.value - -define function "ToString"(value SpecimenContainedPreference): - value.value - -define function "ToString"(value SpecimenStatus): - value.value - -define function "ToString"(value Status): - value.value - -define function "ToString"(value StrandType): - value.value - -define function "ToString"(value StructureDefinitionKind): - value.value - -define function "ToString"(value StructureMapContextType): - value.value - -define function "ToString"(value StructureMapGroupTypeMode): - value.value - -define function "ToString"(value StructureMapInputMode): - value.value - -define function "ToString"(value StructureMapModelMode): - value.value - -define function "ToString"(value StructureMapSourceListMode): - value.value - -define function "ToString"(value StructureMapTargetListMode): - value.value - -define function "ToString"(value StructureMapTransform): - value.value - -define function "ToString"(value SubscriptionChannelType): - value.value - -define function "ToString"(value SubscriptionStatus): - value.value - -define function "ToString"(value SupplyDeliveryStatus): - value.value - -define function "ToString"(value SupplyRequestStatus): - value.value - -define function "ToString"(value SystemRestfulInteraction): - value.value - -define function "ToString"(value TaskIntent): - value.value - -define function "ToString"(value TaskPriority): - value.value - -define function "ToString"(value TaskStatus): - value.value - -define function "ToString"(value TestReportActionResult): - value.value - -define function "ToString"(value TestReportParticipantType): - value.value - -define function "ToString"(value TestReportResult): - value.value - -define function "ToString"(value TestReportStatus): - value.value - -define function "ToString"(value TestScriptRequestMethodCode): - value.value - -define function "ToString"(value TriggerType): - value.value - -define function "ToString"(value TypeDerivationRule): - value.value - -define function "ToString"(value TypeRestfulInteraction): - value.value - -define function "ToString"(value UDIEntryType): - value.value - -define function "ToString"(value UnitsOfTime): - value.value - -define function "ToString"(value Use): - value.value - -define function "ToString"(value VariableType): - value.value - -define function "ToString"(value VisionBase): - value.value - -define function "ToString"(value VisionEyes): - value.value - -define function "ToString"(value VisionStatus): - value.value - -define function "ToString"(value XPathUsageType): - value.value - -define function "ToString"(value base64Binary): - value.value - -define function "ToString"(value id): - value.value - -define function "ToBoolean"(value boolean): - value.value - -define function "ToDate"(value date): - value.value - -define function "ToDateTime"(value dateTime): - value.value - -define function "ToDecimal"(value decimal): - value.value - -define function "ToDateTime"(value instant): - value.value - -define function "ToInteger"(value integer): - value.value - -define function "ToString"(value string): - value.value - -define function "ToTime"(value time): - value.value - -define function "ToString"(value uri): - value.value - -define function "ToString"(value xhtml): - value.value \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql deleted file mode 100644 index 8defc292f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql +++ /dev/null @@ -1,240 +0,0 @@ -library OutpatientPriorAuthorizationPrepopulation version '1.0.0' - -using FHIR version '4.0.1' - -// include FHIRCommon version '4.0.1' called FHIRCommon -// include FHIRHelpers version '4.0.1' called FHIRHelpers - - - -include FHIRHelpers version '4.0.001' called FHIRHelpers -// valueset "AAN MCI Encounters Outpt and Care Plan": 'https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.11.1040' - -/* parameter EncounterId String */ - - - -parameter ClaimId String default '14703' - -context Patient - -define ClaimResource: - First([Claim] C - where C.id = ClaimId - ) - -define OrganizationFacility: - First([Organization] O - where EndsWith(ClaimResource.provider.reference, O.id) - ) - -define "FacilityName": - OrganizationFacility.name.value - -define "FacilityNPI": - ( OrganizationFacility.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define function FindPractitioner(myCode String, mySequence Integer): - //If we can't find a Primary practicioner by code, use the sequence as a fallback. - - Coalesce(First([Practitioner] P //Practitioner who is on the careteam and contains a code that equals supplied code - - where EndsWith(First(ClaimResource.careTeam CT - where exists(CT.role.coding CTCode - where CTCode.code.value = myCode - ) - ).provider.reference, P.id - ) - ), First([Practitioner] P //Practitioner who is on the careteam and is of the supplied sequence - - where EndsWith(First(ClaimResource.careTeam CT - where CT.sequence = mySequence - ).provider.reference, P.id - ) - ) - ) - -define PractitionerOperatingPhysician: - FindPractitioner('primary', 1) - -define PractitionerAttendingPhysician: - FindPractitioner('assist', 2) - -// Should probably be seperate, Utiltiy files; but just for practice: - -//PATIENT INFO - - - -define OfficialName: - First(Patient.name name - where name.use.value = 'official' - ) - -define FirstName: - Patient.name[0] - -define BeneficiaryName: - Coalesce(OfficialName, FirstName) - -define "BeneficiaryFirstName": - BeneficiaryName.given[0].value - -define "BeneficiaryLastName": - BeneficiaryName.family.value - -define "BeneficiaryDOB": - Patient.birthDate.value - -define "BeneficiaryGender": - Patient.gender.value - -define RequestCoverage: - ClaimResource.insurance - -define CoverageResource: - First([Coverage] coverage - // pull coverage resource id from the service request insurance extension - - where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) - ) - -define "BeneficiaryMedicareID": - CoverageResource.subscriberId.value - -// OPERATING PHYSICIAN INFO - - -define "OperatingPhysicianFirstName": - PractitionerOperatingPhysician.name.given[0].value - -define "OperatingPhysicianLastName": - PractitionerOperatingPhysician.name.family.value - -define "OperatingPhysicianNPI": - ( PractitionerOperatingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define OperatingPhysicianAddress: - First(PractitionerOperatingPhysician.address address - where address.use.value = 'work' - ) - -define "OperatingPhysicianAddress1": - OperatingPhysicianAddress.line[0].value - -define "OperatingPhysicianAddress2": - OperatingPhysicianAddress.line[1].value - -define "OperatingPhysicianAddressCity": - OperatingPhysicianAddress.city.value - -define "OperatingPhysicianAddressState": - OperatingPhysicianAddress.state.value - -define "OperatingPhysicianAddressZip": - OperatingPhysicianAddress.postalCode.value - -// Attending PHYSICIAN INFO - - -define "AttendingPhysicianSame": - case - when PractitionerAttendingPhysician is not null then false - else true end - -define "AttendingPhysicianFirstName": - PractitionerAttendingPhysician.name.given[0].value - -define "AttendingPhysicianLastName": - PractitionerAttendingPhysician.name.family.value - -define "AttendingPhysicianNPI": - ( PractitionerAttendingPhysician.identifier I - where I.system = 'http://hl7.org.fhir/sid/us-npi' - ).value.value - -define AttendingPhysicianAddressWork: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'work' - ) - -define AttendingPhysicianAddressHome: - First(PractitionerAttendingPhysician.address address - where address.use.value = 'home' - ) - -define AttendingPhysicianAddress: - Coalesce(AttendingPhysicianAddressWork, AttendingPhysicianAddressHome) - -define "AttendingPhysicianAddress1": - AttendingPhysicianAddress.line[0].value - -define "AttendingPhysicianAddress2": - AttendingPhysicianAddress.line[1].value - -define "AttendingPhysicianAddressCity": - AttendingPhysicianAddress.city.value - -define "AttendingPhysicianAddressState": - AttendingPhysicianAddress.state.value - -define "AttendingPhysicianAddressZip": - AttendingPhysicianAddress.postalCode.value - -//CLAIM INFORMATION - - -define ClaimDiagnosisReferenced: - First([Condition] C - where //First condition referenced by the Claim - exists(ClaimResource.diagnosis.diagnosis Condition - where EndsWith(Condition.reference, C.id) - ) - ).code.coding[0].code.value - -define ClaimDiagnosisCode: - ClaimResource.diagnosis.diagnosis.coding[0].code.value //TODO: Check for primary vs. secondary? - - -define "RequestDetailsPrimaryDiagnosisCode": - Coalesce(ClaimDiagnosisCode, ClaimDiagnosisReferenced) - -//PROCEDURE INFORMATION - - -define RelevantReferencedProcedures: - [Procedure] P - where P.status.value != 'completed' - and exists ( ClaimResource.procedure Procedure - where EndsWith(Procedure.procedure.reference, P.id) - ) - -define function FindProcedure(proc String): - exists ( ClaimResource.procedure.procedure.coding P - where P.code.value = proc - ) - or exists ( RelevantReferencedProcedures.code.coding coding - where coding.code.value = proc - ) - -define "RequestDetailsProcedureCode64612": - FindProcedure('64612') - -define "RequestDetailsProcedureCodeJ0586": - FindProcedure('J0586') - -define "RequestDetailsProcedureCode64615": - FindProcedure('64615') - -define "RequestDetailsProcedureCode20912": - FindProcedure('20912') - -define "RequestDetailsProcedureCode36478": - FindProcedure('36478') - -define "RequestDetailsProcedureCode22551": - FindProcedure('22551') \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Library-FHIRHelpers.json deleted file mode 100644 index 643e6e67f..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Library-FHIRHelpers.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "resourceType": "Library", - "id": "FHIRHelpers", - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "4.0.001", - "name": "FHIRHelpers", - "title": "FHIR Helpers", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "content": [ - { - "contentType": "text/cql", - "url": "../cql/FHIRHelpers.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json deleted file mode 100644 index de46c31b2..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "resourceType": "Library", - "id": "OutpatientPriorAuthorizationPrepopulation", - "meta": { - "versionId": "4", - "lastUpdated": "2023-01-04T22:42:31.776+00:00", - "source": "#jvktlnzFIHZuPkeq" - }, - "url": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation", - "version": "1.0.0", - "name": "OutpatientPriorAuthorizationPrepopulation", - "title": "Outpatient Prior Authorization Prepopulation", - "status": "draft", - "type": { - "coding": [ - { - "code": "logic-library" - } - ] - }, - "relatedArtifact": [ - { - "type": "depends-on", - "resource": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|1.0.0" - } - ], - "dataRequirement": [ - { - "type": "ServiceRequest" - }, - { - "type": "Procedure" - }, - { - "type": "Claim" - }, - { - "type": "Organization" - }, - { - "type": "Practitioner" - }, - { - "type": "Coverage" - }, - { - "type": "Condition" - } - ], - "content": [ - { - "contentType": "text/cql", - "url": "../cql/OutpatientPriorAuthorizationPrepopulation.cql" - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json deleted file mode 100644 index 1dd67ee09..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "OutpatientPriorAuthorizationRequest", - "meta": { - "versionId": "2", - "lastUpdated": "2022-11-21T17:34:01.764+00:00", - "source": "#Szj0RYKKLb3zYK89", - "profile": [ - "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" - ] - }, - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - ], - "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", - "name": "OutpatientPriorAuthorizationRequest", - "title": "Outpatient Prior Authorization Request", - "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], - "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], - "description": "Testing the form", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Facility Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName" - } - } - ], - "linkId": "1.1", - "text": "Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI" - } - } - ], - "linkId": "1.2", - "text": "NPI", - "type": "text", - "required": true - }, - { - "linkId": "1.3", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "1.4", - "text": "Contract/Region", - "type": "question", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "Beneficiary Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName" - } - } - ], - "linkId": "2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName" - } - } - ], - "linkId": "2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB" - } - } - ], - "linkId": "2.3", - "text": "Date of Birth", - "type": "date", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID" - } - } - ], - "linkId": "2.4", - "text": "Medicare ID", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender" - } - } - ], - "linkId": "2.5", - "text": "Gender", - "type": "question", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] - } - ] - }, - { - "linkId": "3", - "text": "Operating Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName" - } - } - ], - "linkId": "3.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName" - } - } - ], - "linkId": "3.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI" - } - } - ], - "linkId": "3.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "3.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "3.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress1" - } - } - ], - "linkId": "3.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddress2" - } - } - ], - "linkId": "3.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressCity" - } - } - ], - "linkId": "3.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressState" - } - } - ], - "linkId": "3.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianAddressZip" - } - } - ], - "linkId": "3.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - }, - { - "linkId": "4", - "text": "Attending Physician Information", - "type": "group", - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianSame" - } - } - ], - "linkId": "4.1", - "text": "Same as Operating Physician?", - "type": "boolean", - "required": false - }, - { - "linkId": "4.2", - "text": "Attending Physician", - "type": "group", - "enableWhen": [ - { - "question": "4.1", - "operator": "=", - "answerBoolean": false - } - ], - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName" - } - } - ], - "linkId": "4.2.1", - "text": "First Name", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName" - } - } - ], - "linkId": "4.2.2", - "text": "Last Name", - "type": "text", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI" - } - } - ], - "linkId": "4.2.3", - "text": "NPI", - "type": "string", - "required": true - }, - { - "linkId": "4.2.4", - "text": "PTAN", - "type": "string", - "required": true - }, - { - "linkId": "4.2.5", - "text": "Address", - "type": "group", - "required": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress1" - } - } - ], - "linkId": "4.2.5.1", - "text": "Address1", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddress2" - } - } - ], - "linkId": "4.2.5.2", - "text": "Address2", - "type": "string", - "required": false - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressCity" - } - } - ], - "linkId": "4.2.5.3", - "text": "City", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressState" - } - } - ], - "linkId": "4.2.5.4", - "text": "State", - "type": "string", - "required": true - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianAddressZip" - } - } - ], - "linkId": "4.2.5.5", - "text": "Zip", - "type": "string", - "required": true - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json deleted file mode 100644 index 37c04ba30..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "resourceType": "Questionnaire", - "id": "questionnaire-sdc-profile-example-multi-subject", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract", - "valueBoolean": true - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observation-extract-category", - "valueCodeableConcept": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/observation-category", - "code": "vital-signs" - } - ] - } - } - ], - "url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-profile-example-multi-subject", - "version": "3.0.0", - "name": "MultiSubject", - "title": "Example multi-subject Questionnaire", - "status": "draft", - "experimental": true, - "subjectType": [ - "Patient" - ], - "date": "2022-10-01T05:09:13+00:00", - "publisher": "HL7 International - FHIR Infrastructure Work Group", - "contact": [ - { - "telecom": [ - { - "system": "url", - "value": "http://hl7.org/Special/committees/fiwg" - } - ] - } - ], - "description": "A sample Questionnaire that shows the use of the isSubject extension to flag a subject change within a Questionnaire.", - "jurisdiction": [ - { - "coding": [ - { - "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", - "code": "001" - } - ] - } - ], - "item": [ - { - "linkId": "1", - "text": "Mother's name", - "type": "string", - "required": true - }, - { - "linkId": "2", - "text": "Mother's id", - "type": "string", - "required": true - }, - { - "linkId": "3", - "code": [ - { - "system": "http://loinc.org", - "code": "8302-2" - } - ], - "text": "Height", - "type": "quantity", - "required": true - }, - { - "linkId": "4", - "code": [ - { - "system": "http://loinc.org", - "code": "29463-7" - } - ], - "text": "Weight", - "type": "quantity", - "required": true - }, - { - "linkId": "5", - "text": "Children", - "type": "group", - "required": true, - "repeats": true, - "item": [ - { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource", - "valueCode": "Patient" - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", - "valueBoolean": true - } - ], - "linkId": "5.1", - "text": "Record", - "type": "reference", - "required": true - }, - { - "linkId": "5.2", - "text": "Name", - "type": "string", - "required": true - }, - { - "linkId": "5.3", - "text": "Birth date", - "type": "date", - "required": true - }, - { - "linkId": "5.4", - "code": [ - { - "system": "http://loinc.org", - "code": "8302-2" - } - ], - "text": "Height", - "type": "quantity", - "required": true - }, - { - "linkId": "5.5", - "code": [ - { - "system": "http://loinc.org", - "code": "29463-7" - } - ], - "text": "Weight", - "type": "quantity", - "required": true - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Patient-sharondecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Patient-sharondecision.json deleted file mode 100644 index 169fc40f4..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Patient-sharondecision.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "resourceType": "Patient", - "id": "sharondecision", - "identifier": [ - { - "system": "urn:oid:1.2.36.146.595.217.0.1", - "value": "12345" - } - ], - "name": [ - { - "family": "Velociraptor", - "given": [ - "Sharon", - "Decision" - ] - } - ], - "gender": "female", - "birthDate": "1992-12-25" -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-QRSharonDecision.json deleted file mode 100644 index 3876d2a39..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-QRSharonDecision.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "QRSharonDecision", - "meta": { - "versionId": "1", - "lastUpdated": "2021-12-28T18:10:32.808+00:00", - "source": "#R7Wf0emvrt2bSkbQ", - "profile": [ - "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7", - "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-shareablequestionnaire" - ], - "tag": [ - { - "code": "lformsVersion: 25.1.3" - } - ] - }, - "questionnaire": "http://fhir.org/guide/cqf/cds4cpm", - "status": "completed", - "subject": { - "reference": "Patient/sharondecision", - "display": "Sharon Decision" - }, - "authored": "2021-12-28T11:10:32-07:00", - "item": [ - { - "linkId": "1", - "text": "My Pain Location: We’d like to ask you a few questions about your pain and how it is affecting your life. Please describe the location(s) of any pain you have had in the past 7 days. Please select only one pain type per location.", - "item": [ - { - "linkId": "1.1", - "text": "Head: What type of HEAD pain?", - "answer": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "55145008", - "display": "Stabbing" - } - } - ] - }, - { - "linkId": "1.6", - "text": "Lower Back: What type of LOWER BACK pain?", - "answer": [ - { - "valueCoding": { - "system": "http://snomed.info/sct", - "code": "162506004", - "display": "Prickling" - } - } - ] - } - ] - }, - { - "linkId": "2", - "text": "My Pain Intensity: Thinking about your overall pain, in the past 7 days, please respond to the questions below:", - "item": [ - { - "linkId": "2.1", - "text": "How intense was your pain at its worst?", - "answer": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - } - ] - }, - { - "linkId": "2.2", - "text": "How intense was your average pain?", - "answer": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - } - ] - }, - { - "linkId": "2.3", - "text": "What is your level of pain right now?", - "answer": [ - { - "valueCoding": { - "system": "http://loinc.org", - "code": "LA6750-9", - "display": "Severe" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-demographics-qr.json deleted file mode 100644 index d8bf10999..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-demographics-qr.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "demographics-qr", - "questionnaire": "http://hl7.org/fhir/uv/sdc/Questionnaire/demographics", - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueExpression": { - "language": "application/x-fhir-query", - "expression": "Patient?_id={{%25patient.id}}" - } - } - ], - "status": "completed", - "subject": { - "reference": "" - }, - "authored": "2021-12-01", - "item": [ - { - "linkId": "patient.id", - "definition": "Patient.id", - "text": "(internal use)", - "answer": [] - }, - { - "linkId": "patient.birthDate", - "definition": "Patient.birthDate", - "text": "Date of birth", - "answer": [] - }, - { - "linkId": "patient.name", - "definition": "Patient.name", - "text": "Name(s)", - "item": [ - { - "linkId": "patient.name.family", - "definition": "Patient.name.family", - "text": "Family name", - "answer": [] - }, - { - "linkId": "patient.name.given", - "definition": "Patient.name.given", - "text": "Given name(s)", - "answer": [] - } - ] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "name": "relative", - "language": "application/x-fhir-query", - "expression": "RelatedPerson?patient={{%patient.id}}" - } - }, - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", - "valueExpression": { - "language": "application/x-fhir-query", - "expression": "RelatedPerson?patient={{%patient.id}}" - } - } - ], - "linkId": "relative", - "text": "Relatives, caregivers and other personal relationships", - "type": "group", - "repeats": true, - "item": [ - { - "linkId": "relative.id", - "definition": "RelatedPerson.id", - "text": "(internal use)", - "answer": [] - }, - { - "linkId": "relative.relationship", - "definition": "RelatedPerson.relationship", - "text": "Name(s)", - "answer": [] - }, - { - "extension": [ - { - "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", - "valueExpression": { - "name": "relativeName", - "language": "text/fhirpath", - "expression": "%relative.name" - } - } - ], - "linkId": "relative.name", - "definition": "RelatedPerson.name", - "text": "Name(s)", - "item": [ - { - "linkId": "relative.name.family", - "definition": "RelatedPerson.name.family", - "text": "Family name", - "answer": [] - }, - { - "linkId": "relative.name.given", - "definition": "RelatedPerson.name.given", - "text": "Given name(s)", - "answer": [] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-mypain-no-url.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-mypain-no-url.json deleted file mode 100644 index c3152b2bb..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-mypain-no-url.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "resourceType": "QuestionnaireResponse", - "id": "mypain-no-url", - "reference": "Patient/d68463ce-3cad-4309-a271-e2860694ede7", - "meta": { - "versionId": "1", - "lastUpdated": "2020-07-13T19:15:58.761+00:00", - "profile": [ - "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7" - ], - "tag": [ - { - "code": "lformsVersion: 23.0.0" - } - ] - }, - "title": "MyPain Questionnaire", - "status": "completed", - "item": [ - { - "linkId": "1", - "text": "Please describe the location(s) of any pain you have had in the past 7 days (e.g., lower back and left hip):", - "type": "text" - }, - { - "linkId": "2", - "text": "In the past 7 days - How intense was your pain at its worst?", - "type": "choice", - "answerOption": [ - { - "valueCoding": { - "system": "http://rti.com/fhir/rti/CodeSystem/mypain-questionnaireResponse", - "code": "mpqr-1005", - "display": "Moderate" - } - } - ] - }, - { - "linkId": "3", - "text": "How intense was your average pain?", - "type": "choice", - "answerOption": [ - { - "valueCoding": { - "system": "http://rti.com/fhir/rti/CodeSystem/mypain-questionnaireResponse", - "code": "mpqr-1005", - "display": "Moderate" - } - } - ] - }, - { - "linkId": "4", - "text": "What is your level of pain right now?", - "type": "choice", - "answerOption": [ - { - "valueCoding": { - "system": "http://rti.com/fhir/rti/CodeSystem/mypain-questionnaireResponse", - "code": "mpqr-1005", - "display": "Moderate" - } - } - ] - }, - { - "linkId": "5", - "prefix": "In the past 7 days:", - "text": "How much did pain interfere with your day to day activities?", - "type": "choice", - "answerOption": [ - { - "valueCoding": { - "system": "http://rti.com/fhir/rti/CodeSystem/mypain-questionnaireResponse", - "code": "mpqr-1011", - "display": "Quite a bit" - } - } - ] - }, - { - "linkId": "6", - "prefix": "In the past 7 days:", - "text": "How much did pain interfere with your work?", - "type": "choice", - "answerOption": [ - { - "valueCoding": { - "system": "http://rti.com/fhir/rti/CodeSystem/mypain-questionnaireResponse", - "code": "mpqr-1010", - "display": "Somewhat" - } - } - ] - }, - { - "linkId": "7", - "prefix": "In the past 7 days:", - "text": "How much did pain interfere with your ability to participate in social activities?", - "type": "choice", - "answerOption": [ - { - "valueCoding": { - "system": "http://rti.com/fhir/rti/CodeSystem/mypain-questionnaireResponse", - "code": "mpqr-1010", - "display": "Somewhat" - } - } - ] - }, - { - "linkId": "8", - "prefix": "In the past 7 days:", - "text": "How much did pain interfere with your household chores?", - "type": "choice", - "answerOption": [ - { - "valueCoding": { - "system": "http://rti.com/fhir/rti/CodeSystem/mypain-questionnaireResponse", - "code": "mpqr-1010", - "display": "Somewhat" - } - } - ] - } - ] -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json deleted file mode 100644 index a0583474e..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "resourceType": "CodeSystem", - "id": "careplan-category", - "text": { - "status": "generated", - "div": "

US Core CarePlan Category Extension Codes

Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.

\n

This code system http://hl7.org/fhir/us/core/CodeSystem/careplan-category defines the following codes:

CodeDisplayDefinition
assess-plan Assessment and Plan of TreatmentThe clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient.
" - }, - "url": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category", - "version": "3.1.0", - "name": "USCoreCarePlanCategoryExtensionCodes", - "title": "US Core CarePlan Category Extension Codes", - "status": "active", - "date": "2019-11-06T12:37:38+11:00", - "publisher": "HL7 US Realm Steering Committee", - "description": "Set of codes that are needed for implementation of the US-Core profiles. These codes are used as extensions to the FHIR and US Core value sets.\n", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ] - } - ], - "caseSensitive": true, - "content": "complete", - "concept": [ - { - "code": "assess-plan", - "display": "Assessment and Plan of Treatment", - "definition": "The clinical conclusions and assumptions that guide the patient's treatment and the clinical activities formulated for a patient." - } - ] -} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/vocabulary/ValueSet/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/vocabulary/ValueSet/ValueSet-AdministrativeGender.json deleted file mode 100644 index 156220f9b..000000000 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/vocabulary/ValueSet/ValueSet-AdministrativeGender.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "resourceType": "ValueSet", - "id": "AdministrativeGender", - "meta": { - "versionId": "1", - "lastUpdated": "2022-02-11T20:37:50.811+00:00", - "source": "#5pAPnFaiCW12WWid" - }, - "url": "http://hl7.org/fhir/us/vrdr/ValueSet/AdministrativeGender", - "version": "1.1.0", - "name": "AdministrativeGender", - "title": "Administrative Gender", - "status": "draft", - "date": "2022-04-04T23:44:44+00:00", - "publisher": "Health Level Seven International", - "contact": [ - { - "name": "HL7 International - Public Health", - "telecom": [ - { - "system": "url", - "value": "http://www.hl7.org/Special/committees/pher" - } - ] - }, - { - "name": "Cynthia Bush, Health Scientist (Informatics), CDC/National Center for Health Statistics", - "telecom": [ - { - "system": "email", - "value": "pdz1@cdc.gov" - } - ] - }, - { - "name": "AbdulMalik Shakir, FHL7, President and Chief Informatics Scientist Hi3 Solutions", - "telecom": [ - { - "system": "email", - "value": "abdulmalik.shakir@hi3solutions.com" - } - ] - } - ], - "description": "The gender of a person used for administrative purposes.\n\n**Inter-jurisdictional Exchange (IJE) concept mapping**\n\n|VRDR IG Code | VRDR IG Display Name | IJE Code |IJE Display Name\n| -------- | -------- | -------- | --------|\n|male|Male|M|Male|\n|female|Female|F|Female|\n|UNK|unknown|U|Unknown|", - "jurisdiction": [ - { - "coding": [ - { - "system": "urn:iso:std:iso:3166", - "code": "US", - "display": "United States of America" - } - ], - "text": "US Realm" - } - ], - "compose": { - "include": [ - { - "system": "http://hl7.org/fhir/administrative-gender", - "concept": [ - { - "code": "male", - "display": "Male" - }, - { - "code": "female", - "display": "Female" - } - ] - }, - { - "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", - "concept": [ - { - "code": "UNK", - "display": "unknown" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/child-routine-visit/child_routine_visit_careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/child-routine-visit/child_routine_visit_careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/child-routine-visit/child_routine_visit_careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/child-routine-visit/child_routine_visit_careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/child-routine-visit/child_routine_visit_patient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/child-routine-visit/child_routine_visit_patient.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/child-routine-visit/child_routine_visit_patient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/child-routine-visit/child_routine_visit_patient.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/child-routine-visit/child_routine_visit_plan_definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/child-routine-visit/child_routine_visit_plan_definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/child-routine-visit/child_routine_visit_plan_definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/child-routine-visit/child_routine_visit_plan_definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/FHIRHelpers.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/cql/FHIRHelpers.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/FHIRHelpers.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/OutpatientPriorAuthorizationPrepopulation.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/cql/TestActivityDefinition.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/TestActivityDefinition.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/cql/TestActivityDefinition.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/cql/TestActivityDefinition.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/extract-questionnaireresponse/careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/extract-questionnaireresponse/careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/extract-questionnaireresponse/careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/extract-questionnaireresponse/careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/extract-questionnaireresponse/patient-data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/extract-questionnaireresponse/patient-data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/extract-questionnaireresponse/patient-data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/extract-questionnaireresponse/patient-data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/hello-world/hello-world-careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/hello-world/hello-world-careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/hello-world/hello-world-careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/hello-world/hello-world-careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/hello-world/hello-world-patient-data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/hello-world/hello-world-patient-data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/hello-world/hello-world-patient-data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/hello-world/hello-world-patient-data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/hello-world/hello-world-patient-view-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/hello-world/hello-world-patient-view-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/hello-world/hello-world-patient-view-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/hello-world/hello-world-patient-view-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/CarePlan-opioid-Rec10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/CarePlan-opioid-Rec10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/CarePlan-opioid-Rec10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/CarePlan-opioid-Rec10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/vocabulary/CodeSystem/CodeSystem-careplan-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-careplan-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-careplan-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-careplan-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-careplan-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-content-bundle-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-content-bundle-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-content-bundle-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-content-bundle-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-content-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-content-bundle.json similarity index 99% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-content-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-content-bundle.json index aee863154..5b9eef077 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-content-bundle.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-content-bundle.json @@ -158,6 +158,7 @@ "item": [ { "linkId": "1", + "definition": "http://hl7.org/fhir/Organization", "text": "Facility Information", "type": "group", "item": [ @@ -173,6 +174,7 @@ } ], "linkId": "1.1", + "definition": "http://hl7.org/fhir/Organization#Organization.name", "text": "Name", "type": "string", "required": true @@ -189,12 +191,14 @@ } ], "linkId": "1.2", + "definition": "http://hl7.org/fhir/Organization#Organization.identifier", "text": "NPI", "type": "text", "required": true }, { "linkId": "1.3", + "definition": "http://hl7.org/fhir/Organization#Organization.identifier", "text": "PTAN", "type": "string", "required": true @@ -231,6 +235,7 @@ }, { "linkId": "2", + "definition": "http://hl7.org/fhir/Patient", "text": "Beneficiary Information", "type": "group", "item": [ @@ -246,6 +251,7 @@ } ], "linkId": "2.1", + "definition": "http://hl7.org/fhir/Patient#Patient.name.given", "text": "First Name", "type": "string", "required": true @@ -262,6 +268,7 @@ } ], "linkId": "2.2", + "definition": "http://hl7.org/fhir/Patient#Patient.name.family", "text": "Last Name", "type": "text", "required": true @@ -278,6 +285,7 @@ } ], "linkId": "2.3", + "definition": "http://hl7.org/fhir/Patient#Patient.birthDate", "text": "Date of Birth", "type": "date", "required": true @@ -294,6 +302,7 @@ } ], "linkId": "2.4", + "definition": "http://hl7.org/fhir/Patient#Patient.identifier.value", "text": "Medicare ID", "type": "string", "required": true @@ -310,6 +319,7 @@ } ], "linkId": "2.5", + "definition": "http://hl7.org/fhir/Patient#Patient.gender", "text": "Gender", "type": "choice", "required": true, diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-patient-data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-patient-data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/prepopulate/prepopulate-patient-data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/prepopulate/prepopulate-patient-data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-activityDefinition-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-activityDefinition-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-activityDefinition-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-activityDefinition-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-communication-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-communication-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-communication-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-communication-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-communicationrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-communicationrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-communicationrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-communicationrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/ActivityDefinition-complete-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-complete-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/ActivityDefinition-complete-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-complete-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-diagnosticreport-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-diagnosticreport-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-diagnosticreport-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-diagnosticreport-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-medicationrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-medicationrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-medicationrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-medicationrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-procedure-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-procedure-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-procedure-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-procedure-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-procedurerequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-procedurerequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-procedurerequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-procedurerequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-referralrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-referralrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-referralrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-referralrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-supplyrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-supplyrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-supplyrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-supplyrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-task-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-task-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-task-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-task-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-unsupported-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-unsupported-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/ActivityDefinition-unsupported-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/ActivityDefinition-unsupported-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-FHIRHelpers.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Library-FHIRHelpers.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-FHIRHelpers.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-OutpatientPriorAuthorizationPrepopulation.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/Library-TestActivityDefinition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-TestActivityDefinition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/resources/Library-TestActivityDefinition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Library-TestActivityDefinition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/PlanDefinition-DischargeInstructionsPlan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/PlanDefinition-DischargeInstructionsPlan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/PlanDefinition-DischargeInstructionsPlan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/PlanDefinition-DischargeInstructionsPlan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/PlanDefinition-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/PlanDefinition-generate-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/PlanDefinition-generate-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/PlanDefinition-generate-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/PlanDefinition-route-one.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/PlanDefinition-route-one.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/PlanDefinition-route-one.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/PlanDefinition-route-one.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-NumericExtract.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-NumericExtract.json new file mode 100644 index 000000000..acc7299b5 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-NumericExtract.json @@ -0,0 +1,88 @@ +{ + "resourceType": "Questionnaire", + "id": "NumericExtract", + "url": "http://gefyra.de/fhir/Questionnaire/NumericExtract", + "title": "Test case for numeric extraction using HAPI's $extract operation", + "status": "active", + "item": [ + { + "linkId": "0", + "text": "Persönliche Angaben", + "type": "group", + "required": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "cm", + "system": "http://unitsofmeasure.org", + "display": "Zentimeter" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", + "valueDuration": { + "value": 1, + "code": "a", + "system": "http://unitsofmeasure.org" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract", + "valueBoolean": true + } + ], + "linkId": "baseDataDecimalHeight", + "code": [ + { + "code": "1153637007", + "system": "http://snomed.info/sct", + "display": "Body height measure (observable entity)" + } + ], + "text": "Größe (in cm):", + "type": "integer", + "required": true, + "maxLength": 3 + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "kg", + "system": "http://unitsofmeasure.org", + "display": "Kilogramm" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", + "valueDuration": { + "value": 1, + "code": "a", + "system": "http://unitsofmeasure.org" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract", + "valueBoolean": true + } + ], + "linkId": "baseDataDecimalWeight", + "code": [ + { + "code": "27113001", + "system": "http://snomed.info/sct", + "display": "Body weight (observable entity)" + } + ], + "text": "Gewicht (in kg):", + "type": "decimal", + "required": true + } + ] + } + ] +} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json similarity index 98% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json index 7ad3d758e..bec28a8dd 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json @@ -11,8 +11,10 @@ }, "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", - "valueUri": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation|1.0.0" + "url": "http://hl7.org/fhir/StructureDefinition/cqif-library", + "valueReference": { + "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation|1.0.0" + } } ], "url": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-demographics.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-demographics.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-demographics.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-demographics.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Questionnaire-invalid-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-invalid-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/Questionnaire-invalid-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-invalid-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-mypain-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-mypain-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-mypain-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-mypain-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json new file mode 100644 index 000000000..40e418f41 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json @@ -0,0 +1,264 @@ +{ + "resourceType": "Questionnaire", + "id": "questionnaire-sdc-test-fhirpath-prepop-initialexpression", + "meta": { + "profile": [ + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-pop-exp" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "patient", + "display": "Patient" + } + }, + { + "url": "type", + "valueCode": "Patient" + }, + { + "url": "description", + "valueString": "The patient that is to be used to pre-populate the form" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext" + }, + { + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "user", + "display": "User" + } + }, + { + "url": "type", + "valueCode": "Practitioner" + }, + { + "url": "description", + "valueString": "The practitioner that is to be used to pre-populate the form" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", + "valueCode": "fhir" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-initialexpression", + "version": "3.0.0", + "name": "FhirPathPrepopSimple", + "title": "Questionnaire Pre-Population", + "status": "active", + "experimental": true, + "subjectType": [ + "Patient" + ], + "date": "2023-12-07T23:07:45+00:00", + "publisher": "HL7 International / FHIR Infrastructure", + "contact": [ + { + "name": "HL7 International / FHIR Infrastructure", + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg" + } + ] + }, + { + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg" + } + ] + } + ], + "description": "FhirPath based prepopulation simple example", + "jurisdiction": [ + { + "coding": [ + { + "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", + "code": "001", + "display": "World" + } + ] + } + ], + "item": [ + { + "linkId": "grp", + "type": "group", + "item": [ + { + "linkId": "part-details", + "text": "Participant details", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "participant-id", + "text": "Participant ID number", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(system='http://ns.electronichealth.net.au/id/medicare-number').value.first()" + } + } + ], + "linkId": "medicare-number", + "text": "Medicare number", + "type": "string", + "required": true + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(system='http://ns.electronichealth.net.au/id/dva').value.first()" + } + } + ], + "linkId": "dva-number", + "text": "DVA number", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.name.first().family" + } + } + ], + "linkId": "family-name", + "text": "Family name", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.name.first().given.first()" + } + } + ], + "linkId": "given-names", + "text": "Given name(s)", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.birthDate" + } + } + ], + "linkId": "dob", + "text": "Date of birth", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.telecom.where(system='phone').select(($this.where(use='mobile') | $this.where(use='home')).first().value)" + } + } + ], + "linkId": "contact-number", + "text": "Contact telephone number", + "type": "string", + "item": [ + { + "linkId": "contact-number-tooltip", + "text": "(mobile or land line including area code)", + "type": "text" + } + ] + } + ] + }, + { + "linkId": "provider-details", + "text": "Provider details", + "type": "group", + "repeats": false, + "readOnly": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%user.identifier.where(system='http://ns.electronichealth.net.au/id/hi/prn').first().value" + } + } + ], + "linkId": "provider-number", + "text": "Provider number for payment", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "today()" + } + } + ], + "linkId": "date-consult", + "text": "Date of consultation", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%user.name.first().select(given.first() + ' ' + family)" + } + } + ], + "linkId": "provider-name", + "text": "Name", + "type": "string", + "readOnly": true + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-PAClaim.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-PAClaim.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-PAClaim.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-PAClaim.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneAttending.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneAttending.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneAttending.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneAttending.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneOperating.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneOperating.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneOperating.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneOperating.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneOrganization-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneOrganization-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneOrganization-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneOrganization-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneOrganization.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneOrganization.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOneOrganization.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOneOrganization.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOnePatient.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/resources/StructureDefinition-RouteOnePatient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/resources/StructureDefinition-RouteOnePatient.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/NotReportableCarePlan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/NotReportableCarePlan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/NotReportableCarePlan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/NotReportableCarePlan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/ReportableCarePlan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/ReportableCarePlan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/ReportableCarePlan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/ReportableCarePlan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/RuleFilters-1.0.0-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/RuleFilters-1.0.0-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/RuleFilters-1.0.0-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/RuleFilters-1.0.0-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/tests-NotReportable-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/tests-NotReportable-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/tests-NotReportable-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/tests-NotReportable-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/tests-Reportable-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/tests-Reportable-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/rule-filters/tests-Reportable-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/rule-filters/tests-Reportable-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-demographics-qr.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-demographics-qr.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-demographics-qr.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-extract-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-extract-QRSharonDecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-extract-QRSharonDecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-extract-QRSharonDecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-extract-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-extract-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-extract-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Bundle-extract-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/CarePlan-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/CarePlan-generate-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/CarePlan-generate-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/CarePlan-generate-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Claim-OPA-Claim1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Claim-OPA-Claim1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Claim-OPA-Claim1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Claim-OPA-Claim1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Condition-OPA-Condition1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Condition-OPA-Condition1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Condition-OPA-Condition1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Condition-OPA-Condition1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Coverage-OPA-Coverage1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Coverage-OPA-Coverage1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Coverage-OPA-Coverage1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Coverage-OPA-Coverage1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Location-OPA-Location1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Location-OPA-Location1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Location-OPA-Location1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Location-OPA-Location1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Organization-OPA-PayorOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Organization-OPA-PayorOrganization1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Organization-OPA-PayorOrganization1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Organization-OPA-PayorOrganization1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Organization-OPA-ProviderOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Organization-OPA-ProviderOrganization1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Organization-OPA-ProviderOrganization1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Organization-OPA-ProviderOrganization1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Patient-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Patient-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Patient-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Patient-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/tests/Patient-patient-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Patient-patient-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/tests/Patient-patient-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Patient-patient-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Patient-sharondecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Patient-sharondecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Patient-sharondecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Patient-sharondecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Practitioner-OPA-AttendingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Practitioner-OPA-AttendingPhysician1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Practitioner-OPA-AttendingPhysician1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Practitioner-OPA-AttendingPhysician1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Practitioner-OPA-OperatingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Practitioner-OPA-OperatingPhysician1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Practitioner-OPA-OperatingPhysician1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Practitioner-OPA-OperatingPhysician1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Procedure-OPA-Procedure1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Procedure-OPA-Procedure1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Procedure-OPA-Procedure1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Procedure-OPA-Procedure1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Procedure-OPA-Procedure2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Procedure-OPA-Procedure2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/Procedure-OPA-Procedure2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Procedure-OPA-Procedure2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Questionnaire-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Questionnaire-RouteOnePatient.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/Questionnaire-RouteOnePatient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/Questionnaire-RouteOnePatient.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-NumericExtract.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-NumericExtract.json new file mode 100644 index 000000000..4e5177807 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-NumericExtract.json @@ -0,0 +1,52 @@ +{ + "resourceType": "QuestionnaireResponse", + "id": "NumericExtract", + "meta": { + "versionId": "1", + "lastUpdated": "2024-06-17T14:46:20.415+00:00", + "source": "#fQ4sBFboob3nlUiT", + "profile": [ + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse|3.0" + ], + "tag": [ + { + "code": "lformsVersion: 36.1.3" + } + ] + }, + "questionnaire": { + "reference": "http://gefyra.de/fhir/Questionnaire/NumericExtract" + }, + "status": "completed", + "subject": { + "reference": "Patient/360", + "display": "Simone Heckmann" + }, + "authored": "2024-06-17T14:46:03.324Z", + "item": [ + { + "linkId": "0", + "text": "Persönliche Angaben", + "item": [ + { + "linkId": "baseDataDecimalHeight", + "text": "Größe (in cm):", + "answer": [ + { + "valueInteger": 123 + } + ] + }, + { + "linkId": "baseDataDecimalWeight", + "text": "Gewicht (in kg):", + "answer": [ + { + "valueDecimal": 23.5 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json similarity index 50% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json index 959d678a4..79777e40f 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json @@ -5,6 +5,11 @@ { "resourceType": "Questionnaire", "id": "OutpatientPriorAuthorizationRequest", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" + ] + }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/cqif-library", @@ -17,17 +22,7 @@ "name": "OutpatientPriorAuthorizationRequest", "title": "Outpatient Prior Authorization Request", "status": "active", - "subjectType": [ - "Patient", - "Organization", - "Claim" - ], "date": "2022-01-04T00:00:00+00:00", - "contact": [ - { - "name": "Palmetto GBA" - } - ], "description": "Testing the form", "jurisdiction": [ { @@ -39,6 +34,16 @@ ] } ], + "contact": [ + { + "name": "Palmetto GBA" + } + ], + "subjectType": [ + "Patient", + "Organization", + "Claim" + ], "item": [ { "linkId": "1", @@ -48,8 +53,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.FacilityName" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "FacilityName" } ], "linkId": "1.1", @@ -60,8 +69,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.FacilityNPI" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "FacilityNPI" } ], "linkId": "1.2", @@ -79,29 +92,7 @@ "linkId": "1.4", "text": "Contract/Region", "type": "choice", - "required": false, - "answerOption": [ - { - "id": "FacilityContractRegion-11501", - "valueCoding": { - "code": "11001", - "display": "Part A South Carolina" - } - }, - { - "id": "FacilityContractRegion-11003", - "valueCoding": { - "code": "11501", - "display": "Part A North Carolina" - } - }, - { - "valueCoding": { - "code": "11003", - "display": "Part A Virginia/West Virginia" - } - } - ] + "required": false } ] }, @@ -113,8 +104,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryFirstName" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "BeneficiaryFirstName" } ], "linkId": "2.1", @@ -125,8 +120,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryLastName" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "BeneficiaryLastName" } ], "linkId": "2.2", @@ -137,8 +136,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryDOB" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "BeneficiaryDOB" } ], "linkId": "2.3", @@ -149,8 +152,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryMedicareID" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "BeneficiaryMedicareID" } ], "linkId": "2.4", @@ -161,45 +168,18 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.BeneficiaryGender" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "BeneficiaryGender" } ], "linkId": "2.5", "text": "Gender", "type": "choice", - "required": true, - "answerOption": [ - { - "id": "unknown", - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "male", - "display": "Male" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "female", - "display": "Female" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "other", - "display": "Other" - } - }, - { - "valueCoding": { - "system": "http://hl7.org/fhir/ValueSet/administrative-gender", - "code": "unknown", - "display": "Unknown" - } - } - ] + "required": true } ] }, @@ -211,8 +191,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianFirstName" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianFirstName" } ], "linkId": "3.1", @@ -223,8 +207,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianLastName" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianLastName" } ], "linkId": "3.2", @@ -235,8 +223,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianNPI" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianNPI" } ], "linkId": "3.3", @@ -259,8 +251,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddress1" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianAddress1" } ], "linkId": "3.5.1", @@ -271,8 +267,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddress2" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianAddress2" } ], "linkId": "3.5.2", @@ -283,8 +283,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddressCity" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianAddressCity" } ], "linkId": "3.5.3", @@ -295,8 +299,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddressState" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianAddressState" } ], "linkId": "3.5.4", @@ -307,8 +315,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.OperatingPhysicianAddressZip" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "OperatingPhysicianAddressZip" } ], "linkId": "3.5.5", @@ -328,8 +340,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianSame" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianSame" } ], "linkId": "4.1", @@ -344,7 +360,6 @@ "enableWhen": [ { "question": "4.1", - "operator": "=", "answerBoolean": false } ], @@ -352,8 +367,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianFirstName" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianFirstName" } ], "linkId": "4.2.1", @@ -364,8 +383,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianLastName" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianLastName" } ], "linkId": "4.2.2", @@ -376,8 +399,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianNPI" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianNPI" } ], "linkId": "4.2.3", @@ -400,8 +427,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddress1" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianAddress1" } ], "linkId": "4.2.5.1", @@ -412,8 +443,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddress2" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianAddress2" } ], "linkId": "4.2.5.2", @@ -424,8 +459,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddressCity" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianAddressCity" } ], "linkId": "4.2.5.3", @@ -436,8 +475,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddressState" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianAddressState" } ], "linkId": "4.2.5.4", @@ -448,8 +491,12 @@ { "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqif-cqlExpression", - "valueString": "OutpatientPriorAuthorizationPrepopulation.AttendingPhysicianAddressZip" + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression-language", + "valueString": "text/cql.identifier" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", + "valueString": "AttendingPhysicianAddressZip" } ], "linkId": "4.2.5.5", @@ -466,16 +513,8 @@ ] } ], - "extension": [ - { - "url": "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaireresponse-questionnaire", - "valueReference": { - "reference": "#OutpatientPriorAuthorizationRequest" - } - } - ], "questionnaire": { - "reference": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest" + "reference": "#OutpatientPriorAuthorizationRequest" }, "status": "in-progress", "subject": { @@ -487,38 +526,12 @@ "text": "Facility Information", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "1.1", - "text": "Name", - "answer": [ - { - "valueString": "Acme Clinic" - } - ] + "text": "Name" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "1.2", - "text": "NPI", - "answer": [ - { - "valueString": "1407071236" - } - ] + "text": "NPI" }, { "linkId": "1.3", @@ -535,89 +548,24 @@ "text": "Beneficiary Information", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.1", - "text": "First Name", - "answer": [ - { - "valueString": "Peter" - } - ] + "text": "First Name" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.2", - "text": "Last Name", - "answer": [ - { - "valueString": "Chalmers" - } - ] + "text": "Last Name" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.3", - "text": "Date of Birth", - "answer": [ - { - "valueDate": "1974-12-25" - } - ] + "text": "Date of Birth" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.4", - "text": "Medicare ID", - "answer": [ - { - "valueString": "525697298M" - } - ] + "text": "Medicare ID" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.5", - "text": "Gender", - "answer": [ - { - "valueString": "male" - } - ] + "text": "Gender" } ] }, @@ -626,55 +574,16 @@ "text": "Operating Physician Information", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "3.1", - "text": "First Name", - "answer": [ - { - "valueString": "Fielding" - } - ] + "text": "First Name" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "3.2", - "text": "Last Name", - "answer": [ - { - "valueString": "Kathy" - } - ] + "text": "Last Name" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "3.3", - "text": "NPI", - "answer": [ - { - "valueString": "1245319599" - } - ] + "text": "NPI" }, { "linkId": "3.4", @@ -685,76 +594,24 @@ "text": "Address", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "3.5.1", - "text": "Address1", - "answer": [ - { - "valueString": "1080 FIRST COLONIAL RD" - } - ] + "text": "Address1" }, { "linkId": "3.5.2", "text": "Address2" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "3.5.3", - "text": "City", - "answer": [ - { - "valueString": "Virginia Beach" - } - ] + "text": "City" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "3.5.4", - "text": "State", - "answer": [ - { - "valueString": "VA" - } - ] + "text": "State" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "3.5.5", - "text": "Zip", - "answer": [ - { - "valueString": "21454-2406" - } - ] + "text": "Zip" } ] } @@ -765,76 +622,24 @@ "text": "Attending Physician Information", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.1", - "text": "Same as Operating Physician?", - "answer": [ - { - "valueBoolean": false - } - ] + "text": "Same as Operating Physician?" }, { "linkId": "4.2", "text": "Attending Physician", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.2.1", - "text": "First Name", - "answer": [ - { - "valueString": "Ronald" - } - ] + "text": "First Name" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.2.2", - "text": "Last Name", - "answer": [ - { - "valueString": "Bone" - } - ] + "text": "Last Name" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.2.3", - "text": "NPI", - "answer": [ - { - "valueString": "9941339108" - } - ] + "text": "NPI" }, { "linkId": "4.2.4", @@ -845,76 +650,24 @@ "text": "Address", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.2.5.1", - "text": "Address1", - "answer": [ - { - "valueString": "1003 Healthcare Drive" - } - ] + "text": "Address1" }, { "linkId": "4.2.5.2", "text": "Address2" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.2.5.3", - "text": "City", - "answer": [ - { - "valueString": "Amherst" - } - ] + "text": "City" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.2.5.4", - "text": "State", - "answer": [ - { - "valueString": "MA" - } - ] + "text": "State" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "4.2.5.5", - "text": "Zip", - "answer": [ - { - "valueString": "01002" - } - ] + "text": "Zip" } ] } diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-QRSharonDecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-QRSharonDecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-QRSharonDecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-demographics-qr.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-demographics-qr.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-demographics-qr.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/QuestionnaireResponse-invalid-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-invalid-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/dstu3/tests/QuestionnaireResponse-invalid-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-invalid-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-mypain-no-url.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-mypain-no-url.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-mypain-no-url.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-mypain-no-url.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/ReferralRequest-OPA-ReferralRequest1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/ReferralRequest-OPA-ReferralRequest1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/tests/ReferralRequest-OPA-ReferralRequest1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/tests/ReferralRequest-OPA-ReferralRequest1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/vocabulary/CodeSystem-careplan-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/vocabulary/CodeSystem/CodeSystem-careplan-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/vocabulary/CodeSystem-careplan-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/vocabulary/ValueSet/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/vocabulary/ValueSet-AdministrativeGender.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/vocabulary/ValueSet/ValueSet-AdministrativeGender.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/vocabulary/ValueSet-AdministrativeGender.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/vocabulary/ValueSet/ValueSet-birthsex.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/vocabulary/ValueSet-birthsex.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/dstu3/vocabulary/ValueSet/ValueSet-birthsex.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/dstu3/vocabulary/ValueSet-birthsex.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/content-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/content-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/content-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/content-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCBaseConcepts.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCBaseConcepts.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCBaseConcepts.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCBaseConcepts.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCConcepts.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCConcepts.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCConcepts.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCConcepts.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCConfig.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCConfig.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCConfig.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCConfig.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCContactDataElements.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCContactDataElements.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCContactDataElements.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCContactDataElements.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCDT17.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCDT17.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCDT17.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCDT17.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCDataElements.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCDataElements.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/ANCDataElements.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/ANCDataElements.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/FHIRCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/FHIRCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/FHIRCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/FHIRCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/WHOCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/WHOCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/cql/WHOCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/cql/WHOCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/data-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/data-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/data-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/data-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/output-careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/output-careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/output-careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/output-careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCBaseConcepts.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCBaseConcepts.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCBaseConcepts.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCBaseConcepts.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCConcepts.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCConcepts.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCConcepts.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCConcepts.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCConfig.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCConfig.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCConfig.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCConfig.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCContactDataElements.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCContactDataElements.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCContactDataElements.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCContactDataElements.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCDT17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCDT17.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCDT17.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCDT17.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCDataElements.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCDataElements.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-ANCDataElements.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-ANCDataElements.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-FHIRCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-FHIRCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-FHIRCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-FHIRCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-WHOCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-WHOCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/Library-WHOCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/Library-WHOCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/PlanDefinition-ANCDT17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/PlanDefinition-ANCDT17.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/resources/PlanDefinition-ANCDT17.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/resources/PlanDefinition-ANCDT17.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/terminology-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/terminology-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/terminology-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/terminology-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Bundle-ANCDT17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Bundle-ANCDT17.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Bundle-ANCDT17.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Bundle-ANCDT17.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/CarePlan-ANCDT17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/CarePlan-ANCDT17.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/CarePlan-ANCDT17.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/CarePlan-ANCDT17.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Encounter-helloworld-patient-1-encounter-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Encounter-helloworld-patient-1-encounter-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Encounter-helloworld-patient-1-encounter-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Encounter-helloworld-patient-1-encounter-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b8-de17-example.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b8-de17-example.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b8-de17-example.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b8-de17-example.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b8-de20-example.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b8-de20-example.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b8-de20-example.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b8-de20-example.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b8-de27-example.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b8-de27-example.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b8-de27-example.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b8-de27-example.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b9-de144-example.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b9-de144-example.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Observation-anc-b9-de144-example.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Observation-anc-b9-de144-example.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Patient-5946f880-b197-400b-9caa-a3c661d23041.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Patient-5946f880-b197-400b-9caa-a3c661d23041.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/tests/Patient-5946f880-b197-400b-9caa-a3c661d23041.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/tests/Patient-5946f880-b197-400b-9caa-a3c661d23041.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b6-de83.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b6-de83.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b6-de83.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b6-de83.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de17.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de17.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de17.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de19.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de19.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de19.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de19.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de20.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de20.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de20.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de20.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de21.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de21.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de21.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de21.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de27.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de27.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de27.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de27.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de28.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de28.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de28.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de28.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de29.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de29.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b8-de29.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b8-de29.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de144.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de144.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de144.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de144.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de145.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de145.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de145.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de145.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de146.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de146.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de146.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de146.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de147.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de147.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de147.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de147.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de148.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de148.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de148.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de148.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de149.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de149.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-dak/vocabulary/ValueSet-anc-b9-de149.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-dak/vocabulary/ValueSet-anc-b9-de149.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_patient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_patient.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_patient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_patient.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_plan_definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_plan_definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/anc-visit/anc_visit_plan_definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/anc-visit/anc_visit_plan_definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_patient_data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_patient_data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_patient_data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_patient_data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_plan_definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_plan_definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_plan_definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cds-hooks-multiple-actions/cds_hooks_multiple_actions_plan_definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_careplan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_careplan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_careplan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_careplan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_patient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_patient.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_patient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_patient.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_plan_definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_plan_definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/child-routine-visit/child_routine_visit_plan_definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/child-routine-visit/child_routine_visit_plan_definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/cql/ASLPCrd.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/ASLPCrd.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/cql/ASLPCrd.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/ASLPCrd.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/BadLibrary.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/BadLibrary.cql new file mode 100644 index 000000000..a69591b96 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/BadLibrary.cql @@ -0,0 +1,9 @@ +library BadLibrary version '1.0.0' + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +context Patient + +define badExpression \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/CHF.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/CHF.cql new file mode 100644 index 000000000..4ae670584 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/CHF.cql @@ -0,0 +1,168 @@ +library CHF version '1.0.0' + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +codesystem "SNOMED-CT": 'http://snomed.info/sct' +codesystem "LOINC": 'http://loinc.org' +codesystem "CHFCodes": 'http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes' +codesystem "Condition Clinical Status Code": 'http://terminology.hl7.org/CodeSystem/condition-clinical' +codesystem "Condition Verification Status Code": 'http://terminology.hl7.org/CodeSystem/condition-ver-status' + +code "Congestive heart failure": '42343007' from "SNOMED-CT" + +code "Body weight": '29463-7' from "LOINC" +code "Body weight change": 'body-weight-change' from "CHFCodes" +code "Urine output": '9192-6' from "LOINC" +code "Net intake/output": 'net-intake-output' from "CHFCodes" +code "Jugular venous pressure": 'jvp' from "CHFCodes" +code "Oxygen saturation": '2708-6' from "LOINC" +code "Potassium goal": '86919-8' from "LOINC" display 'Potassium goal [Moles/volume] Serum or Plasma' // meq/L +code "Creatinine in serum": '39802-4' from "LOINC" display 'Creatinine in dialysis fluid/Creatinine in serum or plasma' // NOTE: example shows mg/dL, but no LOINC code has those units? +code "eGFR result": 'egfr' from "CHFCodes" // NOTE: Too many to pick from, needs clinical/terminological SME input, in mol/mm/m2 + +code "Active condition": 'active' from "Condition Clinical Status Code" +code "Provisional condition": 'provisional' from "Condition Verification Status Code" +code "Confirmed condition": 'confirmed' from "Condition Verification Status Code" + +parameter Encounter Encounter + +context Patient + +// Case Features +define "Body Weight": + [Observation: "Body weight"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "Body Weight Change Assertion": + [Observation: "Body weight change"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "Body Weight Change": + "Daily Body Weight Change" WC + return Observation { + id: id { value: Encounter.id + '-bodyweight-change' + ToString(WC.date) }, + extension: { + Extension { + url: url { value: 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-instantiatesCaseFeature' }, + value: canonical { value: 'http://hl7.org/fhir/uv/cpg/StructureDefinition/chf-bodyweight-change' } + }, + Extension { + url: url { value: 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-caseFeatureType' }, + value: code { value: 'asserted' } + } + }, + status: ObservationStatus { value: 'final' }, + code: CodeableConcept { + coding: { + Coding { + system: uri { value: 'http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes' }, + code: code { value: 'body-weight-change' } + } + } + }, + effective: dateTime { value: WC.date }, + issued: instant { value: Now() }, + subject: referenceTo(Patient), + encounter: referenceTo(Encounter), + value: Quantity { + value: decimal { value: WC.change.value }, + unit: string { value: WC.change.unit }, + system: uri { value: 'http://unitsofmeasure.org' }, + code: code { value: WC.change.unit } + } + } + +define "Daily Body Weight": + (expand Encounter.period per day) Date + let maxWeight: Max("Body Weight" WT where WT.issued same day as Date return WT.value as FHIR.Quantity) + return { date: Date, weight: maxWeight } + +define "Daily Body Weight Change": + "Daily Body Weight" WT + let priorWeight: First("Daily Body Weight" PWT where PWT.date < WT.date sort by date descending).weight + return { date: WT.date, weight: WT.weight, priorWeight: priorWeight, change: WT.weight - priorWeight} + +define "Current Body Weight": + First("Body Weight" WT where WT.issued same day as Today() sort by issued descending) + +define "Previous Body Weight": + First("Body Weight" WT where WT.issued 1 day before day of Today() sort by issued descending) + +define "Current Body Weight Change": + "Current Body Weight".value - "Previous Body Weight".value + +define "Urine Output": + [Observation: "Urine output"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "Current Urine Output": + First("Urine Output" UO where UO.issued same day as Today() sort by issued descending) + +define "Net Intake/Output": + [Observation: "Net intake/output"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "Current Net Intake/Output": + First("Net Intake/Output" IO where IO.issued same day as Today() sort by issued descending) + +define "Jugular Venous Pressure": + [Observation: "Jugular venous pressure"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "Oxygen Saturation": + [Observation: "Oxygen saturation"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "Potassium": + [Observation: "Potassium goal"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "Creatinine": + [Observation: "Creatinine in serum"] O + where O.status = 'final' + and references(O.encounter, Encounter) + +define "eGFR": + [Observation: "eGFR result"] O + where O.status = 'final' + and references(O.encounter, Encounter) + + +// Eligibility Criteria +define "Eligibility Criteria": + [Condition] C + where C.code ~ "Congestive heart failure" + and C.clinicalStatus ~ "Active condition" + and C.verificationStatus ~ "Confirmed condition" + +// TODO: Handle contained references +// TODO: Handle bundle references +// TODO: Handle remote references +define function references(reference Reference, encounter Encounter): + EndsWith(reference.reference, '/' + encounter.id) + +define function referenceTo(encounter Encounter): + Reference { reference: string { value: 'Encounter/' + encounter.id } } + +define function referenceTo(patient Patient): + Reference { reference: string { value: 'Patient/' + patient.id } } + + +// Initial Expressions +define "Body Weight Change.status": + "Body Weight".status + +define "Body Weight Change.valueQuantity.value": + "Body Weight".value.value + +define "Body Weight Change.valueQuantity.unit": + "Body Weight".value.unit \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/FHIRHelpers.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/FHIRHelpers.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/FHIRHelpers.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/HelloWorld.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/HelloWorld.cql similarity index 90% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/HelloWorld.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/HelloWorld.cql index 08a64478d..aa1acf9c0 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/HelloWorld.cql +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/HelloWorld.cql @@ -2,7 +2,7 @@ library HelloWorld version '1.0.0' using FHIR version '4.0.1' -/* include FHIRHelpers version '4.0.1'*/ +include FHIRHelpers version '4.0.1' context Patient diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/LaunchContexts.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/LaunchContexts.cql new file mode 100644 index 000000000..6e5967f27 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/LaunchContexts.cql @@ -0,0 +1,13 @@ +library LaunchContexts version '1.0.0' + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +parameter Encounter Encounter +parameter Practitioner Practitioner +parameter Location Location +parameter Study ResearchStudy + +context Patient + diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/LibraryObservation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/LibraryObservation.cql new file mode 100644 index 000000000..eefc4c319 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/LibraryObservation.cql @@ -0,0 +1,14 @@ +library LibraryObservation version '1.0.0' + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' + +codesystem "SNOMED-CT": 'http://snomed.info/sct' + +code "Height": '1153637007' from "SNOMED-CT" display 'Body height' + +context Patient + +define PatientHeight: + [Observation: "Height"] O \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql similarity index 91% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql index 288905887..6956d7a44 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/OutpatientPriorAuthorizationPrepopulation.cql @@ -2,7 +2,7 @@ library OutpatientPriorAuthorizationPrepopulation version '1.0.0' using FHIR version '4.0.1' -include FHIRHelpers version '4.0.001' called FHIRHelpers +include FHIRHelpers version '4.0.1' called FHIRHelpers // include FHIRCommon version '4.0.1' called FHIRCommon // include FHIRHelpers version '4.0.1' called FHIRHelpers @@ -26,14 +26,23 @@ define ClaimResource: where C.id = ClaimId ) +define "ClaimResource.id": + ClaimResource.id + define OrganizationFacility: First([Organization] O where EndsWith(ClaimResource.provider.reference, O.id) ) +define "OrganizationFacility.name": + FacilityName + define "FacilityName": OrganizationFacility.name.value +define "OrganizationFacility.FacilityNPI.value": + FacilityNPI + define "FacilityNPI": ( OrganizationFacility.identifier I where I.system = 'http://hl7.org.fhir/sid/us-npi' @@ -97,18 +106,18 @@ define "BeneficiaryDOB": define "BeneficiaryGender": Patient.gender.value -define RequestCoverage: - ClaimResource.insurance +// define RequestCoverage: +// ClaimResource.insurance -define CoverageResource: - First([Coverage] coverage - // pull coverage resource id from the service request insurance extension +// define CoverageResource: +// First([Coverage] coverage +// // pull coverage resource id from the service request insurance extension - where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) - ) +// where EndsWith(RequestCoverage[0].coverage.reference, coverage.id) +// ) -define "BeneficiaryMedicareID": - CoverageResource.subscriberId.value +// define "BeneficiaryMedicareID": +// CoverageResource.subscriberId.value // OPERATING PHYSICIAN INFO diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/RouteOneOrganization.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/RouteOneOrganization.cql new file mode 100644 index 000000000..767be2d8a --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/RouteOneOrganization.cql @@ -0,0 +1,23 @@ +library RouteOneOrganization version '1.0.0' + +using FHIR version '4.0.1' + +include FHIRHelpers version '4.0.1' called FHIRHelpers +include "OutpatientPriorAuthorizationPrepopulation" called "OutpatientPriorAuthorizationPrepopulation" + +parameter ClaimId String default 'OPA-Claim1' + +context Patient + +define "RouteOneOrganization.name": + OutpatientPriorAuthorizationPrepopulation.OrganizationFacility.name + +define "RouteOneOrganization.FacilityNPI.value": + (OutpatientPriorAuthorizationPrepopulation.OrganizationFacility.identifier X + where X.system = 'http://npi.org' + ).value.value + +define "RouteOneOrganization.FacilityPTAN.value": + (OutpatientPriorAuthorizationPrepopulation.OrganizationFacility.identifier X + where X.system = 'http://ptan.org' + ).value.value diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/cql/TestActivityDefinition.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/TestActivityDefinition.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/cql/TestActivityDefinition.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/cql/TestActivityDefinition.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Bundle-opioidcds-10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Bundle-opioidcds-10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Bundle-opioidcds-10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Bundle-opioidcds-10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/CarePlan-opioidcds-10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/CarePlan-opioidcds-10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/CarePlan-opioidcds-10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/CarePlan-opioidcds-10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/CodeSystem-careplan-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/vocabulary/CodeSystem/CodeSystem-careplan-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/CodeSystem-careplan-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-benzodiazepine-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-benzodiazepine-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-benzodiazepine-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-benzodiazepine-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-buprenorphine-and-methadone-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-buprenorphine-and-methadone-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-buprenorphine-and-methadone-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-buprenorphine-and-methadone-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cdc-malignant-cancer-conditions.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cdc-malignant-cancer-conditions.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cdc-malignant-cancer-conditions.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cdc-malignant-cancer-conditions.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cocaine-urine-drug-screening-tests.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cocaine-urine-drug-screening-tests.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cocaine-urine-drug-screening-tests.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-cocaine-urine-drug-screening-tests.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-clinical-status-active.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-clinical-status-active.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-clinical-status-active.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-clinical-status-active.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-encounter-diagnosis-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-encounter-diagnosis-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-encounter-diagnosis-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-encounter-diagnosis-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-problem-list-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-problem-list-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-problem-list-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-problem-list-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-us-core-health-concern-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-us-core-health-concern-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-us-core-health-concern-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-condition-us-core-health-concern-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-documenting-substance-misuse.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-documenting-substance-misuse.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-documenting-substance-misuse.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-documenting-substance-misuse.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-disposition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-disposition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-disposition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-disposition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-finding.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-finding.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-finding.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-finding.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-hospice-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-limited-life-expectancy-conditions.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-limited-life-expectancy-conditions.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-limited-life-expectancy-conditions.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-limited-life-expectancy-conditions.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-category-community.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-category-community.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-category-community.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-category-community.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-status-active.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-status-active.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-status-active.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-medicationrequest-status-active.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-naloxone-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-naloxone-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-naloxone-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-naloxone-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-opioid-drug-urine-screening.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-opioid-drug-urine-screening.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-opioid-drug-urine-screening.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-opioid-drug-urine-screening.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-synthetic-opioid-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-synthetic-opioid-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-synthetic-opioid-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-non-synthetic-opioid-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-laboratory.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-laboratory.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-laboratory.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-laboratory.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-observation-category-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-office-visit.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-office-visit.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-office-visit.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-office-visit.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-oncology-specialty-designations.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-oncology-specialty-designations.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-oncology-specialty-designations.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-oncology-specialty-designations.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-counseling-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-counseling-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-counseling-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-counseling-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-drug-urine-screening.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-drug-urine-screening.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-drug-urine-screening.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-drug-urine-screening.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-assessment-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-assessment-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-assessment-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-assessment-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-disorders.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-disorders.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-disorders.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-opioid-misuse-disorders.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-management-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-management-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-management-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-management-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-treatment-plan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-treatment-plan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-treatment-plan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pain-treatment-plan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-data-reviewed-finding.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-data-reviewed-finding.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-data-reviewed-finding.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-data-reviewed-finding.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-review-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-review-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-review-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-pdmp-review-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-phencyclidine-urine-drug-screening-tests.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-phencyclidine-urine-drug-screening-tests.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-phencyclidine-urine-drug-screening-tests.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-phencyclidine-urine-drug-screening-tests.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-sickle-cell-diseases.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-sickle-cell-diseases.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-sickle-cell-diseases.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-sickle-cell-diseases.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-substance-misuse-behavioral-counseling.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-substance-misuse-behavioral-counseling.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-substance-misuse-behavioral-counseling.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-substance-misuse-behavioral-counseling.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-therapies-indicating-end-of-life-care.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-therapies-indicating-end-of-life-care.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-therapies-indicating-end-of-life-care.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/opioid-Rec10-patient-view/vocabulary/ValueSet-therapies-indicating-end-of-life-care.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/ASLPConcepts.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/ASLPConcepts.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/ASLPConcepts.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/ASLPConcepts.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/ASLPDataElements.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/ASLPDataElements.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/ASLPDataElements.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/ASLPDataElements.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/Common.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/Common.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/Common.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/Common.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/FHIRCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/FHIRCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/FHIRCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/FHIRCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/FHIRHelpers.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/FHIRHelpers.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/FHIRHelpers.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/QICoreCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/QICoreCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/QICoreCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/QICoreCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/SDHCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/SDHCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/cql/SDHCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/cql/SDHCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-ASLPConcepts.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-ASLPConcepts.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-ASLPConcepts.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-ASLPConcepts.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-ASLPDataElements.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-ASLPDataElements.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-ASLPDataElements.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-ASLPDataElements.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-Common.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-Common.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-Common.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-Common.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-FHIRCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-FHIRCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-FHIRCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-FHIRCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-FHIRHelpers.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-FHIRHelpers.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-FHIRHelpers.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-QICoreCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-QICoreCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-QICoreCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-QICoreCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-SDHCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-SDHCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Library-SDHCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Library-SDHCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/PlanDefinition-ASLPA1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/PlanDefinition-ASLPA1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/PlanDefinition-ASLPA1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/PlanDefinition-ASLPA1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Questionnaire-ASLPA1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Questionnaire-ASLPA1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/Questionnaire-ASLPA1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/Questionnaire-ASLPA1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-bmi.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-bmi.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-bmi.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-bmi.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-height.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-height.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-height.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-height.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-weight.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-weight.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/resources/StructureDefinition-aslp-weight.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/resources/StructureDefinition-aslp-weight.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Condition-Diabetes.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Condition-Diabetes.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Condition-Diabetes.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Condition-Diabetes.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Condition-Hypertension.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Condition-Hypertension.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Condition-Hypertension.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Condition-Hypertension.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Condition-SleepApnea.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Condition-SleepApnea.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Condition-SleepApnea.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Condition-SleepApnea.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Coverage-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Coverage-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Coverage-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Coverage-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-BMI.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-BMI.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-BMI.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-BMI.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-BloodPressure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-BloodPressure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-BloodPressure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-BloodPressure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Glucose.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Glucose.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Glucose.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Glucose.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Height.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Height.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Height.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Height.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Neck.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Neck.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Neck.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Neck.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Weight.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Weight.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Observation-Weight.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Observation-Weight.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Patient-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Patient-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Patient-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Patient-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Practitioner-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Practitioner-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Practitioner-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Practitioner-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Questionnaire-ASLPA1-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Questionnaire-ASLPA1-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/Questionnaire-ASLPA1-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/Questionnaire-ASLPA1-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/ServiceRequest-SleepStudy.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/ServiceRequest-SleepStudy.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/ServiceRequest-SleepStudy.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/ServiceRequest-SleepStudy.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/ServiceRequest-SleepStudy2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/ServiceRequest-SleepStudy2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/tests/ServiceRequest-SleepStudy2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/tests/ServiceRequest-SleepStudy2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-active-condition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-active-condition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-active-condition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-active-condition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-ASLPCrd.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-ASLPCrd.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-ASLPCrd.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-ASLPCrd.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-GenerateReportActivity.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-GenerateReportActivity.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-GenerateReportActivity.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-GenerateReportActivity.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-RecommendImmunizationActivity.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-RecommendImmunizationActivity.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-RecommendImmunizationActivity.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-RecommendImmunizationActivity.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/ActivityDefinition-SendMessageActivity.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-SendMessageActivity.json similarity index 68% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/ActivityDefinition-SendMessageActivity.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-SendMessageActivity.json index a1a4c3394..9a2cc7dc2 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/ActivityDefinition-SendMessageActivity.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-SendMessageActivity.json @@ -6,9 +6,6 @@ "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-communicationactivity" ] }, - "kind": "CommunicationRequest", - "profile": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-communicationrequest", - "intent": "proposal", "extension": [ { "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", @@ -20,32 +17,56 @@ } ], "url": "http://example.org/ActivityDefinition/SendMessageActivity", + "version": "0.1.0", "name": "SendMessageActivity", "title": "ActivityDefinition SendMessageActivity", "status": "draft", "experimental": true, - "publisher": "Example", + "date": "2024-01-30T10:32:32-07:00", + "publisher": "Example Publisher", + "contact": [ + { + "name": "Example Publisher", + "telecom": [ + { + "system": "url", + "value": "http://example.org/example-publisher" + } + ] + } + ], + "description": "Example Activity Definition for a recommendation to send a message", "jurisdiction": [ { "coding": [ { - "code": "001", "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", + "code": "001", "display": "World" } ] } ], - "version": "0.1.0", - "description": "Example Activity Definition for a recommendation to send a message", + "kind": "CommunicationRequest", + "profile": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-communicationrequest", "code": { "coding": [ { - "code": "send-message", "system": "http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-activity-type", + "code": "send-message", "display": "Send a message" } ] }, - "doNotPerform": false + "intent": "proposal", + "doNotPerform": false, + "dynamicValue": [ + { + "path": "payload[0].contentString", + "expression": { + "language": "text/fhirpath", + "expression": "'Greeting: Hello! ' + %subject.name.given.first() + ' Message: ' + %context.description + ' ' + %context.kind + ' Practitioner: ' + %practitioner.name.given.first()" + } + } + ] } \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-activityDefinition-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-activityDefinition-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-activityDefinition-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-activityDefinition-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-appointment-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-appointment-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-appointment-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-appointment-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-appointmentresponse-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-appointmentresponse-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-appointmentresponse-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-appointmentresponse-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-careplan-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-careplan-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-careplan-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-careplan-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-claim-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-claim-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-claim-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-claim-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-communication-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-communication-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-communication-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-communication-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-communicationrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-communicationrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-communicationrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-communicationrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/ActivityDefinition-complete-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-complete-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/ActivityDefinition-complete-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-complete-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-contract-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-contract-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-contract-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-contract-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-custom-activity-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-custom-activity-test.json similarity index 75% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-custom-activity-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-custom-activity-test.json index 2c9bcccbc..c811ef768 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-custom-activity-test.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-custom-activity-test.json @@ -1,6 +1,6 @@ { "resourceType": "ActivityDefinition", - "id": "unsupported-test", + "id": "custom-activity-test", "extension": [ { "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-custom-activity-kind", @@ -10,6 +10,5 @@ "name": "Unsupported_Test", "title": "CreateImpossibleTask", "status": "draft", - "description": "Create the impossible task.", - "kind": "NULL" + "description": "Create the impossible task." } \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-devicerequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-devicerequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-devicerequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-devicerequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-diagnosticreport-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-diagnosticreport-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-diagnosticreport-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-diagnosticreport-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-enrollmentrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-enrollmentrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-enrollmentrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-enrollmentrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-immunizationrecommendation-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-immunizationrecommendation-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-immunizationrecommendation-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-immunizationrecommendation-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-medicationrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-medicationrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-medicationrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-medicationrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-nutritionorder-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-nutritionorder-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-nutritionorder-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-nutritionorder-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-procedure-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-procedure-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-procedure-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-procedure-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-requestgroup-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-requestgroup-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-requestgroup-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-requestgroup-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-servicerequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-servicerequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-servicerequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-servicerequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-supplyrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-supplyrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-supplyrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-supplyrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-task-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-task-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-task-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-task-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-unsupported-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-unsupported-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-unsupported-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-unsupported-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-visionprescription-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-visionprescription-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/ActivityDefinition-visionprescription-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/ActivityDefinition-visionprescription-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/Library-ASLPCrd.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-ASLPCrd.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/Library-ASLPCrd.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-ASLPCrd.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-BadLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-BadLibrary.json new file mode 100644 index 000000000..5b810bce2 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-BadLibrary.json @@ -0,0 +1,36 @@ +{ + "resourceType": "Library", + "id": "BadLibrary", + "extension": [ + { + "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", + "valueReference": { + "reference": "Device/cqf-tooling" + } + } + ], + "url": "http://fhir.org/guides/cdc/opioid-cds/Library/BadLibrary", + "version": "1.0.0", + "name": "HelloWorld", + "relatedArtifact": [ + { + "type": "depends-on", + "display": "FHIR model information", + "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1" + } + ], + "dataRequirement": [ + { + "type": "Patient", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Patient" + ] + } + ], + "content": [ + { + "contentType": "text/cql", + "url": "../cql/BadLibrary.cql" + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-CHF.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-CHF.json new file mode 100644 index 000000000..9a3ce01a5 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-CHF.json @@ -0,0 +1,398 @@ +{ + "resourceType": "Library", + "id": "CHF", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "shareable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "computable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "publishable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeRepresentationLevel", + "valueCode": "structured" + } + ], + "url": "http://hl7.org/fhir/uv/cpg/Library/CHF", + "version": "2.0.0-draft", + "name": "CHF", + "status": "active", + "experimental": true, + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/library-type", + "code": "logic-library" + } + ] + }, + "date": "2024-08-25T03:33:21+00:00", + "publisher": "HL7 International / Clinical Decision Support", + "contact": [ + { + "name": "HL7 International / Clinical Decision Support", + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss" + } + ] + } + ], + "description": "Logic for an example congestive heart failure pathway", + "jurisdiction": [ + { + "coding": [ + { + "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", + "code": "001", + "display": "World" + } + ] + } + ], + "relatedArtifact": [ + { + "type": "depends-on", + "display": "Code System SNOMED-CT", + "resource": "http://snomed.info/sct" + }, + { + "type": "depends-on", + "display": "Code System LOINC", + "resource": "http://loinc.org" + }, + { + "type": "depends-on", + "display": "Code System CHFCodes", + "resource": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes" + }, + { + "type": "depends-on", + "display": "Code System Condition Clinical Status Code", + "resource": "http://terminology.hl7.org/CodeSystem/condition-clinical" + }, + { + "type": "depends-on", + "display": "Code System Condition Verification Status Code", + "resource": "http://terminology.hl7.org/CodeSystem/condition-ver-status" + } + ], + "parameter": [ + { + "name": "Encounter", + "use": "in", + "min": 0, + "max": "1", + "type": "Encounter" + }, + { + "name": "Patient", + "use": "out", + "min": 0, + "max": "1", + "type": "Patient" + }, + { + "name": "Body Weight", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Body Weight Change Assertion", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Daily Body Weight", + "use": "out", + "min": 0, + "max": "*", + "type": "Resource" + }, + { + "name": "Daily Body Weight Change", + "use": "out", + "min": 0, + "max": "*", + "type": "Resource" + }, + { + "name": "Body Weight Change", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Current Body Weight", + "use": "out", + "min": 0, + "max": "1", + "type": "Observation" + }, + { + "name": "Previous Body Weight", + "use": "out", + "min": 0, + "max": "1", + "type": "Observation" + }, + { + "name": "Current Body Weight Change", + "use": "out", + "min": 0, + "max": "1", + "type": "integer" + }, + { + "name": "Urine Output", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Current Urine Output", + "use": "out", + "min": 0, + "max": "1", + "type": "Observation" + }, + { + "name": "Net Intake/Output", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Current Net Intake/Output", + "use": "out", + "min": 0, + "max": "1", + "type": "Observation" + }, + { + "name": "Jugular Venous Pressure", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Oxygen Saturation", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Potassium", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Creatinine", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "eGFR", + "use": "out", + "min": 0, + "max": "*", + "type": "Observation" + }, + { + "name": "Eligibility Criteria", + "use": "out", + "min": 0, + "max": "*", + "type": "Condition" + } + ], + "dataRequirement": [ + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://loinc.org", + "code": "29463-7" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes", + "code": "body-weight-change" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://loinc.org", + "code": "9192-6" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes", + "code": "net-intake-output" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes", + "code": "jvp" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://loinc.org", + "code": "2708-6" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://loinc.org", + "code": "86919-8", + "display": "Potassium goal [Moles/volume] Serum or Plasma" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://loinc.org", + "code": "39802-4", + "display": "Creatinine in dialysis fluid/Creatinine in serum or plasma" + } + ] + } + ] + }, + { + "type": "Observation", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Observation" + ], + "codeFilter": [ + { + "path": "code", + "code": [ + { + "system": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes", + "code": "egfr" + } + ] + } + ] + }, + { + "type": "Condition", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/Condition" + ] + } + ], + "content": [ + { + "contentType": "text/cql", + "url": "../cql/CHF.cql" + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-FHIRHelpers.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Library-FHIRHelpers.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-FHIRHelpers.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Library-HelloWorld.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-HelloWorld.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Library-HelloWorld.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-HelloWorld.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-HelloWorld.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-LaunchContexts.json similarity index 58% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-HelloWorld.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-LaunchContexts.json index e46ad3e3f..8b01c6921 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Library-HelloWorld.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-LaunchContexts.json @@ -1,6 +1,6 @@ { "resourceType": "Library", - "id": "HelloWorld", + "id": "LaunchContexts", "extension": [ { "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", @@ -9,7 +9,7 @@ } } ], - "url": "http://fhir.org/guides/cdc/opioid-cds/Library/HelloWorld", + "url": "http://fhir.org/test/Library/LaunchContexts", "version": "1.0.0", "name": "HelloWorld", "relatedArtifact": [ @@ -21,60 +21,39 @@ ], "parameter": [ { - "name": "Patient", - "use": "out", - "min": 0, - "max": "1", - "type": "Patient" - }, - { - "name": "Info", - "use": "out", + "name": "Encounter", + "use": "in", "min": 0, "max": "1", - "type": "string" + "type": "Encounter" }, { - "name": "Warning", - "use": "out", + "name": "Practitioner", + "use": "in", "min": 0, "max": "1", - "type": "string" + "type": "Practitioner" }, { - "name": "Critical", - "use": "out", + "name": "Location", + "use": "in", "min": 0, "max": "1", - "type": "string" + "type": "Location" }, { - "name": "Main Action Condition Expression Is True", - "use": "out", + "name": "Study", + "use": "in", "min": 0, "max": "1", - "type": "boolean" + "type": "ResearchStudy" }, { - "name": "Get Title", - "use": "out", - "min": 0, - "max": "1", - "type": "string" - }, - { - "name": "Get Description", - "use": "out", - "min": 0, - "max": "1", - "type": "string" - }, - { - "name": "Get Indicator", + "name": "Patient", "use": "out", "min": 0, "max": "1", - "type": "string" + "type": "Patient" } ], "dataRequirement": [ diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-LibraryObservation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-LibraryObservation.json new file mode 100644 index 000000000..464f06e7a --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-LibraryObservation.json @@ -0,0 +1,22 @@ +{ + "resourceType": "Library", + "id": "LibraryObservation", + "url": "http://fhir.org/fhir/test/Library/LibraryObservation", + "version": "1.0.0", + "name": "LibraryObservation", + "title": "Library Observation", + "status": "draft", + "type": { + "coding": [ + { + "code": "logic-library" + } + ] + }, + "content": [ + { + "contentType": "text/cql", + "url": "../cql/LibraryObservation.cql" + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-OutpatientPriorAuthorizationPrepopulation.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/Library-TestActivityDefinition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-TestActivityDefinition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/resources/Library-TestActivityDefinition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Library-TestActivityDefinition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-DischargeInstructionsPlan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-DischargeInstructionsPlan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-DischargeInstructionsPlan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-DischargeInstructionsPlan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-generate-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-generate-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-generate-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-hello-world-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-hello-world-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-hello-world-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-hello-world-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-multi-action-activity.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-multi-action-activity.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-multi-action-activity.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-multi-action-activity.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-prepopulate-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-prepopulate-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-prepopulate-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-prepopulate-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-prepopulate.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-prepopulate.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-prepopulate.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-prepopulate.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-route-one-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-route-one-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-route-one-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-route-one-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-route-one.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-route-one.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-route-one.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-route-one.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-test-nested-error-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-test-nested-error-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-test-nested-error-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-test-nested-error-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-test-nested-error-2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-test-nested-error-2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-test-nested-error-2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-test-nested-error-2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-us-ecr-specification.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-us-ecr-specification.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/PlanDefinition-us-ecr-specification.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/PlanDefinition-us-ecr-specification.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-NumericExtract.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-NumericExtract.json new file mode 100644 index 000000000..acc7299b5 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-NumericExtract.json @@ -0,0 +1,88 @@ +{ + "resourceType": "Questionnaire", + "id": "NumericExtract", + "url": "http://gefyra.de/fhir/Questionnaire/NumericExtract", + "title": "Test case for numeric extraction using HAPI's $extract operation", + "status": "active", + "item": [ + { + "linkId": "0", + "text": "Persönliche Angaben", + "type": "group", + "required": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "cm", + "system": "http://unitsofmeasure.org", + "display": "Zentimeter" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", + "valueDuration": { + "value": 1, + "code": "a", + "system": "http://unitsofmeasure.org" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract", + "valueBoolean": true + } + ], + "linkId": "baseDataDecimalHeight", + "code": [ + { + "code": "1153637007", + "system": "http://snomed.info/sct", + "display": "Body height measure (observable entity)" + } + ], + "text": "Größe (in cm):", + "type": "integer", + "required": true, + "maxLength": 3 + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "kg", + "system": "http://unitsofmeasure.org", + "display": "Kilogramm" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", + "valueDuration": { + "value": 1, + "code": "a", + "system": "http://unitsofmeasure.org" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract", + "valueBoolean": true + } + ], + "linkId": "baseDataDecimalWeight", + "code": [ + { + "code": "27113001", + "system": "http://snomed.info/sct", + "display": "Body weight (observable entity)" + } + ], + "text": "Gewicht (in kg):", + "type": "decimal", + "required": true + } + ] + } + ] +} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json similarity index 95% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json index f885604a6..540c119d6 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json @@ -43,6 +43,12 @@ ], "item": [ { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Organization" + } + ], "linkId": "1", "text": "Facility Information", "type": "group", @@ -114,6 +120,12 @@ ] }, { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Patient" + } + ], "linkId": "2", "text": "Beneficiary Information", "type": "group", @@ -227,6 +239,12 @@ ] }, { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Practitioner" + } + ], "linkId": "3", "text": "Operating Physician Information", "type": "group", @@ -368,6 +386,12 @@ ] }, { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Practitioner" + } + ], "linkId": "4", "text": "Attending Physician Information", "type": "group", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-definition.json new file mode 100644 index 000000000..838db24a8 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-definition.json @@ -0,0 +1,80 @@ +{ + "resourceType": "Questionnaire", + "id": "definition", + "meta": { + "versionId": "2", + "lastUpdated": "2022-11-21T17:34:01.764+00:00", + "source": "#Szj0RYKKLb3zYK89", + "profile": [ + "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" + ] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Organization" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", + "valueCanonical": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" + } + ], + "url": "http://hl7.org/fhir/Questionnaire/definition", + "name": "OutpatientPriorAuthorizationRequest", + "title": "Outpatient Prior Authorization Request", + "status": "active", + "subjectType": [ + "Patient" + ], + "date": "2022-01-04T00:00:00+00:00", + "contact": [ + { + "name": "Palmetto GBA" + } + ], + "description": "Testing the form", + "jurisdiction": [ + { + "coding": [ + { + "system": "urn:iso:std:iso:3166", + "code": "US" + } + ] + } + ], + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/cql-identifier", + "expression": "FacilityName" + } + } + ], + "linkId": "1.1", + "definition": "http://hl7.org/fhir/Organization#Organization.name", + "text": "Name", + "type": "string", + "required": true + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/cql-identifier", + "expression": "FacilityNPI" + } + } + ], + "linkId": "1.2", + "definition": "http://hl7.org/fhir/Organization#Organization.identifier", + "text": "NPI", + "type": "text", + "required": true + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-demographics.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-demographics.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-demographics.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-demographics.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-mypain-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-mypain-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-mypain-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-mypain-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-observation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-observation.json new file mode 100644 index 000000000..aed33d570 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-observation.json @@ -0,0 +1,85 @@ +{ + "resourceType": "Questionnaire", + "id": "observation", + "meta": { + "versionId": "2", + "lastUpdated": "2022-11-21T17:34:01.764+00:00", + "source": "#Szj0RYKKLb3zYK89", + "profile": [ + "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaire-r4" + ] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-library", + "valueCanonical": "http://fhir.org/fhir/test/Library/LibraryObservation" + } + ], + "url": "http://hl7.org/fhir/Questionnaire/observation", + "name": "OutpatientPriorAuthorizationRequest", + "title": "Outpatient Prior Authorization Request", + "status": "active", + "subjectType": [ + "Patient" + ], + "date": "2022-01-04T00:00:00+00:00", + "contact": [ + { + "name": "Palmetto GBA" + } + ], + "description": "Testing the form", + "jurisdiction": [ + { + "coding": [ + { + "system": "urn:iso:std:iso:3166", + "code": "US" + } + ] + } + ], + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", + "valueExpression": { + "name": "PatientHeight", + "language": "text/cql-identifier", + "expression": "PatientHeight" + } + } + ], + "linkId": "0", + "text": "Patient Height", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/cql-expression", + "expression": "%PatientHeight.value" + } + } + ], + "linkId": "1", + "code": [ + { + "code": "1153637007", + "system": "http://snomed.info/sct", + "display": "Body height measure (observable entity)" + } + ], + "text": "Height:", + "type": "integer", + "required": true, + "maxLength": 3 + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json new file mode 100644 index 000000000..40e418f41 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json @@ -0,0 +1,264 @@ +{ + "resourceType": "Questionnaire", + "id": "questionnaire-sdc-test-fhirpath-prepop-initialexpression", + "meta": { + "profile": [ + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-pop-exp" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "patient", + "display": "Patient" + } + }, + { + "url": "type", + "valueCode": "Patient" + }, + { + "url": "description", + "valueString": "The patient that is to be used to pre-populate the form" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext" + }, + { + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "user", + "display": "User" + } + }, + { + "url": "type", + "valueCode": "Practitioner" + }, + { + "url": "description", + "valueString": "The practitioner that is to be used to pre-populate the form" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", + "valueCode": "fhir" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-initialexpression", + "version": "3.0.0", + "name": "FhirPathPrepopSimple", + "title": "Questionnaire Pre-Population", + "status": "active", + "experimental": true, + "subjectType": [ + "Patient" + ], + "date": "2023-12-07T23:07:45+00:00", + "publisher": "HL7 International / FHIR Infrastructure", + "contact": [ + { + "name": "HL7 International / FHIR Infrastructure", + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg" + } + ] + }, + { + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg" + } + ] + } + ], + "description": "FhirPath based prepopulation simple example", + "jurisdiction": [ + { + "coding": [ + { + "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", + "code": "001", + "display": "World" + } + ] + } + ], + "item": [ + { + "linkId": "grp", + "type": "group", + "item": [ + { + "linkId": "part-details", + "text": "Participant details", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "participant-id", + "text": "Participant ID number", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(system='http://ns.electronichealth.net.au/id/medicare-number').value.first()" + } + } + ], + "linkId": "medicare-number", + "text": "Medicare number", + "type": "string", + "required": true + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(system='http://ns.electronichealth.net.au/id/dva').value.first()" + } + } + ], + "linkId": "dva-number", + "text": "DVA number", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.name.first().family" + } + } + ], + "linkId": "family-name", + "text": "Family name", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.name.first().given.first()" + } + } + ], + "linkId": "given-names", + "text": "Given name(s)", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.birthDate" + } + } + ], + "linkId": "dob", + "text": "Date of birth", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.telecom.where(system='phone').select(($this.where(use='mobile') | $this.where(use='home')).first().value)" + } + } + ], + "linkId": "contact-number", + "text": "Contact telephone number", + "type": "string", + "item": [ + { + "linkId": "contact-number-tooltip", + "text": "(mobile or land line including area code)", + "type": "text" + } + ] + } + ] + }, + { + "linkId": "provider-details", + "text": "Provider details", + "type": "group", + "repeats": false, + "readOnly": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%user.identifier.where(system='http://ns.electronichealth.net.au/id/hi/prn').first().value" + } + } + ], + "linkId": "provider-number", + "text": "Provider number for payment", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "today()" + } + } + ], + "linkId": "date-consult", + "text": "Date of consultation", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%user.name.first().select(given.first() + ' ' + family)" + } + } + ], + "linkId": "provider-name", + "text": "Name", + "type": "string", + "readOnly": true + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-LaunchContexts.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-LaunchContexts.json new file mode 100644 index 000000000..b504f7d3d --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-LaunchContexts.json @@ -0,0 +1,113 @@ +{ + "resourceType": "StructureDefinition", + "id": "LaunchContexts", + "meta": { + "profile": [ + "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-publishablecasefeature" + ] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", + "valueCode": "shareable" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", + "valueCode": "computable" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", + "valueCode": "executable" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability", + "valueCode": "publishable" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel", + "valueCode": "structured" + }, + { + "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem", + "valueReference": { + "reference": "Device/cqf-tooling" + } + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql.identifier", + "expression": "Patient", + "reference": "http://fhir.org/test/Library/LaunchContexts" + } + } + ], + "url": "http://fhir.org/test/StructureDefinition/LaunchContexts", + "name": "LaunchContexts", + "title": "Launch Contexts Test", + "status": "draft", + "experimental": true, + "publisher": "Smile Digital Health", + "description": "Tests Launch Contexts", + "useContext": [ + { + "code": { + "system": "http://terminology.hl7.org/CodeSystem/usage-context-type", + "code": "task", + "display": "Workflow Task" + } + } + ], + "fhirVersion": "4.0.1", + "kind": "resource", + "abstract": false, + "type": "Observation", + "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation", + "derivation": "constraint", + "differential": { + "element": [ + { + "id": "Observation", + "path": "Observation", + "mustSupport": false + }, + { + "id": "Observation.code:PatientAgeCode", + "path": "Observation.code", + "sliceName": "PatientAgeCode", + "short": "Patient Age in Years", + "definition": "Patient Age in Years", + "min": 1, + "max": "1", + "type": [ + { + "code": "CodeableConcept" + } + ], + "fixedCodeableConcept": { + "coding": [ + { + "system": "http://example.org/sdh/demo/CodeSystem/cc-screening-codes", + "code": "patient-age", + "display": "Patient Age in Years" + } + ] + } + }, + { + "id": "Observation.value[x]", + "path": "Observation.value[x]", + "short": "Patient Age in Years", + "definition": "Patient Age in Years", + "min": 1, + "max": "1", + "type": [ + { + "code": "integer" + } + ], + "mustSupport": true + } + ] + } +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-PAClaim.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-PAClaim.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-PAClaim.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-PAClaim.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneAttending.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneAttending.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneAttending.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneAttending.json index 4125ae3a5..7567ad73f 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneAttending.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneAttending.json @@ -24,6 +24,14 @@ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "pa" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql.identifier", + "expression": "PractitionerAttendingPhysician", + "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" + } } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending", @@ -1314,16 +1322,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.given", "path": "Practitioner.name.given", "label": "First Name", @@ -1335,16 +1333,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.family", "path": "Practitioner.name.family", "label": "Last Name", @@ -1390,19 +1378,9 @@ "code": "uri" } ], - "fixedUri": "http://npi.org" + "fixedUri": "http://hl7.org.fhir/sid/us-npi" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:NPI.value", "path": "Practitioner.identifier.value", "label": "NPI", @@ -1431,19 +1409,9 @@ "code": "uri" } ], - "fixedUri": "http://ptan.org" + "fixedUri": "http://www.acme.org/practitioners" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:PTAN.value", "path": "Practitioner.identifier.value", "label": "PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOperating.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOperating.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOperating.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOperating.json index 6090434a0..d18ca937a 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOperating.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOperating.json @@ -24,6 +24,14 @@ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "pa" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql.identifier", + "expression": "PractitionerOperatingPhysician", + "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" + } } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating", @@ -1314,16 +1322,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.given", "path": "Practitioner.name.given", "label": "First Name", @@ -1335,16 +1333,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.family", "path": "Practitioner.name.family", "label": "Last Name", @@ -1390,19 +1378,9 @@ "code": "uri" } ], - "fixedUri": "http://npi.org" + "fixedUri": "http://hl7.org.fhir/sid/us-npi" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:NPI.value", "path": "Practitioner.identifier.value", "label": "NPI", @@ -1431,19 +1409,9 @@ "code": "uri" } ], - "fixedUri": "http://ptan.org" + "fixedUri": "http://www.acme.org/practitioners" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:PTAN.value", "path": "Practitioner.identifier.value", "label": "PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json similarity index 98% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json index 59b073356..dc87eed0f 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json @@ -24,6 +24,13 @@ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "pa" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql.identifier", + "expression": "OrganizationFacility" + } } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization-noLibrary", @@ -1337,16 +1344,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.name", "path": "Organization.name", "label": "Name", @@ -1391,19 +1388,9 @@ "code": "uri" } ], - "fixedUri": "http://npi.org" + "fixedUri": "http://hl7.org.fhir/sid/us-npi" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.identifier:FacilityNPI.value", "path": "Organization.identifier.value", "label": "Facility NPI", @@ -1435,16 +1422,6 @@ "fixedUri": "http://ptan.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.identifier:FacilityPTAN.value", "path": "Organization.identifier.value", "label": "Facility PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOrganization.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOrganization.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOrganization.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOrganization.json index 33daa518b..2e7fea38f 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOrganization.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOneOrganization.json @@ -24,6 +24,14 @@ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "pa" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql.identifier", + "expression": "OrganizationFacility", + "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" + } } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization", @@ -1337,16 +1345,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Organization.name", "path": "Organization.name", "label": "Name", @@ -1391,19 +1389,9 @@ "code": "uri" } ], - "fixedUri": "http://npi.org" + "fixedUri": "http://hl7.org.fhir/sid/us-npi" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Organization.identifier:FacilityNPI.value", "path": "Organization.identifier.value", "label": "Facility NPI", @@ -1432,19 +1420,9 @@ "code": "uri" } ], - "fixedUri": "http://ptan.org" + "fixedUri": "http://www.acme.org/practitioners" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Organization.identifier:FacilityPTAN.value", "path": "Organization.identifier.value", "label": "Facility PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOnePatient.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOnePatient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOnePatient.json index 16f62e903..3e2a6b794 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOnePatient.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-RouteOnePatient.json @@ -28,6 +28,14 @@ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "pa" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql.identifier", + "expression": "Patient", + "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" + } } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient", @@ -2314,16 +2322,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.name.given", "path": "Patient.name.given", "label": "First Name", @@ -2335,16 +2333,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.name.family", "path": "Patient.name.family", "label": "Last Name", @@ -2356,16 +2344,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.birthDate", "path": "Patient.birthDate", "label": "Date of Birth", @@ -2377,16 +2355,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.gender", "path": "Patient.gender", "label": "Gender", @@ -2436,19 +2404,9 @@ "code": "uri" } ], - "fixedUri": "http://medicare.org" + "fixedUri": "urn:oid:1.2.36.146.595.217.0.1" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.identifier:MedicareID.value", "path": "Patient.identifier.value", "label": "Medicare ID", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-chf-bodyweight-change.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-chf-bodyweight-change.json new file mode 100644 index 000000000..def418db6 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-chf-bodyweight-change.json @@ -0,0 +1,3831 @@ +{ + "resourceType": "StructureDefinition", + "id": "chf-bodyweight-change", + "meta": { + "profile": [ + "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-casefeaturedefinition" + ] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-caseFeatureOf", + "valueCanonical": "http://hl7.org/fhir/uv/cpg/PlanDefinition/chf-pathway" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-caseFeatureOf", + "valueCanonical": "http://hl7.org/fhir/uv/cpg/PlanDefinition/chf-daily-management" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-caseFeatureOf", + "valueCanonical": "http://hl7.org/fhir/uv/cpg/PlanDefinition/chf-bodyweight-change-pd" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-inferenceExpression", + "valueExpression": { + "language": "text/cql-identifier", + "expression": "Current Body Weight Change", + "reference": "http://hl7.org/fhir/uv/cpg/Library/CHF" + } + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-assertionExpression", + "valueExpression": { + "language": "text/cql-identifier", + "expression": "Body Weight Change Assertion", + "reference": "http://hl7.org/fhir/uv/cpg/Library/CHF" + } + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql-identifier", + "expression": "Body Weight Change", + "reference": "http://hl7.org/fhir/uv/cpg/Library/CHF" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "shareable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "computable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "publishable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeRepresentationLevel", + "valueCode": "structured" + } + ], + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/chf-bodyweight-change", + "version": "2.0.0-draft", + "name": "CHFBodyWeightChange", + "title": "CHF Body Weight Change", + "status": "active", + "experimental": true, + "date": "2024-08-25T03:33:21+00:00", + "publisher": "HL7 International / Clinical Decision Support", + "contact": [ + { + "name": "HL7 International / Clinical Decision Support", + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss" + } + ] + } + ], + "description": "This profile defines how to represent body weight change observations in FHIR using a CHF code and UCUM units of measure (in kg).", + "jurisdiction": [ + { + "coding": [ + { + "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", + "code": "001", + "display": "World" + } + ] + } + ], + "fhirVersion": "4.0.1", + "mapping": [ + { + "identity": "workflow", + "uri": "http://hl7.org/fhir/workflow", + "name": "Workflow Pattern" + }, + { + "identity": "sct-concept", + "uri": "http://snomed.info/conceptdomain", + "name": "SNOMED CT Concept Domain Binding" + }, + { + "identity": "v2", + "uri": "http://hl7.org/v2", + "name": "HL7 v2 Mapping" + }, + { + "identity": "rim", + "uri": "http://hl7.org/v3", + "name": "RIM Mapping" + }, + { + "identity": "w5", + "uri": "http://hl7.org/fhir/fivews", + "name": "FiveWs Pattern Mapping" + }, + { + "identity": "sct-attr", + "uri": "http://snomed.org/attributebinding", + "name": "SNOMED CT Attribute Binding" + } + ], + "kind": "resource", + "abstract": false, + "type": "Observation", + "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation", + "derivation": "constraint", + "snapshot": { + "element": [ + { + "id": "Observation", + "path": "Observation", + "short": "Measurements and simple assertions", + "definition": "Measurements and simple assertions made about a patient, device or other subject.", + "comment": "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": [ + "Vital Signs", + "Measurement", + "Results", + "Tests" + ], + "min": 0, + "max": "*", + "base": { + "path": "Observation", + "min": 0, + "max": "*" + }, + "constraint": [ + { + "key": "dom-2", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", + "expression": "contained.contained.empty()", + "xpath": "not(parent::f:contained and f:contained)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-3", + "severity": "error", + "human": "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": "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": "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": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-4", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", + "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-5", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a security label", + "expression": "contained.meta.security.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:security))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", + "valueBoolean": true + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", + "valueMarkdown": "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." + } + ], + "key": "dom-6", + "severity": "warning", + "human": "A resource should have narrative for robust management", + "expression": "text.`div`.exists()", + "xpath": "exists(f:text/h:div)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "obs-6", + "severity": "error", + "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present", + "expression": "dataAbsentReason.empty() or value.empty()", + "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))", + "source": "http://hl7.org/fhir/StructureDefinition/Observation" + }, + { + "key": "obs-7", + "severity": "error", + "human": "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.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()", + "xpath": "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": "http://hl7.org/fhir/StructureDefinition/Observation" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "workflow", + "map": "Event" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity|" + }, + { + "identity": "v2", + "map": "OBX" + }, + { + "identity": "rim", + "map": "Observation[classCode=OBS, moodCode=EVN]" + } + ] + }, + { + "id": "Observation.id", + "path": "Observation.id", + "short": "Logical id of this artifact", + "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", + "comment": "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": 0, + "max": "1", + "base": { + "path": "Resource.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "id" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isModifier": false, + "isSummary": true + }, + { + "id": "Observation.meta", + "path": "Observation.meta", + "short": "Metadata about the resource", + "definition": "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": 0, + "max": "1", + "base": { + "path": "Resource.meta", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Meta" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true + }, + { + "id": "Observation.implicitRules", + "path": "Observation.implicitRules", + "short": "A set of rules under which this content was created", + "definition": "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": "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": 0, + "max": "1", + "base": { + "path": "Resource.implicitRules", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "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": true + }, + { + "id": "Observation.language", + "path": "Observation.language", + "short": "Language of the resource content", + "definition": "The base language in which the resource is written.", + "comment": "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": 0, + "max": "1", + "base": { + "path": "Resource.language", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", + "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "Language" + } + ], + "strength": "preferred", + "description": "A human language.", + "valueSet": "http://hl7.org/fhir/ValueSet/languages" + } + }, + { + "id": "Observation.text", + "path": "Observation.text", + "short": "Text summary of the resource, for human interpretation", + "definition": "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": "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": [ + "narrative", + "html", + "xhtml", + "display" + ], + "min": 0, + "max": "1", + "base": { + "path": "DomainResource.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Narrative" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "Act.text?" + } + ] + }, + { + "id": "Observation.contained", + "path": "Observation.contained", + "short": "Contained, inline Resources", + "definition": "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": "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": [ + "inline resources", + "anonymous resources", + "contained resources" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.contained", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Resource" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.extension", + "path": "Observation.extension", + "short": "Additional content defined by implementations", + "definition": "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": "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": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.modifierExtension", + "path": "Observation.modifierExtension", + "short": "Extensions that cannot be ignored", + "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "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": "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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.identifier", + "path": "Observation.identifier", + "short": "Business Identifier for observation", + "definition": "A unique identifier assigned to this observation.", + "requirements": "Allows observations to be distinguished and referenced.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.identifier", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Identifier" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "workflow", + "map": "Event.identifier" + }, + { + "identity": "w5", + "map": "FiveWs.identifier" + }, + { + "identity": "v2", + "map": "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." + }, + { + "identity": "rim", + "map": "id" + } + ] + }, + { + "id": "Observation.basedOn", + "path": "Observation.basedOn", + "short": "Fulfills plan, proposal or order", + "definition": "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.", + "requirements": "Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon.", + "alias": [ + "Fulfills" + ], + "min": 0, + "max": "*", + "base": { + "path": "Observation.basedOn", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/CarePlan", + "http://hl7.org/fhir/StructureDefinition/DeviceRequest", + "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation", + "http://hl7.org/fhir/StructureDefinition/MedicationRequest", + "http://hl7.org/fhir/StructureDefinition/NutritionOrder", + "http://hl7.org/fhir/StructureDefinition/ServiceRequest" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "workflow", + "map": "Event.basedOn" + }, + { + "identity": "v2", + "map": "ORC" + }, + { + "identity": "rim", + "map": ".inboundRelationship[typeCode=COMP].source[moodCode=EVN]" + } + ] + }, + { + "id": "Observation.partOf", + "path": "Observation.partOf", + "short": "Part of referenced event", + "definition": "A larger event of which this particular Observation is a component or step. For example, an observation as part of a procedure.", + "comment": "To link an Observation to an Encounter use `encounter`. See the [Notes](http://hl7.org/fhir/R4/observation.html#obsgrouping) below for guidance on referencing another Observation.", + "alias": [ + "Container" + ], + "min": 0, + "max": "*", + "base": { + "path": "Observation.partOf", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/MedicationAdministration", + "http://hl7.org/fhir/StructureDefinition/MedicationDispense", + "http://hl7.org/fhir/StructureDefinition/MedicationStatement", + "http://hl7.org/fhir/StructureDefinition/Procedure", + "http://hl7.org/fhir/StructureDefinition/Immunization", + "http://hl7.org/fhir/StructureDefinition/ImagingStudy" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "workflow", + "map": "Event.partOf" + }, + { + "identity": "v2", + "map": "Varies by domain" + }, + { + "identity": "rim", + "map": ".outboundRelationship[typeCode=FLFS].target" + } + ] + }, + { + "id": "Observation.status", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint", + "valueString": "default: final" + } + ], + "path": "Observation.status", + "short": "registered | preliminary | final | amended +", + "definition": "The status of the result value.", + "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.", + "requirements": "Need to track the status of individual results. Some results are finalized before the whole report is finalized.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.status", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "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": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationStatus" + } + ], + "strength": "required", + "description": "Codes providing the status of an observation.", + "valueSet": "http://hl7.org/fhir/ValueSet/observation-status|4.0.1" + }, + "mapping": [ + { + "identity": "workflow", + "map": "Event.status" + }, + { + "identity": "w5", + "map": "FiveWs.status" + }, + { + "identity": "sct-concept", + "map": "< 445584004 |Report by finality status|" + }, + { + "identity": "v2", + "map": "OBX-11" + }, + { + "identity": "rim", + "map": "status Amended & Final are differentiated by whether it is the subject of a ControlAct event with a type of \"revise\"" + } + ] + }, + { + "id": "Observation.category", + "path": "Observation.category", + "short": "Classification of type of observation", + "definition": "A code that classifies the general type of observation being made.", + "comment": "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": "Used for filtering what observations are retrieved and displayed.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.category", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCategory" + } + ], + "strength": "preferred", + "description": "Codes for high level observation categories.", + "valueSet": "http://hl7.org/fhir/ValueSet/observation-category" + }, + "mapping": [ + { + "identity": "w5", + "map": "FiveWs.class" + }, + { + "identity": "rim", + "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code" + } + ] + }, + { + "id": "Observation.code", + "path": "Observation.code", + "short": "Body Weight Change", + "definition": "Body Weight Change.", + "comment": "*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": "Knowing what kind of observation is being made is essential to understanding the observation.", + "alias": [ + "Name" + ], + "min": 1, + "max": "1", + "base": { + "path": "Observation.code", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCode" + } + ], + "strength": "example", + "description": "Codes identifying names of simple observations.", + "valueSet": "http://hl7.org/fhir/ValueSet/observation-codes" + }, + "mapping": [ + { + "identity": "workflow", + "map": "Event.code" + }, + { + "identity": "w5", + "map": "FiveWs.what[x]" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity| OR < 386053000 |Evaluation procedure|" + }, + { + "identity": "v2", + "map": "OBX-3" + }, + { + "identity": "rim", + "map": "code" + }, + { + "identity": "sct-attr", + "map": "116680003 |Is a|" + } + ] + }, + { + "id": "Observation.code.id", + "path": "Observation.code.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.code.extension", + "path": "Observation.code.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "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": "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": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.code.coding", + "path": "Observation.code.coding", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "code" + }, + { + "type": "value", + "path": "system" + } + ], + "ordered": false, + "rules": "open" + }, + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "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": "Allows for alternative encodings within a code system, and translations to other code systems.", + "min": 1, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode", + "path": "Observation.code.coding", + "sliceName": "BodyWeightCode", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "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": "Allows for alternative encodings within a code system, and translations to other code systems.", + "min": 1, + "max": "1", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode.id", + "path": "Observation.code.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode.extension", + "path": "Observation.code.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "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": "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": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode.system", + "path": "Observation.code.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "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": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "fixedUri": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes", + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode.version", + "path": "Observation.code.coding.version", + "short": "Version of the system - if relevant", + "definition": "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": "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": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode.code", + "path": "Observation.code.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "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).", + "requirements": "Need to refer to a particular code in the system.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "body-weight-change", + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.code.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Observation.code.coding:BodyWeightCode.userSelected", + "path": "Observation.code.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", + "comment": "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": "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": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "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 ]" + } + ] + }, + { + "id": "Observation.code.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.code.text", + "short": "Plain text representation of the concept", + "definition": "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": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "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": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Observation.subject", + "path": "Observation.subject", + "short": "Who and/or what the observation is about", + "definition": "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": "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": "Observations have no value if you don't know who or what they're about.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.subject", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Group", + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Location" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "workflow", + "map": "Event.subject" + }, + { + "identity": "w5", + "map": "FiveWs.subject[x]" + }, + { + "identity": "v2", + "map": "PID-3" + }, + { + "identity": "rim", + "map": "participation[typeCode=RTGT]" + }, + { + "identity": "w5", + "map": "FiveWs.subject" + } + ] + }, + { + "id": "Observation.focus", + "path": "Observation.focus", + "short": "What the observation is about, when it is not about the subject of record", + "definition": "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": "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](http://hl7.org/fhir/R4/extension-observation-focuscode.html).", + "min": 0, + "max": "*", + "base": { + "path": "Observation.focus", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Resource" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "w5", + "map": "FiveWs.subject[x]" + }, + { + "identity": "v2", + "map": "OBX-3" + }, + { + "identity": "rim", + "map": "participation[typeCode=SBJ]" + }, + { + "identity": "w5", + "map": "FiveWs.subject" + } + ] + }, + { + "id": "Observation.encounter", + "path": "Observation.encounter", + "short": "Healthcare event during which this observation is made", + "definition": "The healthcare event (e.g. a patient and healthcare provider interaction) during which this observation is made.", + "comment": "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": "For some observations it may be important to know the link between an observation and a particular encounter.", + "alias": [ + "Context" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.encounter", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Encounter" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "workflow", + "map": "Event.context" + }, + { + "identity": "w5", + "map": "FiveWs.context" + }, + { + "identity": "v2", + "map": "PV1" + }, + { + "identity": "rim", + "map": "inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]" + } + ] + }, + { + "id": "Observation.effective[x]", + "path": "Observation.effective[x]", + "short": "Clinically relevant time/time-period for observation", + "definition": "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": "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](http://hl7.org/fhir/R4/datatypes.html#timing) datatype which allow the measurement to be tied to regular life events.", + "requirements": "Knowing when an observation was deemed true is important to its relevance as well as determining trends.", + "alias": [ + "Occurrence" + ], + "min": 0, + "max": "1", + "base": { + "path": "Observation.effective[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + }, + { + "code": "Period" + }, + { + "code": "Timing" + }, + { + "code": "instant" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "workflow", + "map": "Event.occurrence[x]" + }, + { + "identity": "w5", + "map": "FiveWs.done[x]" + }, + { + "identity": "v2", + "map": "OBX-14, and/or OBX-19 after v2.4 (depends on who observation made)" + }, + { + "identity": "rim", + "map": "effectiveTime" + } + ] + }, + { + "id": "Observation.issued", + "path": "Observation.issued", + "short": "Date/Time this version was made available", + "definition": "The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified.", + "comment": "For Observations that don’t require review and verification, it may be the same as the [`lastUpdated` ](http://hl7.org/fhir/R4/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": 0, + "max": "1", + "base": { + "path": "Observation.issued", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "instant" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "w5", + "map": "FiveWs.recorded" + }, + { + "identity": "v2", + "map": "OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)" + }, + { + "identity": "rim", + "map": "participation[typeCode=AUT].time" + } + ] + }, + { + "id": "Observation.performer", + "path": "Observation.performer", + "short": "Who is responsible for the observation", + "definition": "Who was responsible for asserting the observed value as \"true\".", + "requirements": "May give a degree of confidence in the observation and also indicates where follow-up questions should be directed.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.performer", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole", + "http://hl7.org/fhir/StructureDefinition/Organization", + "http://hl7.org/fhir/StructureDefinition/CareTeam", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "workflow", + "map": "Event.performer.actor" + }, + { + "identity": "w5", + "map": "FiveWs.actor" + }, + { + "identity": "v2", + "map": "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'" + }, + { + "identity": "rim", + "map": "participation[typeCode=PRF]" + } + ] + }, + { + "id": "Observation.value[x]", + "path": "Observation.value[x]", + "slicing": { + "discriminator": [ + { + "type": "type", + "path": "$this" + } + ], + "ordered": false, + "rules": "open" + }, + "short": "Actual result", + "definition": "The information determined as a result of making the observation, if the information has a simple value.", + "comment": "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](http://hl7.org/fhir/R4/observation.html#notes) below.", + "requirements": "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": 0, + "max": "1", + "base": { + "path": "Observation.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity" + }, + { + "code": "CodeableConcept" + }, + { + "code": "string" + }, + { + "code": "boolean" + }, + { + "code": "integer" + }, + { + "code": "Range" + }, + { + "code": "Ratio" + }, + { + "code": "SampledData" + }, + { + "code": "time" + }, + { + "code": "dateTime" + }, + { + "code": "Period" + } + ], + "condition": [ + "obs-7" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 441742003 |Evaluation finding|" + }, + { + "identity": "v2", + "map": "OBX.2, OBX.5, OBX.6" + }, + { + "identity": "rim", + "map": "value" + }, + { + "identity": "sct-attr", + "map": "363714003 |Interprets|" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity", + "path": "Observation.value[x]", + "sliceName": "valueQuantity", + "short": "Actual result", + "definition": "The information determined as a result of making the observation, if the information has a simple value.", + "comment": "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](http://hl7.org/fhir/R4/observation.html#notes) below.", + "requirements": "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": 0, + "max": "1", + "base": { + "path": "Observation.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity" + } + ], + "condition": [ + "obs-7" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 441742003 |Evaluation finding|" + }, + { + "identity": "v2", + "map": "OBX.2, OBX.5, OBX.6" + }, + { + "identity": "rim", + "map": "value" + }, + { + "identity": "sct-attr", + "map": "363714003 |Interprets|" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.id", + "path": "Observation.value[x].id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.extension", + "path": "Observation.value[x].extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "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": "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": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.value", + "path": "Observation.value[x].value", + "short": "Numerical value (with implicit precision)", + "definition": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + "comment": "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": "Precision is handled implicitly in almost all cases of measurement.", + "min": 1, + "max": "1", + "base": { + "path": "Quantity.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "decimal" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "SN.2 / CQ - N/A" + }, + { + "identity": "rim", + "map": "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.comparator", + "path": "Observation.value[x].comparator", + "short": "< | <= | >= | > - how to understand the value", + "definition": "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.", + "requirements": "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.", + "min": 0, + "max": "1", + "base": { + "path": "Quantity.comparator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "meaningWhenMissing": "If there is no comparator, then there is no modification of the value", + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "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": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "QuantityComparator" + } + ], + "strength": "required", + "description": "How the Quantity should be understood and represented.", + "valueSet": "http://hl7.org/fhir/ValueSet/quantity-comparator|4.0.1" + }, + "mapping": [ + { + "identity": "v2", + "map": "SN.1 / CQ.1" + }, + { + "identity": "rim", + "map": "IVL properties" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.unit", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Observation.value[x].unit", + "short": "Unit representation", + "definition": "A human-readable form of the unit.", + "requirements": "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.", + "min": 1, + "max": "1", + "base": { + "path": "Quantity.unit", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.unit" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.system", + "path": "Observation.value[x].system", + "short": "System that defines coded unit form", + "definition": "The identification of the system that provides the coded form of the unit.", + "requirements": "Need to know the system that defines the coded form of the unit.", + "min": 1, + "max": "1", + "base": { + "path": "Quantity.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "fixedUri": "http://unitsofmeasure.org", + "condition": [ + "qty-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "CO.codeSystem, PQ.translation.codeSystem" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.code", + "path": "Observation.value[x].code", + "short": "kg/d", + "definition": "Kilograms per day", + "comment": "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": "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": 1, + "max": "1", + "base": { + "path": "Quantity.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "kg/d", + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "(see OBX.6 etc.) / CQ.2" + }, + { + "identity": "rim", + "map": "PQ.code, MO.currency, PQ.translation.code" + } + ] + }, + { + "id": "Observation.dataAbsentReason", + "path": "Observation.dataAbsentReason", + "short": "Why the result is missing", + "definition": "Provides a reason why the expected value in the element Observation.value[x] is missing.", + "comment": "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\". \n\nThe 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": "For many results it is necessary to handle exceptional values in measurements.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.dataAbsentReason", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "obs-6" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationValueAbsentReason" + } + ], + "strength": "extensible", + "description": "Codes specifying why the result (`Observation.value[x]`) is missing.", + "valueSet": "http://hl7.org/fhir/ValueSet/data-absent-reason" + }, + "mapping": [ + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "value.nullFlavor" + } + ] + }, + { + "id": "Observation.interpretation", + "path": "Observation.interpretation", + "short": "High, low, normal, etc.", + "definition": "A categorical assessment of an observation value. For example, high, low, normal.", + "comment": "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": "For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.", + "alias": [ + "Abnormal Flag" + ], + "min": 0, + "max": "*", + "base": { + "path": "Observation.interpretation", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationInterpretation" + } + ], + "strength": "extensible", + "description": "Codes identifying interpretations of observations.", + "valueSet": "http://hl7.org/fhir/ValueSet/observation-interpretation" + }, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values|" + }, + { + "identity": "v2", + "map": "OBX-8" + }, + { + "identity": "rim", + "map": "interpretationCode" + }, + { + "identity": "sct-attr", + "map": "363713009 |Has interpretation|" + } + ] + }, + { + "id": "Observation.note", + "path": "Observation.note", + "short": "Comments about the observation", + "definition": "Comments about the observation or the results.", + "comment": "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": "Need to be able to provide free text additional information.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.note", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Annotation" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "v2", + "map": "NTE.3 (partner NTE to OBX, or sometimes another (child?) OBX)" + }, + { + "identity": "rim", + "map": "subjectOf.observationEvent[code=\"annotation\"].value" + } + ] + }, + { + "id": "Observation.bodySite", + "path": "Observation.bodySite", + "short": "Observed body part", + "definition": "Indicates the site on the subject's body where the observation was made (i.e. the target site).", + "comment": "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. \n\nIf 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](http://hl7.org/fhir/R4/extension-bodysite.html).", + "min": 0, + "max": "1", + "base": { + "path": "Observation.bodySite", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "BodySite" + } + ], + "strength": "example", + "description": "Codes describing anatomical locations. May include laterality.", + "valueSet": "http://hl7.org/fhir/ValueSet/body-site" + }, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 123037004 |Body structure|" + }, + { + "identity": "v2", + "map": "OBX-20" + }, + { + "identity": "rim", + "map": "targetSiteCode" + }, + { + "identity": "sct-attr", + "map": "718497002 |Inherent location|" + } + ] + }, + { + "id": "Observation.method", + "path": "Observation.method", + "short": "How it was done", + "definition": "Indicates the mechanism used to perform the observation.", + "comment": "Only used if not implicit in code for Observation.code.", + "requirements": "In some cases, method can impact results and is thus used for determining whether results can be compared or determining significance of results.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.method", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationMethod" + } + ], + "strength": "example", + "description": "Methods for simple observations.", + "valueSet": "http://hl7.org/fhir/ValueSet/observation-methods" + }, + "mapping": [ + { + "identity": "v2", + "map": "OBX-17" + }, + { + "identity": "rim", + "map": "methodCode" + } + ] + }, + { + "id": "Observation.specimen", + "path": "Observation.specimen", + "short": "Specimen used for this observation", + "definition": "The specimen that was used when this observation was made.", + "comment": "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": 0, + "max": "1", + "base": { + "path": "Observation.specimen", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Specimen" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 123038009 |Specimen|" + }, + { + "identity": "v2", + "map": "SPM segment" + }, + { + "identity": "rim", + "map": "participation[typeCode=SPC].specimen" + }, + { + "identity": "sct-attr", + "map": "704319004 |Inherent in|" + } + ] + }, + { + "id": "Observation.device", + "path": "Observation.device", + "short": "(Measurement) Device", + "definition": "The device used to generate the observation data.", + "comment": "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": 0, + "max": "1", + "base": { + "path": "Observation.device", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/DeviceMetric" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 49062001 |Device|" + }, + { + "identity": "v2", + "map": "OBX-17 / PRT -10" + }, + { + "identity": "rim", + "map": "participation[typeCode=DEV]" + }, + { + "identity": "sct-attr", + "map": "424226004 |Using device|" + } + ] + }, + { + "id": "Observation.referenceRange", + "path": "Observation.referenceRange", + "short": "Provides guide for interpretation", + "definition": "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": "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": "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": 0, + "max": "*", + "base": { + "path": "Observation.referenceRange", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "obs-3", + "severity": "error", + "human": "Must have at least a low or a high or text", + "expression": "low.exists() or high.exists() or text.exists()", + "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))", + "source": "http://hl7.org/fhir/StructureDefinition/Observation" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "v2", + "map": "OBX.7" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" + } + ] + }, + { + "id": "Observation.referenceRange.id", + "path": "Observation.referenceRange.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.extension", + "path": "Observation.referenceRange.extension", + "short": "Additional content defined by implementations", + "definition": "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": "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": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.referenceRange.modifierExtension", + "path": "Observation.referenceRange.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "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": "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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.referenceRange.low", + "path": "Observation.referenceRange.low", + "short": "Low Range, if relevant", + "definition": "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).", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.low", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" + ] + } + ], + "condition": [ + "obs-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "v2", + "map": "OBX-7" + }, + { + "identity": "rim", + "map": "value:IVL_PQ.low" + } + ] + }, + { + "id": "Observation.referenceRange.high", + "path": "Observation.referenceRange.high", + "short": "High Range, if relevant", + "definition": "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).", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.high", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity", + "profile": [ + "http://hl7.org/fhir/StructureDefinition/SimpleQuantity" + ] + } + ], + "condition": [ + "obs-3" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "v2", + "map": "OBX-7" + }, + { + "identity": "rim", + "map": "value:IVL_PQ.high" + } + ] + }, + { + "id": "Observation.referenceRange.type", + "path": "Observation.referenceRange.type", + "short": "Reference range qualifier", + "definition": "Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range.", + "comment": "This SHOULD be populated if there is more than one range. If this element is not present then the normal range is assumed.", + "requirements": "Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, etc., - for proper interpretation.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationRangeMeaning" + } + ], + "strength": "preferred", + "description": "Code for the meaning of a reference range.", + "valueSet": "http://hl7.org/fhir/ValueSet/referencerange-meaning" + }, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values| OR \r< 365860008 |General clinical state finding| \rOR \r< 250171008 |Clinical history or observation findings| OR \r< 415229000 |Racial group| OR \r< 365400002 |Finding of puberty stage| OR\r< 443938003 |Procedure carried out on subject|" + }, + { + "identity": "v2", + "map": "OBX-10" + }, + { + "identity": "rim", + "map": "interpretationCode" + } + ] + }, + { + "id": "Observation.referenceRange.appliesTo", + "path": "Observation.referenceRange.appliesTo", + "short": "Reference range population", + "definition": "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": "This SHOULD be populated if there is more than one range. If this element is not present then the normal population is assumed.", + "requirements": "Need to be able to identify the target population for proper interpretation.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.referenceRange.appliesTo", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationRangeType" + } + ], + "strength": "example", + "description": "Codes identifying the population the reference range applies to.", + "valueSet": "http://hl7.org/fhir/ValueSet/referencerange-appliesto" + }, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values| OR \r< 365860008 |General clinical state finding| \rOR \r< 250171008 |Clinical history or observation findings| OR \r< 415229000 |Racial group| OR \r< 365400002 |Finding of puberty stage| OR\r< 443938003 |Procedure carried out on subject|" + }, + { + "identity": "v2", + "map": "OBX-10" + }, + { + "identity": "rim", + "map": "interpretationCode" + } + ] + }, + { + "id": "Observation.referenceRange.age", + "path": "Observation.referenceRange.age", + "short": "Applicable age range, if relevant", + "definition": "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.", + "requirements": "Some analytes vary greatly over age.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.age", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Range" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "outboundRelationship[typeCode=PRCN].targetObservationCriterion[code=\"age\"].value" + } + ] + }, + { + "id": "Observation.referenceRange.text", + "path": "Observation.referenceRange.text", + "short": "Text based reference range in an observation", + "definition": "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\".", + "min": 0, + "max": "1", + "base": { + "path": "Observation.referenceRange.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "v2", + "map": "OBX-7" + }, + { + "identity": "rim", + "map": "value:ST" + } + ] + }, + { + "id": "Observation.hasMember", + "path": "Observation.hasMember", + "short": "Related resource that belongs to the Observation group", + "definition": "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": "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](http://hl7.org/fhir/R4/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": 0, + "max": "*", + "base": { + "path": "Observation.hasMember", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Observation", + "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse", + "http://hl7.org/fhir/StructureDefinition/MolecularSequence" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "Relationships established by OBX-4 usage" + }, + { + "identity": "rim", + "map": "outBoundRelationship" + } + ] + }, + { + "id": "Observation.derivedFrom", + "path": "Observation.derivedFrom", + "short": "Related measurements the observation is made from", + "definition": "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": "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](http://hl7.org/fhir/R4/observation.html#obsgrouping) below.", + "min": 0, + "max": "*", + "base": { + "path": "Observation.derivedFrom", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/DocumentReference", + "http://hl7.org/fhir/StructureDefinition/ImagingStudy", + "http://hl7.org/fhir/StructureDefinition/Media", + "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse", + "http://hl7.org/fhir/StructureDefinition/Observation", + "http://hl7.org/fhir/StructureDefinition/MolecularSequence" + ] + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "Relationships established by OBX-4 usage" + }, + { + "identity": "rim", + "map": ".targetObservation" + } + ] + }, + { + "id": "Observation.component", + "path": "Observation.component", + "short": "Component results", + "definition": "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": "For a discussion on the ways Observations can be assembled in groups together see [Notes](http://hl7.org/fhir/R4/observation.html#notes) below.", + "requirements": "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": 0, + "max": "*", + "base": { + "path": "Observation.component", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "v2", + "map": "containment by OBX-4?" + }, + { + "identity": "rim", + "map": "outBoundRelationship[typeCode=COMP]" + } + ] + }, + { + "id": "Observation.component.id", + "path": "Observation.component.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.extension", + "path": "Observation.component.extension", + "short": "Additional content defined by implementations", + "definition": "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": "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": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Observation.component.modifierExtension", + "path": "Observation.component.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "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": "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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])", + "source": "http://hl7.org/fhir/StructureDefinition/Extension" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Observation.component.code", + "path": "Observation.component.code", + "short": "Type of component observation (code / type)", + "definition": "Describes what was observed. Sometimes this is called the observation \"code\".", + "comment": "*All* code-value and component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation.", + "requirements": "Knowing what kind of observation is being made is essential to understanding the observation.", + "min": 1, + "max": "1", + "base": { + "path": "Observation.component.code", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationCode" + } + ], + "strength": "example", + "description": "Codes identifying names of simple observations.", + "valueSet": "http://hl7.org/fhir/ValueSet/observation-codes" + }, + "mapping": [ + { + "identity": "w5", + "map": "FiveWs.what[x]" + }, + { + "identity": "sct-concept", + "map": "< 363787002 |Observable entity| OR \r< 386053000 |Evaluation procedure|" + }, + { + "identity": "v2", + "map": "OBX-3" + }, + { + "identity": "rim", + "map": "code" + } + ] + }, + { + "id": "Observation.component.value[x]", + "path": "Observation.component.value[x]", + "short": "Actual component result", + "definition": "The information determined as a result of making the observation, if the information has a simple value.", + "comment": "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](http://hl7.org/fhir/R4/observation.html#notes) below.", + "requirements": "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": 0, + "max": "1", + "base": { + "path": "Observation.component.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Quantity" + }, + { + "code": "CodeableConcept" + }, + { + "code": "string" + }, + { + "code": "boolean" + }, + { + "code": "integer" + }, + { + "code": "Range" + }, + { + "code": "Ratio" + }, + { + "code": "SampledData" + }, + { + "code": "time" + }, + { + "code": "dateTime" + }, + { + "code": "Period" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": true, + "mapping": [ + { + "identity": "sct-concept", + "map": "363714003 |Interprets| < 441742003 |Evaluation finding|" + }, + { + "identity": "v2", + "map": "OBX.2, OBX.5, OBX.6" + }, + { + "identity": "rim", + "map": "value" + }, + { + "identity": "sct-attr", + "map": "363714003 |Interprets|" + } + ] + }, + { + "id": "Observation.component.dataAbsentReason", + "path": "Observation.component.dataAbsentReason", + "short": "Why the component result is missing", + "definition": "Provides a reason why the expected value in the element Observation.component.value[x] is missing.", + "comment": "\"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\". \n\nThe 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": "For many results it is necessary to handle exceptional values in measurements.", + "min": 0, + "max": "1", + "base": { + "path": "Observation.component.dataAbsentReason", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "obs-6" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationValueAbsentReason" + } + ], + "strength": "extensible", + "description": "Codes specifying why the result (`Observation.value[x]`) is missing.", + "valueSet": "http://hl7.org/fhir/ValueSet/data-absent-reason" + }, + "mapping": [ + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "value.nullFlavor" + } + ] + }, + { + "id": "Observation.component.interpretation", + "path": "Observation.component.interpretation", + "short": "High, low, normal, etc.", + "definition": "A categorical assessment of an observation value. For example, high, low, normal.", + "comment": "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": "For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.", + "alias": [ + "Abnormal Flag" + ], + "min": 0, + "max": "*", + "base": { + "path": "Observation.component.interpretation", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ObservationInterpretation" + } + ], + "strength": "extensible", + "description": "Codes identifying interpretations of observations.", + "valueSet": "http://hl7.org/fhir/ValueSet/observation-interpretation" + }, + "mapping": [ + { + "identity": "sct-concept", + "map": "< 260245000 |Findings values|" + }, + { + "identity": "v2", + "map": "OBX-8" + }, + { + "identity": "rim", + "map": "interpretationCode" + }, + { + "identity": "sct-attr", + "map": "363713009 |Has interpretation|" + } + ] + }, + { + "id": "Observation.component.referenceRange", + "path": "Observation.component.referenceRange", + "short": "Provides guide for interpretation of component result", + "definition": "Guidance on how to interpret the value by comparison to a normal or recommended range.", + "comment": "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": "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": 0, + "max": "*", + "base": { + "path": "Observation.component.referenceRange", + "min": 0, + "max": "*" + }, + "contentReference": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRange", + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": false, + "isSummary": false, + "mapping": [ + { + "identity": "v2", + "map": "OBX.7" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]" + } + ] + } + ] + }, + "differential": { + "element": [ + { + "id": "Observation", + "path": "Observation" + }, + { + "id": "Observation.code", + "path": "Observation.code", + "short": "Body Weight Change", + "definition": "Body Weight Change." + }, + { + "id": "Observation.code.coding", + "path": "Observation.code.coding", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "code" + }, + { + "type": "value", + "path": "system" + } + ], + "ordered": false, + "rules": "open" + }, + "min": 1 + }, + { + "id": "Observation.code.coding:BodyWeightCode", + "path": "Observation.code.coding", + "sliceName": "BodyWeightCode", + "min": 1, + "max": "1" + }, + { + "id": "Observation.code.coding:BodyWeightCode.system", + "path": "Observation.code.coding.system", + "min": 1, + "fixedUri": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes" + }, + { + "id": "Observation.code.coding:BodyWeightCode.code", + "path": "Observation.code.coding.code", + "min": 1, + "fixedCode": "body-weight-change" + }, + { + "id": "Observation.value[x]", + "path": "Observation.value[x]", + "slicing": { + "discriminator": [ + { + "type": "type", + "path": "$this" + } + ], + "ordered": false, + "rules": "open" + } + }, + { + "id": "Observation.value[x]:valueQuantity", + "path": "Observation.value[x]", + "sliceName": "valueQuantity", + "min": 0, + "max": "1", + "type": [ + { + "code": "Quantity" + } + ] + }, + { + "id": "Observation.value[x]:valueQuantity.value", + "path": "Observation.value[x].value", + "min": 1, + "mustSupport": true + }, + { + "id": "Observation.value[x]:valueQuantity.unit", + "path": "Observation.value[x].unit", + "min": 1, + "mustSupport": true + }, + { + "id": "Observation.value[x]:valueQuantity.system", + "path": "Observation.value[x].system", + "min": 1, + "fixedUri": "http://unitsofmeasure.org", + "mustSupport": true + }, + { + "id": "Observation.value[x]:valueQuantity.code", + "path": "Observation.value[x].code", + "short": "kg/d", + "definition": "Kilograms per day", + "min": 1, + "fixedCode": "kg/d" + } + ] + } +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition.json similarity index 92% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition.json index 8a0c13ef1..4903ffaa0 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition.json @@ -32,14 +32,6 @@ "valueReference": { "reference": "Device/cqf-tooling" } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Sigmoidoscopy Complications", - "reference": "http://example.org/sdh/demo/Library/ColorectalCancerCaseFeatures" - } } ], "url": "http://example.org/sdh/demo/StructureDefinition/sigmoidoscopy-complication-casefeature-definition", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition2.json similarity index 90% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition2.json index 4ec7ba7f3..399d8a61a 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition2.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/resources/StructureDefinition-sigmoidoscopy-complication-casefeature-definition2.json @@ -32,14 +32,6 @@ "valueReference": { "reference": "Device/cqf-tooling" } - }, - { - "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", - "valueExpression": { - "language": "text/cql-identifier", - "expression": "Sigmoidoscopy Complications", - "reference": "http://example.org/sdh/demo/Library/ColorectalCancerCaseFeatures" - } } ], "url": "http://example.org/sdh/demo/StructureDefinition/sigmoidoscopy-complication-casefeature-definition", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/NotReportableBundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/NotReportableBundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/NotReportableBundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/NotReportableBundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/NotReportableCarePlan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/NotReportableCarePlan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/NotReportableCarePlan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/NotReportableCarePlan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/ReportableBundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/ReportableBundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/ReportableBundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/ReportableBundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/ReportableCarePlan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/ReportableCarePlan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/ReportableCarePlan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/ReportableCarePlan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/RuleFilters-1.0.0-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/RuleFilters-1.0.0-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/RuleFilters-1.0.0-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/RuleFilters-1.0.0-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/tests-NotReportable-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/tests-NotReportable-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/tests-NotReportable-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/tests-NotReportable-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/tests-Reportable-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/tests-Reportable-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/rule-filters/tests-Reportable-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/rule-filters/tests-Reportable-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-DischargeInstructions-Patient-Data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-DischargeInstructions-Patient-Data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-DischargeInstructions-Patient-Data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-DischargeInstructions-Patient-Data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-OutpatientPriorAuthorizationRequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-OutpatientPriorAuthorizationRequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-QRSharonDecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-QRSharonDecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-QRSharonDecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-demographics-qr.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Bundle-demographics-qr.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-demographics-qr.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-extract-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-extract-QRSharonDecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-extract-QRSharonDecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-extract-QRSharonDecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-extract-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-extract-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Bundle-extract-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-extract-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-generate-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-generate-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-generate-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-hello-world-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-hello-world-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-hello-world-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-hello-world-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-prepopulate-errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-prepopulate-errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-prepopulate-errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-prepopulate-errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-prepopulate-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-prepopulate-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-prepopulate-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-prepopulate-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-prepopulate.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-prepopulate.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-prepopulate.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-prepopulate.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-us-ecr-specification.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-us-ecr-specification.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Bundle-us-ecr-specification.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Bundle-us-ecr-specification.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-generate-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-generate-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-generate-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-hello-world-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-hello-world-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-hello-world-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-hello-world-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-prepopulate-errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-prepopulate-errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-prepopulate-errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-prepopulate-errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-prepopulate-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-prepopulate-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-prepopulate-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-prepopulate-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-prepopulate.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-prepopulate.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-prepopulate.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-prepopulate.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-us-ecr-specification.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-us-ecr-specification.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/CarePlan-us-ecr-specification.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/CarePlan-us-ecr-specification.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Claim-OPA-Claim1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Claim-OPA-Claim1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Claim-OPA-Claim1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Claim-OPA-Claim1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Condition-OPA-Condition1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Condition-OPA-Condition1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Condition-OPA-Condition1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Condition-OPA-Condition1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Coverage-OPA-Coverage1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Coverage-OPA-Coverage1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Coverage-OPA-Coverage1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Coverage-OPA-Coverage1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Coverage-helloworld-patient-1-coverage-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Coverage-helloworld-patient-1-coverage-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Coverage-helloworld-patient-1-coverage-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Coverage-helloworld-patient-1-coverage-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Encounter-Encounter1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Encounter-Encounter1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Encounter-Encounter1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Encounter-Encounter1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Encounter-chf-scenario1-encounter.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Encounter-chf-scenario1-encounter.json new file mode 100644 index 000000000..964e80d0c --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Encounter-chf-scenario1-encounter.json @@ -0,0 +1,86 @@ +{ + "resourceType": "Encounter", + "id": "chf-scenario1-encounter", + "status": "in-progress", + "class": { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "code": "IMP", + "display": "inpatient encounter" + }, + "type": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "183807002", + "display": "Inpatient stay 9 days" + } + ] + } + ], + "priority": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "394849002", + "display": "High priority" + } + ] + }, + "subject": { + "reference": "Patient/chf-scenario1-patient" + }, + "episodeOfCare": [ + { + "reference": "EpisodeOfCare/chf-scenario1-eoc" + } + ], + "participant": [ + { + "type": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType", + "code": "PPRF", + "display": "primary performer" + } + ] + } + ], + "individual": { + "reference": "PractitionerRole/chf-scenario1-practitionerrole" + } + } + ], + "period": { + "start": "2019-01-31T05:03:00Z" + }, + "diagnosis": [ + { + "condition": { + "reference": "Condition/chf-scenario1-condition" + }, + "use": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role", + "code": "AD", + "display": "Admission diagnosis" + } + ] + } + } + ], + "location": [ + { + "location": { + "reference": "Location/chf-scenario1-location" + }, + "status": "active", + "period": { + "start": "2019-01-31T05:03:00Z" + } + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Encounter-helloworld-patient-1-encounter-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Encounter-helloworld-patient-1-encounter-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Encounter-helloworld-patient-1-encounter-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Encounter-helloworld-patient-1-encounter-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Location-OPA-Location1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Location-OPA-Location1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Location-OPA-Location1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Location-OPA-Location1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/MeasureReport-measurereport-helloworld-patient-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/MeasureReport-measurereport-helloworld-patient-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/MeasureReport-measurereport-helloworld-patient-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/MeasureReport-measurereport-helloworld-patient-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Observation-Patient1Height.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Observation-Patient1Height.json new file mode 100644 index 000000000..b12243150 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Observation-Patient1Height.json @@ -0,0 +1,38 @@ +{ + "resourceType": "Observation", + "id": "Patient1Height", + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs" + } + ] + } + ], + "code": { + "coding": [ + { + "code": "1153637007", + "system": "http://snomed.info/sct", + "display": "Body height measure (observable entity)" + } + ] + }, + "subject": { + "reference": "Patient/Patient1" + }, + "encounter": { + "reference": "Encounter/Encounter1" + }, + "effectiveDateTime": "2019-02-01T07:00:00Z", + "issued": "2019-02-01T07:00:00Z", + "performer": [ + { + "reference": "Practitioner/Practitioner1" + } + ], + "valueInteger": 50 +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Observation-chf-scenario1-bodyweight-change1-observation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Observation-chf-scenario1-bodyweight-change1-observation.json new file mode 100644 index 000000000..4e55d8efb --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Observation-chf-scenario1-bodyweight-change1-observation.json @@ -0,0 +1,57 @@ +{ + "resourceType": "Observation", + "id": "chf-scenario1-bodyweight-change1-observation", + "meta": { + "profile": [ + "http://hl7.org/fhir/uv/cpg/StructureDefinition/chf-bodyweight-change" + ] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-instantiatesCaseFeature", + "valueCanonical": "http://hl7.org/fhir/uv/cpg/StructureDefinition/chf-bodyweight-change" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-caseFeatureType", + "valueCode": "inferred" + } + ], + "status": "final", + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "vital-signs" + } + ] + } + ], + "code": { + "coding": [ + { + "system": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes", + "code": "body-weight-change" + } + ] + }, + "subject": { + "reference": "Patient/chf-scenario1-patient" + }, + "encounter": { + "reference": "Encounter/chf-scenario1-encounter" + }, + "effectiveDateTime": "2019-02-01T07:00:00Z", + "issued": "2019-02-01T07:00:00Z", + "performer": [ + { + "reference": "PractitionerRole/chf-scenario1-practitionerrole" + } + ], + "valueQuantity": { + "value": -1.4, + "unit": "kg/d", + "system": "http://unitsofmeasure.org", + "code": "kg/d" + } +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Organization-OPA-PayorOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Organization-OPA-PayorOrganization1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Organization-OPA-PayorOrganization1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Organization-OPA-PayorOrganization1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Organization-OPA-ProviderOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Organization-OPA-ProviderOrganization1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Organization-OPA-ProviderOrganization1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Organization-OPA-ProviderOrganization1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Patient-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Patient-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Patient-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Patient-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-chf-scenario1-patient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-chf-scenario1-patient.json new file mode 100644 index 000000000..d7e1afe91 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-chf-scenario1-patient.json @@ -0,0 +1,18 @@ +{ + "resourceType": "Patient", + "id": "chf-scenario1-patient", + "active": true, + "name": [ + { + "use": "usual", + "text": "Patterson, Jeremy", + "family": "Patterson", + "given": [ + "Jeremy" + ] + } + ], + "gender": "male", + "birthDate": "1949-03-17", + "deceasedBoolean": false +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Patient-helloworld-patient-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-helloworld-patient-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Patient-helloworld-patient-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-helloworld-patient-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Patient-patient-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-patient-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Patient-patient-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-patient-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Patient-sharondecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-sharondecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/Patient-sharondecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Patient-sharondecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Practitioner-OPA-AttendingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Practitioner-OPA-AttendingPhysician1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Practitioner-OPA-AttendingPhysician1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Practitioner-OPA-AttendingPhysician1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Practitioner-OPA-OperatingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Practitioner-OPA-OperatingPhysician1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Practitioner-OPA-OperatingPhysician1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Practitioner-OPA-OperatingPhysician1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Practitioner-Practitioner1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Practitioner-Practitioner1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/tests/Practitioner-Practitioner1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Practitioner-Practitioner1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Procedure-OPA-Procedure1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Procedure-OPA-Procedure1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Procedure-OPA-Procedure1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Procedure-OPA-Procedure1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Procedure-OPA-Procedure2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Procedure-OPA-Procedure2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/Procedure-OPA-Procedure2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/Procedure-OPA-Procedure2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-NumericExtract.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-NumericExtract.json new file mode 100644 index 000000000..e679baf25 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-NumericExtract.json @@ -0,0 +1,50 @@ +{ + "resourceType": "QuestionnaireResponse", + "id": "NumericExtract", + "meta": { + "versionId": "1", + "lastUpdated": "2024-06-17T14:46:20.415+00:00", + "source": "#fQ4sBFboob3nlUiT", + "profile": [ + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse|3.0" + ], + "tag": [ + { + "code": "lformsVersion: 36.1.3" + } + ] + }, + "questionnaire": "http://gefyra.de/fhir/Questionnaire/NumericExtract", + "status": "completed", + "subject": { + "reference": "Patient/360", + "display": "Simone Heckmann" + }, + "authored": "2024-06-17T14:46:03.324Z", + "item": [ + { + "linkId": "0", + "text": "Persönliche Angaben", + "item": [ + { + "linkId": "baseDataDecimalHeight", + "text": "Größe (in cm):", + "answer": [ + { + "valueInteger": 123 + } + ] + }, + { + "linkId": "baseDataDecimalWeight", + "text": "Gewicht (in kg):", + "answer": [ + { + "valueDecimal": 23.5 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json similarity index 68% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json index f4f00df2a..09eb6e341 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json @@ -9,102 +9,7 @@ { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityName) for item (1.1): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityNPI) for item (1.2): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryMedicareID) for item (2.4): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianFirstName) for item (3.1): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianLastName) for item (3.2): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianNPI) for item (3.3): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddress1) for item (3.5.1): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddress2) for item (3.5.2): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressCity) for item (3.5.3): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressState) for item (3.5.4): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressZip) for item (3.5.5): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianSame) for item (4.1): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianFirstName) for item (4.2.1): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianLastName) for item (4.2.2): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianNPI) for item (4.2.3): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddress1) for item (4.2.5.1): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddress2) for item (4.2.5.2): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressCity) for item (4.2.5.3): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressState) for item (4.2.5.4): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" - }, - { - "severity": "error", - "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressZip) for item (4.2.5.5): Could not resolve type ActivityDefinitionKind. Primary package(s) for this resolver are org.hl7.fhir.r5.model" + "diagnostics": "Encountered error evaluating initial expression for item 2.4: Error encountered evaluating expression (BeneficiaryMedicareID) for item (2.4): Could not resolve expression reference 'BeneficiaryMedicareID' in library 'OutpatientPriorAuthorizationPrepopulation'." } ] }, @@ -151,6 +56,12 @@ ], "item": [ { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Organization" + } + ], "linkId": "1", "text": "Facility Information", "type": "group", @@ -163,6 +74,12 @@ "language": "text/cql.identifier", "expression": "FacilityName" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "1.1", @@ -178,6 +95,12 @@ "language": "text/cql.identifier", "expression": "FacilityNPI" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "1.2", @@ -194,7 +117,7 @@ { "linkId": "1.4", "text": "Contract/Region", - "type": "question", + "type": "choice", "required": false, "answerOption": [ { @@ -222,6 +145,12 @@ ] }, { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Patient" + } + ], "linkId": "2", "text": "Beneficiary Information", "type": "group", @@ -234,6 +163,12 @@ "language": "text/cql.identifier", "expression": "BeneficiaryFirstName" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "2.1", @@ -249,6 +184,12 @@ "language": "text/cql.identifier", "expression": "BeneficiaryLastName" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "2.2", @@ -264,6 +205,12 @@ "language": "text/cql.identifier", "expression": "BeneficiaryDOB" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "2.3", @@ -294,11 +241,17 @@ "language": "text/cql.identifier", "expression": "BeneficiaryGender" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "2.5", "text": "Gender", - "type": "question", + "type": "choice", "required": true, "answerOption": [ { @@ -335,6 +288,12 @@ ] }, { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Practitioner" + } + ], "linkId": "3", "text": "Operating Physician Information", "type": "group", @@ -347,6 +306,12 @@ "language": "text/cql.identifier", "expression": "OperatingPhysicianFirstName" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "3.1", @@ -362,6 +327,12 @@ "language": "text/cql.identifier", "expression": "OperatingPhysicianLastName" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "3.2", @@ -377,6 +348,12 @@ "language": "text/cql.identifier", "expression": "OperatingPhysicianNPI" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "3.3", @@ -404,6 +381,12 @@ "language": "text/cql.identifier", "expression": "OperatingPhysicianAddress1" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "3.5.1", @@ -434,6 +417,12 @@ "language": "text/cql.identifier", "expression": "OperatingPhysicianAddressCity" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "3.5.3", @@ -449,6 +438,12 @@ "language": "text/cql.identifier", "expression": "OperatingPhysicianAddressState" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "3.5.4", @@ -464,6 +459,12 @@ "language": "text/cql.identifier", "expression": "OperatingPhysicianAddressZip" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "3.5.5", @@ -476,6 +477,12 @@ ] }, { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", + "valueCode": "Practitioner" + } + ], "linkId": "4", "text": "Attending Physician Information", "type": "group", @@ -488,6 +495,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianSame" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.1", @@ -515,6 +528,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianFirstName" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.2.1", @@ -530,6 +549,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianLastName" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.2.2", @@ -545,6 +570,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianNPI" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.2.3", @@ -572,6 +603,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianAddress1" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.2.5.1", @@ -602,6 +639,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianAddressCity" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.2.5.3", @@ -617,6 +660,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianAddressState" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.2.5.4", @@ -632,6 +681,12 @@ "language": "text/cql.identifier", "expression": "AttendingPhysicianAddressZip" } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", + "valueReference": { + "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" + } } ], "linkId": "4.2.5.5", @@ -654,15 +709,9 @@ "valueReference": { "reference": "#populate-outcome-OutpatientPriorAuthorizationRequest-OPA-Patient1" } - }, - { - "url": "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaireresponse-questionnaire", - "valueReference": { - "reference": "#OutpatientPriorAuthorizationRequest" - } } ], - "questionnaire": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest", + "questionnaire": "#OutpatientPriorAuthorizationRequest", "status": "in-progress", "subject": { "reference": "Patient/OPA-Patient1" @@ -674,11 +723,21 @@ "item": [ { "linkId": "1.1", - "text": "Name" + "text": "Name", + "answer": [ + { + "valueString": "Acme Clinic" + } + ] }, { "linkId": "1.2", - "text": "NPI" + "text": "NPI", + "answer": [ + { + "valueString": "1407071236" + } + ] }, { "linkId": "1.3", @@ -695,14 +754,6 @@ "text": "Beneficiary Information", "item": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.1", "text": "First Name", "answer": [ @@ -712,14 +763,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.2", "text": "Last Name", "answer": [ @@ -729,14 +772,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.3", "text": "Date of Birth", "answer": [ @@ -750,14 +785,6 @@ "text": "Medicare ID" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author", - "valueReference": { - "reference": "http://cqframework.org/fhir/Device/clinical-quality-language" - } - } - ], "linkId": "2.5", "text": "Gender", "answer": [ @@ -774,15 +801,30 @@ "item": [ { "linkId": "3.1", - "text": "First Name" + "text": "First Name", + "answer": [ + { + "valueString": "Fielding" + } + ] }, { "linkId": "3.2", - "text": "Last Name" + "text": "Last Name", + "answer": [ + { + "valueString": "Kathy" + } + ] }, { "linkId": "3.3", - "text": "NPI" + "text": "NPI", + "answer": [ + { + "valueString": "1245319599" + } + ] }, { "linkId": "3.4", @@ -794,7 +836,12 @@ "item": [ { "linkId": "3.5.1", - "text": "Address1" + "text": "Address1", + "answer": [ + { + "valueString": "1080 FIRST COLONIAL RD" + } + ] }, { "linkId": "3.5.2", @@ -802,15 +849,30 @@ }, { "linkId": "3.5.3", - "text": "City" + "text": "City", + "answer": [ + { + "valueString": "Virginia Beach" + } + ] }, { "linkId": "3.5.4", - "text": "State" + "text": "State", + "answer": [ + { + "valueString": "VA" + } + ] }, { "linkId": "3.5.5", - "text": "Zip" + "text": "Zip", + "answer": [ + { + "valueString": "21454-2406" + } + ] } ] } @@ -822,7 +884,12 @@ "item": [ { "linkId": "4.1", - "text": "Same as Operating Physician?" + "text": "Same as Operating Physician?", + "answer": [ + { + "valueBoolean": false + } + ] }, { "linkId": "4.2", @@ -830,15 +897,30 @@ "item": [ { "linkId": "4.2.1", - "text": "First Name" + "text": "First Name", + "answer": [ + { + "valueString": "Ronald" + } + ] }, { "linkId": "4.2.2", - "text": "Last Name" + "text": "Last Name", + "answer": [ + { + "valueString": "Bone" + } + ] }, { "linkId": "4.2.3", - "text": "NPI" + "text": "NPI", + "answer": [ + { + "valueString": "9941339108" + } + ] }, { "linkId": "4.2.4", @@ -850,7 +932,12 @@ "item": [ { "linkId": "4.2.5.1", - "text": "Address1" + "text": "Address1", + "answer": [ + { + "valueString": "1003 Healthcare Drive" + } + ] }, { "linkId": "4.2.5.2", @@ -858,15 +945,30 @@ }, { "linkId": "4.2.5.3", - "text": "City" + "text": "City", + "answer": [ + { + "valueString": "Amherst" + } + ] }, { "linkId": "4.2.5.4", - "text": "State" + "text": "State", + "answer": [ + { + "valueString": "MA" + } + ] }, { "linkId": "4.2.5.5", - "text": "Zip" + "text": "Zip", + "answer": [ + { + "valueString": "01002" + } + ] } ] } diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json similarity index 84% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json index d47df6446..a097ea033 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1.json @@ -9,122 +9,122 @@ { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityName) for item (1.1): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 1.1: Error encountered evaluating expression (FacilityName) for item (1.1): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (FacilityNPI) for item (1.2): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 1.2: Error encountered evaluating expression (FacilityNPI) for item (1.2): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryFirstName) for item (2.1): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 2.1: Error encountered evaluating expression (BeneficiaryFirstName) for item (2.1): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryLastName) for item (2.2): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 2.2: Error encountered evaluating expression (BeneficiaryLastName) for item (2.2): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryDOB) for item (2.3): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 2.3: Error encountered evaluating expression (BeneficiaryDOB) for item (2.3): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryMedicareID) for item (2.4): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 2.4: Error encountered evaluating expression (BeneficiaryMedicareID) for item (2.4): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (BeneficiaryGender) for item (2.5): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 2.5: Error encountered evaluating expression (BeneficiaryGender) for item (2.5): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianFirstName) for item (3.1): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.1: Error encountered evaluating expression (OperatingPhysicianFirstName) for item (3.1): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianLastName) for item (3.2): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.2: Error encountered evaluating expression (OperatingPhysicianLastName) for item (3.2): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianNPI) for item (3.3): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.3: Error encountered evaluating expression (OperatingPhysicianNPI) for item (3.3): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddress1) for item (3.5.1): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.5.1: Error encountered evaluating expression (OperatingPhysicianAddress1) for item (3.5.1): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddress2) for item (3.5.2): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.5.2: Error encountered evaluating expression (OperatingPhysicianAddress2) for item (3.5.2): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressCity) for item (3.5.3): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.5.3: Error encountered evaluating expression (OperatingPhysicianAddressCity) for item (3.5.3): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressState) for item (3.5.4): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.5.4: Error encountered evaluating expression (OperatingPhysicianAddressState) for item (3.5.4): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (OperatingPhysicianAddressZip) for item (3.5.5): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 3.5.5: Error encountered evaluating expression (OperatingPhysicianAddressZip) for item (3.5.5): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianSame) for item (4.1): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.1: Error encountered evaluating expression (AttendingPhysicianSame) for item (4.1): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianFirstName) for item (4.2.1): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.1: Error encountered evaluating expression (AttendingPhysicianFirstName) for item (4.2.1): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianLastName) for item (4.2.2): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.2: Error encountered evaluating expression (AttendingPhysicianLastName) for item (4.2.2): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianNPI) for item (4.2.3): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.3: Error encountered evaluating expression (AttendingPhysicianNPI) for item (4.2.3): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddress1) for item (4.2.5.1): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.5.1: Error encountered evaluating expression (AttendingPhysicianAddress1) for item (4.2.5.1): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddress2) for item (4.2.5.2): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.5.2: Error encountered evaluating expression (AttendingPhysicianAddress2) for item (4.2.5.2): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressCity) for item (4.2.5.3): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.5.3: Error encountered evaluating expression (AttendingPhysicianAddressCity) for item (4.2.5.3): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressState) for item (4.2.5.4): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.5.4: Error encountered evaluating expression (AttendingPhysicianAddressState) for item (4.2.5.4): Could not load source for library noLibrary, version null." }, { "severity": "error", "code": "exception", - "diagnostics": "Error encountered evaluating expression (AttendingPhysicianAddressZip) for item (4.2.5.5): Could not load source for library noLibrary, version null." + "diagnostics": "Encountered error evaluating initial expression for item 4.2.5.5: Error encountered evaluating expression (AttendingPhysicianAddressZip) for item (4.2.5.5): Could not load source for library noLibrary, version null." } ] }, @@ -674,15 +674,9 @@ "valueReference": { "reference": "#populate-outcome-OutpatientPriorAuthorizationRequest-noLibrary-OPA-Patient1" } - }, - { - "url": "http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaireresponse-questionnaire", - "valueReference": { - "reference": "#OutpatientPriorAuthorizationRequest-noLibrary" - } } ], - "questionnaire": "http://hl7.org/fhir/Questionnaire/OutpatientPriorAuthorizationRequest-noLibrary", + "questionnaire": "#OutpatientPriorAuthorizationRequest-noLibrary", "status": "in-progress", "subject": { "reference": "Patient/OPA-Patient1" diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-QRSharonDecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-QRSharonDecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-QRSharonDecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-TherapyMonitoringRecommendation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-TherapyMonitoringRecommendation.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-TherapyMonitoringRecommendation.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-TherapyMonitoringRecommendation.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-cc-screening-pathway-definition-answers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-cc-screening-pathway-definition-answers.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-cc-screening-pathway-definition-answers.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-cc-screening-pathway-definition-answers.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-definition-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-definition-OPA-Patient1.json new file mode 100644 index 000000000..531b35376 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-definition-OPA-Patient1.json @@ -0,0 +1,31 @@ +{ + "resourceType": "QuestionnaireResponse", + "id": "definition-OPA-Patient1", + "questionnaire": "http://hl7.org/fhir/Questionnaire/definition", + "status": "in-progress", + "subject": { + "reference": "Patient/OPA-Patient1" + }, + "item": [ + { + "linkId": "1.1", + "definition": "http://hl7.org/fhir/Organization#Organization.name", + "text": "Name", + "answer": [ + { + "valueString": "Acme Clinic" + } + ] + }, + { + "linkId": "1.2", + "definition": "http://hl7.org/fhir/Organization#Organization.identifier", + "text": "NPI", + "answer": [ + { + "valueString": "1407071236" + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-demographics-qr.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/QuestionnaireResponse-demographics-qr.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-demographics-qr.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-mypain-no-url.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-mypain-no-url.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/dstu3/tests/QuestionnaireResponse-mypain-no-url.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-mypain-no-url.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-sigmoidoscopy-complication-casefeature-definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-sigmoidoscopy-complication-casefeature-definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-sigmoidoscopy-complication-casefeature-definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/QuestionnaireResponse-sigmoidoscopy-complication-casefeature-definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/ServiceRequest-OPA-ServiceRequest1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/ServiceRequest-OPA-ServiceRequest1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/tests/ServiceRequest-OPA-ServiceRequest1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/tests/ServiceRequest-OPA-ServiceRequest1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/vocabulary/CodeSystem-careplan-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/vocabulary/CodeSystem-careplan-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/vocabulary/CodeSystem-chf-codes.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/vocabulary/CodeSystem-chf-codes.json new file mode 100644 index 000000000..6701d0f9b --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/vocabulary/CodeSystem-chf-codes.json @@ -0,0 +1,111 @@ +{ + "resourceType": "CodeSystem", + "id": "chf-codes", + "text": { + "status": "generated", + "div": "

Generated Narrative: CodeSystem chf-codes

This case-sensitive code system http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes defines the following codes:

CodeDisplayDefinition
body-weight-change Body weight changeThe change in body weight between two body weight measurements, in kg. Typically captured daily.
net-intake-output Net intake/outputThe net intake and output, in Liters per day. Typically captured daily.
measure-jvp Measure jugular venous pressureMeasure jugular venous pressure in cmH2O
jvp Jugular venous pressureJugular venous pressure in cmH2O. May be loinc#8595-1?
egfr eGFR resulteGFR result in mol/mm/m2. Too many codes to choose from, needs clinical/terminological SME input
measure-egfr Measure eGFRMeasure eGFR, could not identify SNOMED code for this
lasix-iv LASIX IVLASIX IV
lasix-po LASIX POLASIX PO
cardiology-consultation Cardiology ConsultationCardiology consultation
" + }, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "shareable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "computable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability", + "valueCode": "publishable" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/cqf-knowledgeRepresentationLevel", + "valueCode": "structured" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", + "valueCode": "cds" + } + ], + "url": "http://hl7.org/fhir/uv/cpg/CodeSystem/chf-codes", + "version": "2.0.0-draft", + "name": "CHFCodes", + "title": "CHF Codes", + "status": "active", + "experimental": true, + "date": "2024-08-25T03:33:21+00:00", + "publisher": "HL7 International / Clinical Decision Support", + "contact": [ + { + "name": "HL7 International / Clinical Decision Support", + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/dss" + } + ] + } + ], + "description": "Codes used in the congestive heart failure pathway. Ideally these shouldn't exist, but where I couldn't find an appropriate code in a standard terminology, I defined codes here.", + "jurisdiction": [ + { + "coding": [ + { + "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", + "code": "001", + "display": "World" + } + ] + } + ], + "caseSensitive": true, + "content": "complete", + "count": 9, + "concept": [ + { + "code": "body-weight-change", + "display": "Body weight change", + "definition": "The change in body weight between two body weight measurements, in kg. Typically captured daily." + }, + { + "code": "net-intake-output", + "display": "Net intake/output", + "definition": "The net intake and output, in Liters per day. Typically captured daily." + }, + { + "code": "measure-jvp", + "display": "Measure jugular venous pressure", + "definition": "Measure jugular venous pressure in cmH2O" + }, + { + "code": "jvp", + "display": "Jugular venous pressure", + "definition": "Jugular venous pressure in cmH2O. May be loinc#8595-1?" + }, + { + "code": "egfr", + "display": "eGFR result", + "definition": "eGFR result in mol/mm/m2. Too many codes to choose from, needs clinical/terminological SME input" + }, + { + "code": "measure-egfr", + "display": "Measure eGFR", + "definition": "Measure eGFR, could not identify SNOMED code for this" + }, + { + "code": "lasix-iv", + "display": "LASIX IV", + "definition": "LASIX IV" + }, + { + "code": "lasix-po", + "display": "LASIX PO", + "definition": "LASIX PO" + }, + { + "code": "cardiology-consultation", + "display": "Cardiology Consultation", + "definition": "Cardiology consultation" + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/vocabulary/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/vocabulary/ValueSet-AdministrativeGender.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/vocabulary/ValueSet-AdministrativeGender.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r4/vocabulary/ValueSet-AdministrativeGender.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/child-routine-visit/child_routine_visit_bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/child-routine-visit/child_routine_visit_bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/child-routine-visit/child_routine_visit_bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/child-routine-visit/child_routine_visit_bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/child-routine-visit/child_routine_visit_patient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/child-routine-visit/child_routine_visit_patient.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/child-routine-visit/child_routine_visit_patient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/child-routine-visit/child_routine_visit_patient.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/child-routine-visit/child_routine_visit_plan_definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/child-routine-visit/child_routine_visit_plan_definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/child-routine-visit/child_routine_visit_plan_definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/child-routine-visit/child_routine_visit_plan_definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/FHIRHelpers.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/cql/FHIRHelpers.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/FHIRHelpers.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/OutpatientPriorAuthorizationPrepopulation-Errors.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/OutpatientPriorAuthorizationPrepopulation.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/cql/TestActivityDefinition.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/TestActivityDefinition.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/cql/TestActivityDefinition.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/cql/TestActivityDefinition.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/extract-questionnaireresponse/bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/extract-questionnaireresponse/bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/extract-questionnaireresponse/bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/extract-questionnaireresponse/bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/extract-questionnaireresponse/patient-data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/extract-questionnaireresponse/patient-data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/extract-questionnaireresponse/patient-data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/extract-questionnaireresponse/patient-data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/hello-world/hello-world-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/hello-world/hello-world-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/hello-world/hello-world-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/hello-world/hello-world-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/hello-world/hello-world-patient-data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/hello-world/hello-world-patient-data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/hello-world/hello-world-patient-data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/hello-world/hello-world-patient-data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/hello-world/hello-world-patient-view-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/hello-world/hello-world-patient-view-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/hello-world/hello-world-patient-view-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/hello-world/hello-world-patient-view-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSCommonConfig.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10Common.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSREC10PatientView.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/cql/OpioidCDSRoutines.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/ActivityDefinition-opioidcds-urine-screening-request.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSCommonConfig.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10Common.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSREC10PatientView.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/Library-OpioidCDSRoutines.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/resources/PlanDefinition-opioidcds-10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Bundle-opioid-Rec10-patient-view.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-context.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/MedicationRequest-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch-4.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-POS-Cocaine-drugs-prefetch.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Observation-example-rec-10-patient-view-illicit-drugs-POS-Opiate-prefetch-obs2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/tests/Patient-example-rec-10-patient-view-POS-Cocaine-drugs.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/vocabulary/CodeSystem/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/dstu3/vocabulary/CodeSystem/CodeSystem-careplan-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/CodeSystem/CodeSystem-careplan-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-benzodiazepine-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-buprenorphine-and-methadone-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cdc-malignant-cancer-conditions.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-cocaine-urine-drug-screening-tests.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-clinical-status-active.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-encounter-diagnosis-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-problem-list-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-condition-us-core-health-concern-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-documenting-substance-misuse.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-conditions-likely-terminal-for-opioid-prescribing.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-extended-release-opioid-with-ambulatory-misuse-potential.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-disposition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-finding.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-hospice-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-limited-life-expectancy-conditions.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-category-community.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-medicationrequest-status-active.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-naloxone-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-opioid-drug-urine-screening.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-non-synthetic-opioid-medications.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-laboratory.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-observation-category-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-office-visit.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-oncology-specialty-designations.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-analgesics-with-ambulatory-misuse-potential.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-counseling-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-drug-urine-screening.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-assessment-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-opioid-misuse-disorders.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-management-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pain-treatment-plan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-data-reviewed-finding.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-pdmp-review-procedure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-phencyclidine-urine-drug-screening-tests.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-sickle-cell-diseases.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-substance-misuse-behavioral-counseling.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/opioid-Rec10-patient-view/vocabulary/ValueSet/ValueSet-therapies-indicating-end-of-life-care.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/ASLPConcepts.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/ASLPConcepts.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/ASLPConcepts.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/ASLPConcepts.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/ASLPDataElements.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/ASLPDataElements.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/ASLPDataElements.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/ASLPDataElements.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/Common.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/Common.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/Common.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/Common.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/FHIRCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/FHIRCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/FHIRCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/FHIRCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/FHIRHelpers.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/FHIRHelpers.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/FHIRHelpers.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/FHIRHelpers.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/QICoreCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/QICoreCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/QICoreCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/QICoreCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/SDHCommon.cql b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/SDHCommon.cql similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/cql/SDHCommon.cql rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/cql/SDHCommon.cql diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-ASLPConcepts.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-ASLPConcepts.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-ASLPConcepts.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-ASLPConcepts.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-ASLPDataElements.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-ASLPDataElements.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Library-ASLPDataElements.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-ASLPDataElements.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-Common.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-Common.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-Common.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-Common.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-FHIRCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-FHIRCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-FHIRCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-FHIRCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-FHIRHelpers.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-FHIRHelpers.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-FHIRHelpers.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-QICoreCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-QICoreCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-QICoreCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-QICoreCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-SDHCommon.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-SDHCommon.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/Library-SDHCommon.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Library-SDHCommon.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/PlanDefinition-ASLPA1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/PlanDefinition-ASLPA1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/PlanDefinition-ASLPA1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/PlanDefinition-ASLPA1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Questionnaire-ASLPA1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Questionnaire-ASLPA1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/resources/Questionnaire-ASLPA1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/Questionnaire-ASLPA1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-bmi.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-bmi.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-bmi.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-bmi.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-diagnosis-of-obstructive-sleep-apnea.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-height.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-height.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-height.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-height.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-diabetes.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-history-of-hypertension.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-neck-circumference.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-servicerequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-sleep-study-order.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-weight.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-weight.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/resources/StructureDefinition-aslp-weight.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/resources/StructureDefinition-aslp-weight.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Condition-Diabetes.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Condition-Diabetes.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Condition-Diabetes.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Condition-Diabetes.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Condition-Hypertension.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Condition-Hypertension.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Condition-Hypertension.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Condition-Hypertension.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Condition-SleepApnea.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Condition-SleepApnea.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Condition-SleepApnea.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Condition-SleepApnea.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Coverage-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Coverage-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Coverage-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Coverage-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-BMI.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-BMI.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-BMI.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-BMI.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-BloodPressure.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-BloodPressure.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-BloodPressure.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-BloodPressure.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Glucose.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Glucose.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Glucose.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Glucose.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Height.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Height.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Height.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Height.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Neck.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Neck.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Neck.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Neck.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Weight.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Weight.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Observation-Weight.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Observation-Weight.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Patient-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Patient-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Patient-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Patient-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Practitioner-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Practitioner-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/Practitioner-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Practitioner-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Questionnaire-ASLPA1-positive.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Questionnaire-ASLPA1-positive.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/Questionnaire-ASLPA1-positive.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/Questionnaire-ASLPA1-positive.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/QuestionnaireResponse-ASLPA1-positive-response.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/ServiceRequest-SleepStudy.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/ServiceRequest-SleepStudy.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/ServiceRequest-SleepStudy.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/ServiceRequest-SleepStudy.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/ServiceRequest-SleepStudy2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/ServiceRequest-SleepStudy2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/tests/ServiceRequest-SleepStudy2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/tests/ServiceRequest-SleepStudy2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-active-condition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-active-condition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-active-condition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-active-condition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de1-codes-grouper.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de17.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r4/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/pa-aslp/vocabulary/ValueSet-aslp-a1-de9.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-bundle-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-bundle-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-bundle-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-bundle-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-content-bundle-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-content-bundle-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-content-bundle-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-content-bundle-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-content-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-content-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-content-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-content-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-patient-data.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-patient-data.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/prepopulate/prepopulate-patient-data.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/prepopulate/prepopulate-patient-data.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-RecommendImmunizationActivity.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-RecommendImmunizationActivity.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-RecommendImmunizationActivity.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-RecommendImmunizationActivity.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/ActivityDefinition-SendMessageActivity.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-SendMessageActivity.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/ActivityDefinition-SendMessageActivity.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-SendMessageActivity.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-appointment-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-appointment-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-appointment-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-appointment-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-appointmentresponse-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-appointmentresponse-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-appointmentresponse-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-appointmentresponse-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-careplan-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-careplan-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-careplan-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-careplan-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-claim-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-claim-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-claim-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-claim-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-communication-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-communication-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-communication-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-communication-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-communicationrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-communicationrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-communicationrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-communicationrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/ActivityDefinition-complete-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-complete-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/ActivityDefinition-complete-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-complete-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-coverageeligibilityrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-coverageeligibilityrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-coverageeligibilityrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-coverageeligibilityrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-devicerequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-devicerequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-devicerequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-devicerequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-diagnosticreport-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-diagnosticreport-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-diagnosticreport-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-diagnosticreport-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-enrollmentrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-enrollmentrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-enrollmentrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-enrollmentrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-immunizationrecommendation-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-immunizationrecommendation-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-immunizationrecommendation-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-immunizationrecommendation-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-medicationrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-medicationrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-medicationrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-medicationrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-nutritionorder-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-nutritionorder-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-nutritionorder-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-nutritionorder-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-procedure-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-procedure-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-procedure-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-procedure-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-requestorchestration-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-requestorchestration-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-requestorchestration-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-requestorchestration-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-servicerequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-servicerequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-servicerequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-servicerequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-supplyrequest-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-supplyrequest-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-supplyrequest-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-supplyrequest-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-task-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-task-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-task-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-task-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-transport-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-transport-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-transport-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-transport-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-unsupported-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-unsupported-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-unsupported-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-unsupported-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-visionprescription-test.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-visionprescription-test.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/ActivityDefinition-visionprescription-test.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/ActivityDefinition-visionprescription-test.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Library-FHIRHelpers.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-FHIRHelpers.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Library-FHIRHelpers.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-FHIRHelpers.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-OutpatientPriorAuthorizationPrepopulation.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/Library-TestActivityDefinition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-TestActivityDefinition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/resources/Library-TestActivityDefinition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Library-TestActivityDefinition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-DischargeInstructionsPlan.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-DischargeInstructionsPlan.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-DischargeInstructionsPlan.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-DischargeInstructionsPlan.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-generate-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-generate-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-generate-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-prepopulate-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-prepopulate-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-prepopulate-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-prepopulate-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-prepopulate.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-prepopulate.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-prepopulate.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-prepopulate.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-route-one-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-route-one-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-route-one-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-route-one-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-route-one.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-route-one.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/PlanDefinition-route-one.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/PlanDefinition-route-one.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-NumericExtract.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-NumericExtract.json new file mode 100644 index 000000000..acc7299b5 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-NumericExtract.json @@ -0,0 +1,88 @@ +{ + "resourceType": "Questionnaire", + "id": "NumericExtract", + "url": "http://gefyra.de/fhir/Questionnaire/NumericExtract", + "title": "Test case for numeric extraction using HAPI's $extract operation", + "status": "active", + "item": [ + { + "linkId": "0", + "text": "Persönliche Angaben", + "type": "group", + "required": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "cm", + "system": "http://unitsofmeasure.org", + "display": "Zentimeter" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", + "valueDuration": { + "value": 1, + "code": "a", + "system": "http://unitsofmeasure.org" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract", + "valueBoolean": true + } + ], + "linkId": "baseDataDecimalHeight", + "code": [ + { + "code": "1153637007", + "system": "http://snomed.info/sct", + "display": "Body height measure (observable entity)" + } + ], + "text": "Größe (in cm):", + "type": "integer", + "required": true, + "maxLength": 3 + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "code": "kg", + "system": "http://unitsofmeasure.org", + "display": "Kilogramm" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", + "valueDuration": { + "value": 1, + "code": "a", + "system": "http://unitsofmeasure.org" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract", + "valueBoolean": true + } + ], + "linkId": "baseDataDecimalWeight", + "code": [ + { + "code": "27113001", + "system": "http://snomed.info/sct", + "display": "Body weight (observable entity)" + } + ], + "text": "Gewicht (in kg):", + "type": "decimal", + "required": true + } + ] + } + ] +} diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationPrepopulation-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-Errors.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-OutpatientPriorAuthorizationRequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-definition.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-definition.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-definition.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-definition.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-demographics.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-demographics.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-demographics.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-demographics.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-invalid-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-invalid-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/resources/Questionnaire-invalid-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-invalid-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-mypain-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-mypain-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/resources/Questionnaire-mypain-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-mypain-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-questionnaire-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json new file mode 100644 index 000000000..40e418f41 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/Questionnaire-questionnaire-sdc-test-fhirpath-prepop-initialexpression.json @@ -0,0 +1,264 @@ +{ + "resourceType": "Questionnaire", + "id": "questionnaire-sdc-test-fhirpath-prepop-initialexpression", + "meta": { + "profile": [ + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-pop-exp" + ] + }, + "extension": [ + { + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "patient", + "display": "Patient" + } + }, + { + "url": "type", + "valueCode": "Patient" + }, + { + "url": "description", + "valueString": "The patient that is to be used to pre-populate the form" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext" + }, + { + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "user", + "display": "User" + } + }, + { + "url": "type", + "valueCode": "Practitioner" + }, + { + "url": "description", + "valueString": "The practitioner that is to be used to pre-populate the form" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", + "valueCode": "fhir" + } + ], + "url": "http://hl7.org/fhir/uv/sdc/Questionnaire/questionnaire-sdc-test-fhirpath-prepop-initialexpression", + "version": "3.0.0", + "name": "FhirPathPrepopSimple", + "title": "Questionnaire Pre-Population", + "status": "active", + "experimental": true, + "subjectType": [ + "Patient" + ], + "date": "2023-12-07T23:07:45+00:00", + "publisher": "HL7 International / FHIR Infrastructure", + "contact": [ + { + "name": "HL7 International / FHIR Infrastructure", + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg" + } + ] + }, + { + "telecom": [ + { + "system": "url", + "value": "http://www.hl7.org/Special/committees/fiwg" + } + ] + } + ], + "description": "FhirPath based prepopulation simple example", + "jurisdiction": [ + { + "coding": [ + { + "system": "http://unstats.un.org/unsd/methods/m49/m49.htm", + "code": "001", + "display": "World" + } + ] + } + ], + "item": [ + { + "linkId": "grp", + "type": "group", + "item": [ + { + "linkId": "part-details", + "text": "Participant details", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "participant-id", + "text": "Participant ID number", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(system='http://ns.electronichealth.net.au/id/medicare-number').value.first()" + } + } + ], + "linkId": "medicare-number", + "text": "Medicare number", + "type": "string", + "required": true + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(system='http://ns.electronichealth.net.au/id/dva').value.first()" + } + } + ], + "linkId": "dva-number", + "text": "DVA number", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.name.first().family" + } + } + ], + "linkId": "family-name", + "text": "Family name", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.name.first().given.first()" + } + } + ], + "linkId": "given-names", + "text": "Given name(s)", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.birthDate" + } + } + ], + "linkId": "dob", + "text": "Date of birth", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.telecom.where(system='phone').select(($this.where(use='mobile') | $this.where(use='home')).first().value)" + } + } + ], + "linkId": "contact-number", + "text": "Contact telephone number", + "type": "string", + "item": [ + { + "linkId": "contact-number-tooltip", + "text": "(mobile or land line including area code)", + "type": "text" + } + ] + } + ] + }, + { + "linkId": "provider-details", + "text": "Provider details", + "type": "group", + "repeats": false, + "readOnly": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%user.identifier.where(system='http://ns.electronichealth.net.au/id/hi/prn').first().value" + } + } + ], + "linkId": "provider-number", + "text": "Provider number for payment", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "today()" + } + } + ], + "linkId": "date-consult", + "text": "Date of consultation", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%user.name.first().select(given.first() + ' ' + family)" + } + } + ], + "linkId": "provider-name", + "text": "Name", + "type": "string", + "readOnly": true + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-PAClaim.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-PAClaim.json similarity index 99% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-PAClaim.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-PAClaim.json index b87b5e2a7..fe276520d 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-PAClaim.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-PAClaim.json @@ -27,7 +27,7 @@ } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/PAClaim", - "version": "4.3.0", + "version": "5.0.0", "name": "PAClaim", "title": "Prior Auth Claim", "status": "draft", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneAttending.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneAttending.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneAttending.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneAttending.json index 4125ae3a5..0b9cf7a5d 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneAttending.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneAttending.json @@ -27,7 +27,7 @@ } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneAttending", - "version": "4.3.0", + "version": "5.0.0", "name": "RouteOneAttendingPractitioner", "title": "Attending Physician Information", "status": "draft", @@ -1314,16 +1314,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.given", "path": "Practitioner.name.given", "label": "First Name", @@ -1335,16 +1325,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.family", "path": "Practitioner.name.family", "label": "Last Name", @@ -1393,16 +1373,6 @@ "fixedUri": "http://npi.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:NPI.value", "path": "Practitioner.identifier.value", "label": "NPI", @@ -1434,16 +1404,6 @@ "fixedUri": "http://ptan.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "AttendingPhysicianPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:PTAN.value", "path": "Practitioner.identifier.value", "label": "PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOperating.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOperating.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOperating.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOperating.json index 6090434a0..461500fed 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOneOperating.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOperating.json @@ -27,7 +27,7 @@ } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOperating", - "version": "4.3.0", + "version": "5.0.0", "name": "RouteOneOperatingPractitioner", "title": "Operation Physician Information", "status": "draft", @@ -1314,16 +1314,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.given", "path": "Practitioner.name.given", "label": "First Name", @@ -1335,16 +1325,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.name.family", "path": "Practitioner.name.family", "label": "Last Name", @@ -1393,16 +1373,6 @@ "fixedUri": "http://npi.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:NPI.value", "path": "Practitioner.identifier.value", "label": "NPI", @@ -1434,16 +1404,6 @@ "fixedUri": "http://ptan.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "OperatingPhysicianPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Practitioner.identifier:PTAN.value", "path": "Practitioner.identifier.value", "label": "PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOrganization-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOrganization-noLibrary.json similarity index 98% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOrganization-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOrganization-noLibrary.json index 776cfbee2..90273f02a 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/resources/StructureDefinition-RouteOneOrganization-noLibrary.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOrganization-noLibrary.json @@ -27,7 +27,7 @@ } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization", - "version": "4.3.0", + "version": "5.0.0", "name": "RouteOneOrganization", "title": "Facility Information", "status": "draft", @@ -1337,16 +1337,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.name", "path": "Organization.name", "label": "Name", @@ -1394,16 +1384,6 @@ "fixedUri": "http://npi.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.identifier:FacilityNPI.value", "path": "Organization.identifier.value", "label": "Facility NPI", @@ -1435,16 +1415,6 @@ "fixedUri": "http://ptan.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.identifier:FacilityPTAN.value", "path": "Organization.identifier.value", "label": "Facility PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOrganization.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOrganization.json index 59b073356..301443ad9 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/resources/StructureDefinition-RouteOneOrganization-noLibrary.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOneOrganization.json @@ -1,6 +1,6 @@ { "resourceType": "StructureDefinition", - "id": "RouteOneOrganization-noLibrary", + "id": "RouteOneOrganization", "meta": { "lastUpdated": "2022-05-28T12:47:40.239+10:00" }, @@ -26,8 +26,8 @@ "valueCode": "pa" } ], - "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization-noLibrary", - "version": "4.3.0", + "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOneOrganization", + "version": "5.0.0", "name": "RouteOneOrganization", "title": "Facility Information", "status": "draft", @@ -1337,16 +1337,6 @@ "differential": { "element": [ { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.name", "path": "Organization.name", "label": "Name", @@ -1394,16 +1384,6 @@ "fixedUri": "http://npi.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityNPI", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.identifier:FacilityNPI.value", "path": "Organization.identifier.value", "label": "Facility NPI", @@ -1435,16 +1415,6 @@ "fixedUri": "http://ptan.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "FacilityPTAN", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/noLibrary" - } - } - ], "id": "Organization.identifier:FacilityPTAN.value", "path": "Organization.identifier.value", "label": "Facility PTAN", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOnePatient.json similarity index 97% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOnePatient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOnePatient.json index 4f68f109d..ba6fa3089 100644 --- a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/resources/StructureDefinition-RouteOnePatient.json +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/resources/StructureDefinition-RouteOnePatient.json @@ -28,6 +28,14 @@ { "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", "valueCode": "pa" + }, + { + "url": "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression", + "valueExpression": { + "language": "text/cql.identifier", + "expression": "Patient", + "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" + } } ], "url": "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/RouteOnePatient", @@ -58,7 +66,7 @@ ], "description": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.", "purpose": "Tracking patient is the center of the healthcare process.", - "fhirVersion": "4.3.0", + "fhirVersion": "5.0.0", "mapping": [ { "identity": "rim", @@ -2304,16 +2312,16 @@ "differential": { "element": [ { - "extension": [ + "id": "Patient.name", + "path": "Patient.name", + "label": "Patient Name", + "type": [ { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryFirstName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } + "code": "HumanName" } - ], + ] + }, + { "id": "Patient.name.given", "path": "Patient.name.given", "label": "First Name", @@ -2325,16 +2333,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryLastName", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.name.family", "path": "Patient.name.family", "label": "Last Name", @@ -2346,16 +2344,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryDOB", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.birthDate", "path": "Patient.birthDate", "label": "Date of Birth", @@ -2367,16 +2355,6 @@ ] }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryGender", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.gender", "path": "Patient.gender", "label": "Gender", @@ -2429,16 +2407,6 @@ "fixedUri": "http://medicare.org" }, { - "extension": [ - { - "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression", - "valueExpression": { - "language": "text/cql.identifier", - "expression": "BeneficiaryMedicareID", - "reference": "http://somewhere.org/fhir/uv/mycontentig/Library/OutpatientPriorAuthorizationPrepopulation" - } - } - ], "id": "Patient.identifier:MedicareID.value", "path": "Patient.identifier.value", "label": "Medicare ID", diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/NotReportableBundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/NotReportableBundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/NotReportableBundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/NotReportableBundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/ReportableBundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/ReportableBundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/ReportableBundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/ReportableBundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/RuleFilters-1.0.0-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/RuleFilters-1.0.0-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/RuleFilters-1.0.0-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/RuleFilters-1.0.0-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/tests-NotReportable-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/tests-NotReportable-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/tests-NotReportable-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/tests-NotReportable-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/tests-Reportable-bundle.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/tests-Reportable-bundle.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/rule-filters/tests-Reportable-bundle.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/rule-filters/tests-Reportable-bundle.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-OutpatientPriorAuthorizationRequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-QRSharonDecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-QRSharonDecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-QRSharonDecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-demographics-qr.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-demographics-qr.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-demographics-qr.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/Bundle-extract-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-extract-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Bundle-generate-questionnaire.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-generate-questionnaire.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Bundle-generate-questionnaire.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-generate-questionnaire.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Bundle-prepopulate-noLibrary.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-prepopulate-noLibrary.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Bundle-prepopulate-noLibrary.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-prepopulate-noLibrary.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Bundle-prepopulate.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-prepopulate.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Bundle-prepopulate.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Bundle-prepopulate.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Claim-OPA-Claim1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Claim-OPA-Claim1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Claim-OPA-Claim1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Claim-OPA-Claim1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Condition-OPA-Condition1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Condition-OPA-Condition1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Condition-OPA-Condition1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Condition-OPA-Condition1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Coverage-OPA-Coverage1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Coverage-OPA-Coverage1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Coverage-OPA-Coverage1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Coverage-OPA-Coverage1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Location-OPA-Location1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Location-OPA-Location1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Location-OPA-Location1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Location-OPA-Location1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Organization-OPA-PayorOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Organization-OPA-PayorOrganization1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Organization-OPA-PayorOrganization1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Organization-OPA-PayorOrganization1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Organization-OPA-ProviderOrganization1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Organization-OPA-ProviderOrganization1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Organization-OPA-ProviderOrganization1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Organization-OPA-ProviderOrganization1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Patient-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Patient-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Patient-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Patient-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/tests/Patient-patient-1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Patient-patient-1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r5/tests/Patient-patient-1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Patient-patient-1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-sharondecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Patient-sharondecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/Patient-sharondecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Patient-sharondecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Practitioner-OPA-AttendingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Practitioner-OPA-AttendingPhysician1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Practitioner-OPA-AttendingPhysician1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Practitioner-OPA-AttendingPhysician1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Practitioner-OPA-OperatingPhysician1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Practitioner-OPA-OperatingPhysician1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Practitioner-OPA-OperatingPhysician1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Practitioner-OPA-OperatingPhysician1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Procedure-OPA-Procedure1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Procedure-OPA-Procedure1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Procedure-OPA-Procedure1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Procedure-OPA-Procedure1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Procedure-OPA-Procedure2.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Procedure-OPA-Procedure2.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/Procedure-OPA-Procedure2.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Procedure-OPA-Procedure2.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Questionnaire-RouteOnePatient.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Questionnaire-RouteOnePatient.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaire/r5/tests/Questionnaire-RouteOnePatient.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/Questionnaire-RouteOnePatient.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-NumericExtract.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-NumericExtract.json new file mode 100644 index 000000000..e679baf25 --- /dev/null +++ b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-NumericExtract.json @@ -0,0 +1,50 @@ +{ + "resourceType": "QuestionnaireResponse", + "id": "NumericExtract", + "meta": { + "versionId": "1", + "lastUpdated": "2024-06-17T14:46:20.415+00:00", + "source": "#fQ4sBFboob3nlUiT", + "profile": [ + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse|3.0" + ], + "tag": [ + { + "code": "lformsVersion: 36.1.3" + } + ] + }, + "questionnaire": "http://gefyra.de/fhir/Questionnaire/NumericExtract", + "status": "completed", + "subject": { + "reference": "Patient/360", + "display": "Simone Heckmann" + }, + "authored": "2024-06-17T14:46:03.324Z", + "item": [ + { + "linkId": "0", + "text": "Persönliche Angaben", + "item": [ + { + "linkId": "baseDataDecimalHeight", + "text": "Größe (in cm):", + "answer": [ + { + "valueInteger": 123 + } + ] + }, + { + "linkId": "baseDataDecimalWeight", + "text": "Gewicht (in kg):", + "answer": [ + { + "valueDecimal": 23.5 + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest-OPA-Patient1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-OutpatientPriorAuthorizationRequest.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-QRSharonDecision.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-QRSharonDecision.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-QRSharonDecision.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-QRSharonDecision.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-demographics-qr.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-demographics-qr.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-demographics-qr.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-demographics-qr.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-mypain-no-url.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-mypain-no-url.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r4/tests/QuestionnaireResponse-mypain-no-url.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-mypain-no-url.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/questionnaireresponse/r5/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/QuestionnaireResponse-sdc-profile-example-multi-subject.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/ServiceRequest-OPA-ServiceRequest1.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/ServiceRequest-OPA-ServiceRequest1.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/tests/ServiceRequest-OPA-ServiceRequest1.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/tests/ServiceRequest-OPA-ServiceRequest1.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/CodeSystem-careplan-category.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/vocabulary/CodeSystem-careplan-category.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r4/opioid-Rec10-patient-view/vocabulary/CodeSystem-careplan-category.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/vocabulary/CodeSystem-careplan-category.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/vocabulary/ValueSet/ValueSet-AdministrativeGender.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/vocabulary/ValueSet-AdministrativeGender.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/plandefinition/r5/vocabulary/ValueSet/ValueSet-AdministrativeGender.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/vocabulary/ValueSet-AdministrativeGender.json diff --git a/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/vocabulary/ValueSet/ValueSet-birthsex.json b/cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/vocabulary/ValueSet-birthsex.json similarity index 100% rename from cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/activitydefinition/r4/vocabulary/ValueSet/ValueSet-birthsex.json rename to cqf-fhir-cr/src/test/resources/org/opencds/cqf/fhir/cr/shared/r5/vocabulary/ValueSet-birthsex.json diff --git a/cqf-fhir-utility/pom.xml b/cqf-fhir-utility/pom.xml index 80a490144..39ae073fe 100644 --- a/cqf-fhir-utility/pom.xml +++ b/cqf-fhir-utility/pom.xml @@ -29,6 +29,14 @@ info.cqframework engine-fhir + + info.cqframework + cql-to-elm + + + info.cqframework + elm-fhir + ca.uhn.hapi.fhir hapi-fhir-base diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/BundleHelper.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/BundleHelper.java index 30d7f6a7a..b7cab7a4f 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/BundleHelper.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/BundleHelper.java @@ -400,12 +400,32 @@ public static IBaseBundle newBundle(FhirVersionEnum fhirVersion, String id, Stri } /** - * Returns a new entry element with the Resource + * Returns a new entry element * @param fhirVersion + * @return + */ + public static IBaseBackboneElement newEntry(FhirVersionEnum fhirVersion) { + switch (fhirVersion) { + case DSTU3: + return new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent(); + case R4: + return new org.hl7.fhir.r4.model.Bundle.BundleEntryComponent(); + case R5: + return new org.hl7.fhir.r5.model.Bundle.BundleEntryComponent(); + + default: + throw new IllegalArgumentException( + String.format("Unsupported version of FHIR: %s", fhirVersion.getFhirVersionString())); + } + } + + /** + * Returns a new entry element with the Resource * @param resource * @return */ - public static IBaseBackboneElement newEntryWithResource(FhirVersionEnum fhirVersion, IBaseResource resource) { + public static IBaseBackboneElement newEntryWithResource(IBaseResource resource) { + var fhirVersion = resource.getStructureFhirVersionEnum(); switch (fhirVersion) { case DSTU3: return new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent() @@ -584,7 +604,7 @@ public static IBaseBackboneElement setRequestIfNoneExist( public static IBaseBackboneElement setEntryFullUrl( FhirVersionEnum fhirVersion, IBaseBackboneElement entry, String fullUrl) { if (entry == null) { - entry = newEntryWithResource(fhirVersion, null); + entry = newEntry(fhirVersion); } switch (fhirVersion) { case DSTU3: @@ -610,7 +630,7 @@ public static IBaseBackboneElement setEntryFullUrl( public static IBaseBackboneElement setEntryRequest( FhirVersionEnum fhirVersion, IBaseBackboneElement entry, IBaseBackboneElement request) { if (entry == null) { - entry = newEntryWithResource(fhirVersion, null); + entry = newEntry(fhirVersion); } if (request == null) { request = newRequest(fhirVersion, null); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/Constants.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/Constants.java index 3a68d3728..e89008597 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/Constants.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/Constants.java @@ -32,6 +32,7 @@ private Constants() {} "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author"; public static final String QUESTIONNAIRE_REFERENCE_PROFILE = "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceProfile"; + public static final String QUESTIONNAIRE_UNIT = "http://hl7.org/fhir/StructureDefinition/questionnaire-unit"; public static final String QUESTIONNAIRE_UNIT_VALUE_SET = "http://hl7.org/fhir/StructureDefinition/questionnaire-unitValueSet"; @@ -41,6 +42,8 @@ private Constants() {} "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-assertionExpression"; public static final String CPG_FEATURE_EXPRESSION = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpression"; + public static final String CPG_FEATURE_EXPRESSION_ELEMENT = + "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-featureExpressionElement"; public static final String CPG_INFERENCE_EXPRESSION = "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-inferenceExpression"; public static final String CPG_KNOWLEDGE_CAPABILITY = @@ -119,6 +122,15 @@ private Constants() {} public static final String SDC_CATEGORY_SURVEY = "survey"; public static final String SDC_QUESTIONNAIRE_LAUNCH_CONTEXT = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext"; + + public static enum SDC_QUESTIONNAIRE_LAUNCH_CONTEXT_CODE { + PATIENT, + ENCOUNTER, + LOCATION, + USER, + STUDY + } + public static final String SDC_QUESTIONNAIRE_SUB_QUESTIONNAIRE = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"; public static final String SDC_QUESTIONNAIRE_CALCULATED_EXPRESSION = diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/CqfExpression.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/CqfExpression.java index 529a9ff99..e8c709841 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/CqfExpression.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/CqfExpression.java @@ -2,6 +2,7 @@ import ca.uhn.fhir.context.FhirVersionEnum; import org.hl7.fhir.instance.model.api.IBaseExtension; +import org.hl7.fhir.instance.model.api.ICompositeType; /** * This class is used to contain the various properties of a CqfExpression with an alternate so that @@ -15,6 +16,7 @@ public class CqfExpression { private String altLanguage; private String altExpression; private String altLibraryUrl; + private String name; public static CqfExpression of(IBaseExtension extension, String defaultLibraryUrl) { if (extension == null) { @@ -32,7 +34,7 @@ public static CqfExpression of(IBaseExtension extension, String defaultLib switch (version) { case DSTU3: return new CqfExpression( - "text/cql.expression", extension.getValue().toString(), defaultLibraryUrl); + "text/cql-expression", extension.getValue().toString(), defaultLibraryUrl); case R4: return CqfExpression.of((org.hl7.fhir.r4.model.Expression) extension.getValue(), defaultLibraryUrl); case R5: @@ -56,7 +58,8 @@ public static CqfExpression of(org.hl7.fhir.r4.model.Expression expression, Stri expression.hasReference() ? expression.getReference() : defaultLibraryUrl, altExpression != null ? altExpression.getLanguage() : null, altExpression != null ? altExpression.getExpression() : null, - altExpression != null && altExpression.hasReference() ? altExpression.getReference() : null); + altExpression != null && altExpression.hasReference() ? altExpression.getReference() : null, + expression.getName()); } public static CqfExpression of(org.hl7.fhir.r5.model.Expression expression, String defaultLibraryUrl) { @@ -72,13 +75,14 @@ public static CqfExpression of(org.hl7.fhir.r5.model.Expression expression, Stri expression.hasReference() ? expression.getReference() : defaultLibraryUrl, altExpression != null ? altExpression.getLanguage() : null, altExpression != null ? altExpression.getExpression() : null, - altExpression != null && altExpression.hasReference() ? altExpression.getReference() : null); + altExpression != null && altExpression.hasReference() ? altExpression.getReference() : null, + expression.getName()); } public CqfExpression() {} public CqfExpression(String language, String expression, String libraryUrl) { - this(language, expression, libraryUrl, null, null, null); + this(language, expression, libraryUrl, null, null, null, null); } public CqfExpression( @@ -87,13 +91,24 @@ public CqfExpression( String libraryUrl, String altLanguage, String altExpression, - String altLibraryUrl) { + String altLibraryUrl, + String name) { this.language = language; this.expression = expression; this.libraryUrl = libraryUrl; this.altLanguage = altLanguage; this.altExpression = altExpression; this.altLibraryUrl = altLibraryUrl; + this.name = name; + } + + public String getName() { + return name; + } + + public CqfExpression setName(String name) { + this.name = name; + return this; } public String getLanguage() { @@ -149,4 +164,24 @@ public CqfExpression setAltLibraryUrl(String altLibraryUrl) { this.altLibraryUrl = altLibraryUrl; return this; } + + public ICompositeType toExpressionType(FhirVersionEnum fhirVersion) { + switch (fhirVersion) { + case R4: + return new org.hl7.fhir.r4.model.Expression() + .setLanguage(language) + .setExpression(expression) + .setReference(libraryUrl) + .setName(name); + case R5: + return new org.hl7.fhir.r5.model.Expression() + .setLanguage(language) + .setExpression(expression) + .setReference(libraryUrl) + .setName(name); + + default: + return null; + } + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/PackageHelper.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/PackageHelper.java index 909a2e2ac..b630f179c 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/PackageHelper.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/PackageHelper.java @@ -14,7 +14,7 @@ public class PackageHelper { public static IBaseBackboneElement createEntry(IBaseResource resource, boolean isPut) { final var fhirVersion = resource.getStructureFhirVersionEnum(); - final var entry = BundleHelper.newEntryWithResource(resource.getStructureFhirVersionEnum(), resource); + final var entry = BundleHelper.newEntryWithResource(resource); String method; var requestUrl = resource.fhirType(); if (isPut) { @@ -52,7 +52,7 @@ public static IBaseBackboneElement createEntry(IBaseResource resource, boolean i public static IBaseBackboneElement deleteEntry(IBaseResource resource) { final var fhirVersion = resource.getStructureFhirVersionEnum(); - final var entry = BundleHelper.newEntryWithResource(resource.getStructureFhirVersionEnum(), resource); + final var entry = BundleHelper.newEntryWithResource(resource); var requestUrl = resource.fhirType() + "/" + resource.getIdElement().getIdPart(); final var request = BundleHelper.newRequest(fhirVersion, "DELETE", requestUrl); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/VersionUtilities.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/VersionUtilities.java index b8a781835..33f0ba7a4 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/VersionUtilities.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/VersionUtilities.java @@ -1,6 +1,7 @@ package org.opencds.cqf.fhir.utility; import ca.uhn.fhir.context.FhirVersionEnum; +import org.hl7.fhir.instance.model.api.IPrimitiveType; public class VersionUtilities { @@ -48,4 +49,123 @@ public static FhirVersionEnum enumForVersion(String fhirVersion) { throw new IllegalArgumentException("unknown or unsupported FHIR version"); } } + + /** + * Returns a StringType for the supplied FHIR version. + * + * @param fhirVersion the FHIR version to create a StringType for + * @return new StringType + */ + public static IPrimitiveType stringTypeForVersion(FhirVersionEnum fhirVersion) { + return stringTypeForVersion(fhirVersion, null); + } + + /** + * Returns a StringType for the supplied version with a value of the supplied string. + * + * @param fhirVersion the FHIR version to create a StringType for + * @param string the string value of the StringType + * @return the new StringType + */ + public static IPrimitiveType stringTypeForVersion(FhirVersionEnum fhirVersion, String string) { + switch (fhirVersion) { + case DSTU2: + return new org.hl7.fhir.dstu2.model.StringType(string); + case DSTU3: + return new org.hl7.fhir.dstu3.model.StringType(string); + case R4: + return new org.hl7.fhir.r4.model.StringType(string); + case R5: + return new org.hl7.fhir.r5.model.StringType(string); + default: + throw new IllegalArgumentException("unknown or unsupported FHIR version"); + } + } + + /** + * Returns a UriType for the supplied FHIR version. + * + * @param fhirVersion the FHIR version to create a UriType for + * @return new UriType + */ + public static IPrimitiveType uriTypeForVersion(FhirVersionEnum fhirVersion) { + return uriTypeForVersion(fhirVersion, null); + } + + /** + * Returns a UriType for the supplied version with a value of the supplied uri. + * + * @param fhirVersion the FHIR version to create a UriType for + * @param uri the string value of the UriType + * @return the new UriType + */ + public static IPrimitiveType uriTypeForVersion(FhirVersionEnum fhirVersion, String uri) { + switch (fhirVersion) { + case DSTU2: + return new org.hl7.fhir.dstu2.model.UriType(uri); + case DSTU3: + return new org.hl7.fhir.dstu3.model.UriType(uri); + case R4: + return new org.hl7.fhir.r4.model.UriType(uri); + case R5: + return new org.hl7.fhir.r5.model.UriType(uri); + default: + throw new IllegalArgumentException("unknown or unsupported FHIR version"); + } + } + + /** + * Returns a CanonicalType for the supplied FHIR version. + * + * @param fhirVersion the FHIR version to create a CanonicalType for + * @return new CanonicalType + */ + public static IPrimitiveType canonicalTypeForVersion(FhirVersionEnum fhirVersion) { + return canonicalTypeForVersion(fhirVersion, null); + } + + /** + * Returns a CanonicalType for the supplied version with a value of the supplied value. + * A UriType will be returned for FHIR versions before R4. + * + * @param fhirVersion the FHIR version to create a CanonicalType for + * @param value the string value of the CanonicalType + * @return the new CanonicalType + */ + public static IPrimitiveType canonicalTypeForVersion(FhirVersionEnum fhirVersion, String value) { + switch (fhirVersion) { + case DSTU2: + return new org.hl7.fhir.dstu2.model.UriType(value); + case DSTU3: + return new org.hl7.fhir.dstu3.model.UriType(value); + case R4: + return new org.hl7.fhir.r4.model.CanonicalType(value); + case R5: + return new org.hl7.fhir.r5.model.CanonicalType(value); + default: + throw new IllegalArgumentException("unknown or unsupported FHIR version"); + } + } + + /** + * Returns a CodeType for the supplied version with a value of the supplied code. + * + * @param fhirVersion the FHIR version to create a CodeType for + * @param code the string value of the CodeType + * @return the new CodeType + */ + public static IPrimitiveType codeTypeForVersion(FhirVersionEnum fhirVersion, String code) { + switch (fhirVersion) { + case DSTU2: + return new org.hl7.fhir.dstu2.model.CodeType(code); + case DSTU3: + return new org.hl7.fhir.dstu3.model.CodeType(code); + case R4: + return new org.hl7.fhir.r4.model.CodeType(code); + case R5: + return new org.hl7.fhir.r5.model.CodeType(code); + default: + throw new IllegalArgumentException("unknown or unsupported FHIR version"); + } + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/KnowledgeArtifactAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/KnowledgeArtifactAdapter.java index b2df20d95..b85fa6926 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/KnowledgeArtifactAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/KnowledgeArtifactAdapter.java @@ -330,6 +330,10 @@ default Optional getExpansionParameters() { return Optional.empty(); } + default IBaseResource getPrimaryLibrary(Repository repository) { + return get().fhirType().equals("Library") ? get() : null; + } + String releaseLabelUrl = "http://hl7.org/fhir/StructureDefinition/artifact-releaseLabel"; String releaseDescriptionUrl = "http://hl7.org/fhir/StructureDefinition/artifact-releaseDescription"; String usPhContextTypeUrl = "http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-usage-context-type"; diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/LibraryAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/LibraryAdapter.java index 9193b0fee..938a40d13 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/LibraryAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/LibraryAdapter.java @@ -24,6 +24,8 @@ public interface LibraryAdapter extends KnowledgeArtifactAdapter { LibraryAdapter setType(String type); + List getParameter(); + List getDataRequirement(); LibraryAdapter addDataRequirement(ICompositeType dataRequirement); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/ParametersAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/ParametersAdapter.java index 0363e8ce8..0a68484a2 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/ParametersAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/ParametersAdapter.java @@ -4,6 +4,7 @@ import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; import org.hl7.fhir.instance.model.api.IBaseDatatype; +import org.hl7.fhir.instance.model.api.IBaseResource; public interface ParametersAdapter extends ResourceAdapter { @@ -19,5 +20,7 @@ public interface ParametersAdapter extends ResourceAdapter { public void addParameter(String name, IBase value); + public void addParameter(String name, IBaseResource resource); + public IBaseBackboneElement addParameter(); } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/QuestionnaireAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/QuestionnaireAdapter.java index 80e9108cb..b7610b9c3 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/QuestionnaireAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/QuestionnaireAdapter.java @@ -7,7 +7,7 @@ /** * This interface exposes common functionality across all FHIR Questionnaire versions. */ -public interface QuestionnaireAdapter { +public interface QuestionnaireAdapter extends KnowledgeArtifactAdapter { public static List REFERENCE_EXTENSIONS = Arrays.asList( Constants.QUESTIONNAIRE_UNIT_VALUE_SET, Constants.QUESTIONNAIRE_REFERENCE_PROFILE, diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/StructureDefinitionAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/StructureDefinitionAdapter.java new file mode 100644 index 000000000..3b8a3be04 --- /dev/null +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/StructureDefinitionAdapter.java @@ -0,0 +1,14 @@ +package org.opencds.cqf.fhir.utility.adapter; + +import java.util.List; +import org.hl7.fhir.instance.model.api.IBaseBackboneElement; + +public interface StructureDefinitionAdapter extends KnowledgeArtifactAdapter { + default String getType() { + return resolvePathString(get(), "type"); + } + + default List getDifferentialElements() { + return resolvePathList(resolvePath(get(), "differential"), "element", IBaseBackboneElement.class); + } +} diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/LibraryAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/LibraryAdapter.java index 5b5e6c5b2..46e5cd39d 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/LibraryAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/LibraryAdapter.java @@ -10,6 +10,7 @@ import org.hl7.fhir.dstu3.model.Coding; import org.hl7.fhir.dstu3.model.DataRequirement; import org.hl7.fhir.dstu3.model.Library; +import org.hl7.fhir.dstu3.model.ParameterDefinition; import org.hl7.fhir.dstu3.model.Parameters; import org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent; import org.hl7.fhir.dstu3.model.Reference; @@ -125,6 +126,11 @@ public LibraryAdapter setType(String type) { return this; } + @Override + public List getParameter() { + return getLibrary().getParameter(); + } + @Override public List getDataRequirement() { return getLibrary().getDataRequirement(); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersAdapter.java index e55e85374..b7f0f522f 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersAdapter.java @@ -4,6 +4,7 @@ import java.util.stream.Collectors; import org.hl7.fhir.dstu3.model.Parameters; import org.hl7.fhir.dstu3.model.Parameters.ParametersParameterComponent; +import org.hl7.fhir.dstu3.model.Resource; import org.hl7.fhir.dstu3.model.Type; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; @@ -49,6 +50,15 @@ public void addParameter(String name, IBase value) { } } + @Override + public void addParameter(String name, IBaseResource resource) { + if (resource instanceof Resource) { + getParameters().addParameter().setName(name).setResource((Resource) resource); + } else { + throw new IllegalArgumentException("element passed as value argument is not a valid data type"); + } + } + @Override public void addParameter(IBase parameter) { if (parameter instanceof ParametersParameterComponent) { diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersParameterComponentAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersParameterComponentAdapter.java index 0a2937f14..254bb9a2d 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersParameterComponentAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/ParametersParameterComponentAdapter.java @@ -1,7 +1,6 @@ package org.opencds.cqf.fhir.utility.adapter.dstu3; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import java.util.List; import java.util.stream.Collectors; import org.hl7.fhir.dstu3.model.Parameters; @@ -17,8 +16,8 @@ class ParametersParameterComponentAdapter implements org.opencds.cqf.fhir.utility.adapter.ParametersParameterComponentAdapter { + private final FhirContext fhirContext = FhirContext.forDstu3Cached(); private final Parameters.ParametersParameterComponent parametersParametersComponent; - private final FhirContext fhirContext; private final ModelResolver modelResolver; public ParametersParameterComponentAdapter(IBaseBackboneElement parametersParametersComponent) { @@ -32,7 +31,6 @@ public ParametersParameterComponentAdapter(IBaseBackboneElement parametersParame } this.parametersParametersComponent = (ParametersParameterComponent) parametersParametersComponent; - fhirContext = FhirContext.forCached(FhirVersionEnum.R5); modelResolver = FhirModelResolverCache.resolverForVersion( fhirContext.getVersion().getVersion()); } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/PlanDefinitionAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/PlanDefinitionAdapter.java index 0365ee018..7bb8ac0ca 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/PlanDefinitionAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/PlanDefinitionAdapter.java @@ -9,7 +9,10 @@ import org.hl7.fhir.dstu3.model.Reference; import org.hl7.fhir.dstu3.model.StringType; import org.hl7.fhir.dstu3.model.UriType; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IDomainResource; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.utility.SearchHelper; import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; @@ -161,4 +164,13 @@ private DependencyInfo dependencyFromDataRequirementCodeFilter(DataRequirementCo } return null; } + + @Override + public IBaseResource getPrimaryLibrary(Repository repository) { + var libraries = getPlanDefinition().getLibrary(); + return libraries.isEmpty() + ? null + : SearchHelper.searchRepositoryByCanonical( + repository, libraries.get(0).getReferenceElement()); + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/QuestionnaireAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/QuestionnaireAdapter.java index c88c2a2a8..e41b3d3c6 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/QuestionnaireAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/QuestionnaireAdapter.java @@ -6,8 +6,11 @@ import org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent; import org.hl7.fhir.dstu3.model.Reference; import org.hl7.fhir.dstu3.model.UriType; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IDomainResource; +import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.SearchHelper; import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; @@ -118,4 +121,13 @@ private void getDependenciesOfItem( (reference) -> referenceExt.setValue(new UriType(reference))))); item.getItem().forEach(childItem -> getDependenciesOfItem(childItem, references, referenceSource)); } + + @Override + public IBaseResource getPrimaryLibrary(Repository repository) { + var library = getQuestionnaire().getExtensionByUrl(Constants.CQIF_LIBRARY); + return library == null + ? null + : SearchHelper.searchRepositoryByCanonical( + repository, ((Reference) library.getValue()).getReferenceElement()); + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/StructureDefinitionAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/StructureDefinitionAdapter.java index 7659af4bb..31597f9f9 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/StructureDefinitionAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/dstu3/StructureDefinitionAdapter.java @@ -9,7 +9,8 @@ import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; -public class StructureDefinitionAdapter extends KnowledgeArtifactAdapter { +public class StructureDefinitionAdapter extends KnowledgeArtifactAdapter + implements org.opencds.cqf.fhir.utility.adapter.StructureDefinitionAdapter { public StructureDefinitionAdapter(IDomainResource structureDefinition) { super(structureDefinition); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/LibraryAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/LibraryAdapter.java index deded9a16..903c9919b 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/LibraryAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/LibraryAdapter.java @@ -13,6 +13,7 @@ import org.hl7.fhir.r4.model.Coding; import org.hl7.fhir.r4.model.DataRequirement; import org.hl7.fhir.r4.model.Library; +import org.hl7.fhir.r4.model.ParameterDefinition; import org.hl7.fhir.r4.model.Parameters; import org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent; import org.hl7.fhir.r4.model.Reference; @@ -127,6 +128,11 @@ public LibraryAdapter setType(String type) { return this; } + @Override + public List getParameter() { + return getLibrary().getParameter(); + } + @Override public List getDataRequirement() { return getLibrary().getDataRequirement(); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersAdapter.java index 63cd6b506..7108c3b1a 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersAdapter.java @@ -7,6 +7,7 @@ import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.r4.model.Parameters; import org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent; +import org.hl7.fhir.r4.model.Resource; import org.hl7.fhir.r4.model.Type; class ParametersAdapter extends ResourceAdapter implements org.opencds.cqf.fhir.utility.adapter.ParametersAdapter { @@ -59,6 +60,15 @@ public void addParameter(String name, IBase value) { } } + @Override + public void addParameter(String name, IBaseResource resource) { + if (resource instanceof Resource) { + getParameters().addParameter().setName(name).setResource((Resource) resource); + } else { + throw new IllegalArgumentException("element passed as value argument is not a valid data type"); + } + } + @Override public void addParameter(IBase parameter) { if (parameter instanceof ParametersParameterComponent) { diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersParameterComponentAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersParameterComponentAdapter.java index b137fbe17..c7148935f 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersParameterComponentAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/ParametersParameterComponentAdapter.java @@ -1,7 +1,6 @@ package org.opencds.cqf.fhir.utility.adapter.r4; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import java.util.List; import java.util.stream.Collectors; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; @@ -17,8 +16,8 @@ class ParametersParameterComponentAdapter implements org.opencds.cqf.fhir.utility.adapter.ParametersParameterComponentAdapter { + private final FhirContext fhirContext = FhirContext.forR4Cached(); private final Parameters.ParametersParameterComponent parametersParametersComponent; - private final FhirContext fhirContext; private final ModelResolver modelResolver; protected Parameters.ParametersParameterComponent getParametersParameterComponent() { @@ -36,7 +35,6 @@ public ParametersParameterComponentAdapter(IBaseBackboneElement parametersParame } this.parametersParametersComponent = (ParametersParameterComponent) parametersParametersComponent; - fhirContext = FhirContext.forCached(FhirVersionEnum.R5); modelResolver = FhirModelResolverCache.resolverForVersion( fhirContext.getVersion().getVersion()); } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/PlanDefinitionAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/PlanDefinitionAdapter.java index 3a1230539..f3237a874 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/PlanDefinitionAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/PlanDefinitionAdapter.java @@ -4,9 +4,12 @@ import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.PlanDefinition; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.utility.SearchHelper; import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; @@ -173,4 +176,10 @@ private void getDependenciesOfAction( } action.getAction().forEach(nestedAction -> getDependenciesOfAction(nestedAction, references, referenceSource)); } + + @Override + public IBaseResource getPrimaryLibrary(Repository repository) { + var libraries = getPlanDefinition().getLibrary(); + return libraries.isEmpty() ? null : SearchHelper.searchRepositoryByCanonical(repository, libraries.get(0)); + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/QuestionnaireAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/QuestionnaireAdapter.java index 7056d3c01..89208ca56 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/QuestionnaireAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/QuestionnaireAdapter.java @@ -2,12 +2,15 @@ import java.util.ArrayList; import java.util.List; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.Expression; import org.hl7.fhir.r4.model.Questionnaire; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent; +import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.SearchHelper; import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; @@ -132,4 +135,12 @@ private void getDependenciesOfItem( (reference) -> expression.setReference(reference)))); item.getItem().forEach(childItem -> getDependenciesOfItem(childItem, references, referenceSource)); } + + @Override + public IBaseResource getPrimaryLibrary(Repository repository) { + var library = getQuestionnaire().getExtensionByUrl(Constants.CQF_LIBRARY); + return library == null + ? null + : SearchHelper.searchRepositoryByCanonical(repository, (CanonicalType) library.getValue()); + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/StructureDefinitionAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/StructureDefinitionAdapter.java index 8720bef5c..217960c54 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/StructureDefinitionAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r4/StructureDefinitionAdapter.java @@ -10,7 +10,8 @@ import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; -public class StructureDefinitionAdapter extends KnowledgeArtifactAdapter { +public class StructureDefinitionAdapter extends KnowledgeArtifactAdapter + implements org.opencds.cqf.fhir.utility.adapter.StructureDefinitionAdapter { public StructureDefinitionAdapter(IDomainResource structureDefinition) { super(structureDefinition); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/LibraryAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/LibraryAdapter.java index 842c5b339..f7bc6e4cd 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/LibraryAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/LibraryAdapter.java @@ -13,6 +13,7 @@ import org.hl7.fhir.r5.model.Coding; import org.hl7.fhir.r5.model.DataRequirement; import org.hl7.fhir.r5.model.Library; +import org.hl7.fhir.r5.model.ParameterDefinition; import org.hl7.fhir.r5.model.Parameters; import org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent; import org.hl7.fhir.r5.model.Reference; @@ -125,6 +126,11 @@ public LibraryAdapter setType(String type) { return this; } + @Override + public List getParameter() { + return getLibrary().getParameter(); + } + @Override public List getDataRequirement() { return getLibrary().getDataRequirement(); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersAdapter.java index 08403986f..a8434ce6b 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersAdapter.java @@ -8,6 +8,7 @@ import org.hl7.fhir.r5.model.DataType; import org.hl7.fhir.r5.model.Parameters; import org.hl7.fhir.r5.model.Parameters.ParametersParameterComponent; +import org.hl7.fhir.r5.model.Resource; class ParametersAdapter extends ResourceAdapter implements org.opencds.cqf.fhir.utility.adapter.ParametersAdapter { @@ -59,6 +60,15 @@ public void addParameter(String name, IBase value) { } } + @Override + public void addParameter(String name, IBaseResource resource) { + if (resource instanceof Resource) { + getParameters().addParameter().setName(name).setResource((Resource) resource); + } else { + throw new IllegalArgumentException("element passed as value argument is not a valid data type"); + } + } + @Override public void addParameter(IBase parameter) { if (parameter instanceof ParametersParameterComponent) { diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersParameterComponentAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersParameterComponentAdapter.java index ba47dfc62..1b7856d5a 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersParameterComponentAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/ParametersParameterComponentAdapter.java @@ -1,7 +1,6 @@ package org.opencds.cqf.fhir.utility.adapter.r5; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.context.FhirVersionEnum; import java.util.List; import java.util.stream.Collectors; import org.hl7.fhir.instance.model.api.IBaseBackboneElement; @@ -17,8 +16,8 @@ class ParametersParameterComponentAdapter implements org.opencds.cqf.fhir.utility.adapter.ParametersParameterComponentAdapter { + private final FhirContext fhirContext = FhirContext.forR5Cached(); private final Parameters.ParametersParameterComponent parametersParametersComponent; - private final FhirContext fhirContext; private final ModelResolver modelResolver; protected Parameters.ParametersParameterComponent getParametersParameterComponent() { @@ -36,7 +35,6 @@ public ParametersParameterComponentAdapter(IBaseBackboneElement parametersParame } this.parametersParametersComponent = (ParametersParameterComponent) parametersParametersComponent; - fhirContext = FhirContext.forCached(FhirVersionEnum.R5); modelResolver = FhirModelResolverCache.resolverForVersion( fhirContext.getVersion().getVersion()); } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/PlanDefinitionAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/PlanDefinitionAdapter.java index 0927d5ddb..1b14b12df 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/PlanDefinitionAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/PlanDefinitionAdapter.java @@ -4,9 +4,12 @@ import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.r5.model.CanonicalType; import org.hl7.fhir.r5.model.PlanDefinition; +import org.opencds.cqf.fhir.api.Repository; +import org.opencds.cqf.fhir.utility.SearchHelper; import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; @@ -175,4 +178,10 @@ private void getDependenciesOfAction( } action.getAction().forEach(nestedAction -> getDependenciesOfAction(nestedAction, references, referenceSource)); } + + @Override + public IBaseResource getPrimaryLibrary(Repository repository) { + var libraries = getPlanDefinition().getLibrary(); + return libraries.isEmpty() ? null : SearchHelper.searchRepositoryByCanonical(repository, libraries.get(0)); + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/QuestionnaireAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/QuestionnaireAdapter.java index e201cff85..dd5d098eb 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/QuestionnaireAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/QuestionnaireAdapter.java @@ -2,12 +2,15 @@ import java.util.ArrayList; import java.util.List; +import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IDomainResource; import org.hl7.fhir.r5.model.CanonicalType; import org.hl7.fhir.r5.model.Expression; import org.hl7.fhir.r5.model.Questionnaire; import org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent; +import org.opencds.cqf.fhir.api.Repository; import org.opencds.cqf.fhir.utility.Constants; +import org.opencds.cqf.fhir.utility.SearchHelper; import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; @@ -73,10 +76,7 @@ public List getDependencies() { getQuestionnaire() .getDerivedFrom() .forEach(derivedRef -> references.add(new DependencyInfo( - referenceSource, - derivedRef.asStringValue(), - derivedRef.getExtension(), - (reference) -> derivedRef.setValue(reference)))); + referenceSource, derivedRef.asStringValue(), derivedRef.getExtension(), derivedRef::setValue))); getQuestionnaire() .getExtensionsByUrl(Constants.CQF_LIBRARY) @@ -84,7 +84,7 @@ public List getDependencies() { referenceSource, ((CanonicalType) libraryExt.getValue()).asStringValue(), libraryExt.getExtension(), - (reference) -> libraryExt.setValue(new CanonicalType(reference))))); + reference -> libraryExt.setValue(new CanonicalType(reference))))); getQuestionnaire().getExtensionsByUrl(Constants.VARIABLE_EXTENSION).stream() .map(e -> (Expression) e.getValue()) @@ -93,7 +93,7 @@ public List getDependencies() { referenceSource, expression.getReference(), expression.getExtension(), - (reference) -> expression.setReference(reference)))); + expression::setReference))); getQuestionnaire().getItem().forEach(item -> getDependenciesOfItem(item, references, referenceSource)); @@ -109,10 +109,7 @@ private void getDependenciesOfItem( } if (item.hasAnswerValueSet()) { references.add(new DependencyInfo( - referenceSource, - item.getAnswerValueSet(), - item.getExtension(), - (reference) -> item.setAnswerValueSet(reference))); + referenceSource, item.getAnswerValueSet(), item.getExtension(), item::setAnswerValueSet)); } item.getExtension().stream() .filter(e -> REFERENCE_EXTENSIONS.contains(e.getUrl())) @@ -120,7 +117,7 @@ private void getDependenciesOfItem( referenceSource, ((CanonicalType) referenceExt.getValue()).asStringValue(), referenceExt.getExtension(), - (reference) -> referenceExt.setValue(new CanonicalType(reference))))); + reference -> referenceExt.setValue(new CanonicalType(reference))))); item.getExtension().stream() .filter(e -> EXPRESSION_EXTENSIONS.contains(e.getUrl())) .map(e -> (Expression) e.getValue()) @@ -129,7 +126,15 @@ private void getDependenciesOfItem( referenceSource, expression.getReference(), expression.getExtension(), - (reference) -> expression.setReference(reference)))); + expression::setReference))); item.getItem().forEach(childItem -> getDependenciesOfItem(childItem, references, referenceSource)); } + + @Override + public IBaseResource getPrimaryLibrary(Repository repository) { + var library = getQuestionnaire().getExtensionByUrl(Constants.CQF_LIBRARY); + return library == null + ? null + : SearchHelper.searchRepositoryByCanonical(repository, library.getValueCanonicalType()); + } } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/StructureDefinitionAdapter.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/StructureDefinitionAdapter.java index 152e4977e..dace90971 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/StructureDefinitionAdapter.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/adapter/r5/StructureDefinitionAdapter.java @@ -19,9 +19,9 @@ import org.opencds.cqf.fhir.utility.Constants; import org.opencds.cqf.fhir.utility.adapter.DependencyInfo; import org.opencds.cqf.fhir.utility.adapter.IDependencyInfo; -import org.opencds.cqf.fhir.utility.adapter.KnowledgeArtifactAdapter; -public class StructureDefinitionAdapter extends ResourceAdapter implements KnowledgeArtifactAdapter { +public class StructureDefinitionAdapter extends ResourceAdapter + implements org.opencds.cqf.fhir.utility.adapter.StructureDefinitionAdapter { public StructureDefinitionAdapter(IDomainResource structureDefinition) { super(structureDefinition); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/model/DynamicModelResolver.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/model/DynamicModelResolver.java index 20277030f..c72371621 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/model/DynamicModelResolver.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/model/DynamicModelResolver.java @@ -68,7 +68,6 @@ public Object as(Object value, Class type, boolean isStrict) { if (value instanceof org.hl7.fhir.dstu3.model.Coding) { var coding = (org.hl7.fhir.dstu3.model.Coding) value; - // var patient = new org.hl7.fhir.dstu3.model.Patient().setGender(null) switch (type.getSimpleName()) { case CODE: case PRIMITIVE: @@ -188,20 +187,27 @@ protected BaseRuntimeElementCompositeDefinition resolveRuntimeDefinition(IBas } public void setNestedValue(IBase target, String path, Object value, BaseRuntimeElementCompositeDefinition def) { - // var def = (BaseRuntimeElementCompositeDefinition) fhirContext - // .getElementDefinition(target.getClass()); var identifiers = path.split("\\."); for (int i = 0; i < identifiers.length; i++) { var identifier = identifiers[i]; var isList = identifier.contains("["); + var isSlice = identifier.contains(":"); var isLast = i == identifiers.length - 1; var index = isList ? Character.getNumericValue(identifier.charAt(identifier.indexOf("[") + 1)) : 0; - var targetPath = isList ? identifier.replaceAll("\\[\\d\\]", "") : identifier; + var targetPath = isList + ? identifier.replaceAll("\\[\\d\\]", "") + : isSlice ? identifier.substring(0, identifier.indexOf(":")) : identifier; var targetDef = def.getChildByName(targetPath); - var targetValues = targetDef.getAccessor().getValues(target); IBase targetValue; if (targetValues.size() >= index + 1 && !isLast) { + // TODO: handle slice names + // if (targetValues.size() > 1 && isSlice) { + // var sliceName = isSlice ? identifier.split(":")[1] : null; + // targetValue = targetValues.stream() + // } else { + // targetValue = targetValues.get(index); + // } targetValue = targetValues.get(index); } else { var elementDef = targetDef.getChildByName(targetPath); diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/InMemoryFhirRepository.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/InMemoryFhirRepository.java index c4a4d8fd9..ef875ef66 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/InMemoryFhirRepository.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/InMemoryFhirRepository.java @@ -116,6 +116,7 @@ public MethodOutcome delete( var resources = resourceMap.computeIfAbsent(id.getResourceType(), r -> new HashMap<>()); var keyId = id.toUnqualifiedVersionless(); if (resources.containsKey(keyId)) { + outcome.setResource(resources.get(keyId)); resources.remove(keyId); } else { throw new ResourceNotFoundException("Resource not found with id " + id); @@ -235,7 +236,7 @@ public static B transactionStub(B transaction, Repositor var res = repository.delete( resourceClass, BundleHelper.getEntryRequestId(version, e).get().withResourceType(resourceType)); - BundleHelper.addEntry(returnBundle, BundleHelper.newEntryWithResource(version, res.getResource())); + BundleHelper.addEntry(returnBundle, BundleHelper.newEntryWithResource(res.getResource())); } else { throw new ResourceNotFoundException("Trying to delete an entry without id"); } diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IActivityDefinitionProcessor.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IActivityDefinitionProcessor.java index 32dc759a0..041915e18 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IActivityDefinitionProcessor.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IActivityDefinitionProcessor.java @@ -33,7 +33,7 @@ , R extends IBaseResource> IBaseResource apply( IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, + boolean useServerData, IBaseBundle data, IBaseResource dataEndpoint, IBaseResource contentEndpoint, diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IPlanDefinitionProcessor.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IPlanDefinitionProcessor.java index bd2796dd7..18e21d318 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IPlanDefinitionProcessor.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/repository/operations/IPlanDefinitionProcessor.java @@ -33,7 +33,7 @@ , R extends IBaseResource> IBaseResource apply( IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, + boolean useServerData, IBaseBundle data, IBaseResource dataEndpoint, IBaseResource contentEndpoint, @@ -63,7 +63,7 @@ , R extends IBaseResource> IBaseBundle applyR5( IBaseDatatype setting, IBaseDatatype settingContext, IBaseParameters parameters, - Boolean useServerData, + boolean useServerData, IBaseBundle data, IBaseResource dataEndpoint, IBaseResource contentEndpoint, diff --git a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/visitor/PackageVisitor.java b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/visitor/PackageVisitor.java index 7adcca174..7440109e3 100644 --- a/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/visitor/PackageVisitor.java +++ b/cqf-fhir-utility/src/main/java/org/opencds/cqf/fhir/utility/visitor/PackageVisitor.java @@ -46,6 +46,7 @@ public class PackageVisitor implements IKnowledgeArtifactVisitor { protected final FhirContext fhirContext; protected final TerminologyServerClient terminologyServerClient; protected final ExpandHelper expandHelper; + protected List packagedResources; public PackageVisitor(FhirContext fhirContext) { this.fhirContext = fhirContext; @@ -113,6 +114,7 @@ public IBase visit(KnowledgeArtifactAdapter adapter, Repository repository, IBas throw new UnprocessableEntityException("'count' must be non-negative"); } var resource = adapter.get(); + packagedResources = new ArrayList<>(); // TODO: In the case of a released (active) root Library we can depend on the relatedArtifacts as a // comprehensive manifest var packagedBundle = BundleHelper.newBundle(fhirVersion); @@ -195,7 +197,8 @@ protected void recursivePackage( List forceArtifactVersion, boolean isPut) throws PreconditionFailedException { - if (resource != null) { + if (resource != null && !packagedResources.contains(resource.getId())) { + packagedResources.add(resource.getId()); var fhirVersion = resource.getStructureFhirVersionEnum(); var adapter = AdapterFactory.forFhirVersion(fhirVersion).createKnowledgeArtifactAdapter(resource); findUnsupportedCapability(adapter, capability); diff --git a/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/BundleHelperTests.java b/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/BundleHelperTests.java index a88091ba0..518d28937 100644 --- a/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/BundleHelperTests.java +++ b/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/BundleHelperTests.java @@ -11,6 +11,7 @@ import static org.opencds.cqf.fhir.utility.BundleHelper.getEntryResourceFirstRep; import static org.opencds.cqf.fhir.utility.BundleHelper.getEntryResources; import static org.opencds.cqf.fhir.utility.BundleHelper.newBundle; +import static org.opencds.cqf.fhir.utility.BundleHelper.newEntry; import static org.opencds.cqf.fhir.utility.BundleHelper.newEntryWithResource; import ca.uhn.fhir.context.FhirVersionEnum; @@ -50,7 +51,7 @@ void unsupportedVersionShouldThrow() { newBundle(fhirVersion); }); assertThrows(IllegalArgumentException.class, () -> { - newEntryWithResource(fhirVersion, null); + newEntry(fhirVersion); }); } @@ -64,7 +65,7 @@ void dstu3() { .setName(Collections.singletonList(new org.hl7.fhir.dstu3.model.HumanName() .setFamily("Test") .addGiven("Test"))); - var entry = newEntryWithResource(fhirVersion, resource); + var entry = newEntryWithResource(resource); assertTrue(entry instanceof org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent); addEntry(bundle, entry); assertFalse(getEntry(bundle).isEmpty()); @@ -83,7 +84,7 @@ void r4() { var resource = new org.hl7.fhir.r4.model.Patient() .setName(Collections.singletonList( new org.hl7.fhir.r4.model.HumanName().setFamily("Test").addGiven("Test"))); - var entry = newEntryWithResource(fhirVersion, resource); + var entry = newEntryWithResource(resource); assertTrue(entry instanceof org.hl7.fhir.r4.model.Bundle.BundleEntryComponent); addEntry(bundle, entry); assertFalse(getEntry(bundle).isEmpty()); @@ -102,7 +103,7 @@ void r5() { var resource = new org.hl7.fhir.r5.model.Patient() .setName(Collections.singletonList( new org.hl7.fhir.r5.model.HumanName().setFamily("Test").addGiven("Test"))); - var entry = newEntryWithResource(fhirVersion, resource); + var entry = newEntryWithResource(resource); assertTrue(entry instanceof org.hl7.fhir.r5.model.Bundle.BundleEntryComponent); addEntry(bundle, entry); assertFalse(getEntry(bundle).isEmpty()); diff --git a/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/VersionUtilitiesTests.java b/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/VersionUtilitiesTests.java index 80584db66..eea7a0c22 100644 --- a/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/VersionUtilitiesTests.java +++ b/cqf-fhir-utility/src/test/java/org/opencds/cqf/fhir/utility/VersionUtilitiesTests.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import ca.uhn.fhir.context.FhirVersionEnum; import org.junit.jupiter.api.Test; @@ -15,6 +16,11 @@ void TestDstu3Versions() { assertEquals(FhirVersionEnum.DSTU3, VersionUtilities.enumForVersion("3")); assertEquals(FhirVersionEnum.DSTU3, VersionUtilities.enumForVersion("3.0")); assertEquals(FhirVersionEnum.DSTU3, VersionUtilities.enumForVersion("3.0.1")); + assertTrue( + VersionUtilities.stringTypeForVersion(FhirVersionEnum.DSTU3) + instanceof org.hl7.fhir.dstu3.model.StringType); + assertTrue( + VersionUtilities.uriTypeForVersion(FhirVersionEnum.DSTU3) instanceof org.hl7.fhir.dstu3.model.UriType); } @Test @@ -24,6 +30,9 @@ void TestR4Versions() { assertEquals(FhirVersionEnum.R4, VersionUtilities.enumForVersion("4")); assertEquals(FhirVersionEnum.R4, VersionUtilities.enumForVersion("4.0")); assertEquals(FhirVersionEnum.R4, VersionUtilities.enumForVersion("4.0.1")); + assertTrue( + VersionUtilities.stringTypeForVersion(FhirVersionEnum.R4) instanceof org.hl7.fhir.r4.model.StringType); + assertTrue(VersionUtilities.uriTypeForVersion(FhirVersionEnum.R4) instanceof org.hl7.fhir.r4.model.UriType); } @Test @@ -33,6 +42,9 @@ void TestR5Versions() { assertEquals(FhirVersionEnum.R5, VersionUtilities.enumForVersion("5")); assertEquals(FhirVersionEnum.R5, VersionUtilities.enumForVersion("5.0")); assertEquals(FhirVersionEnum.R5, VersionUtilities.enumForVersion("5.0.1")); + assertTrue( + VersionUtilities.stringTypeForVersion(FhirVersionEnum.R5) instanceof org.hl7.fhir.r5.model.StringType); + assertTrue(VersionUtilities.uriTypeForVersion(FhirVersionEnum.R5) instanceof org.hl7.fhir.r5.model.UriType); } @Test @@ -54,5 +66,11 @@ void TestUnsupported() { assertThrows(IllegalArgumentException.class, () -> { VersionUtilities.enumForVersion("R6"); }); + assertThrows(IllegalArgumentException.class, () -> { + VersionUtilities.stringTypeForVersion(FhirVersionEnum.R4B); + }); + assertThrows(IllegalArgumentException.class, () -> { + VersionUtilities.uriTypeForVersion(FhirVersionEnum.R4B); + }); } }