use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project pathling by aehrc.
the class CodingLiteralPathTest method roundTripWithQuotedComponent.
@Test
void roundTripWithQuotedComponent() {
final String expression = "http://snomed.info/sct" + "|'397956004 |Prosthetic arthroplasty of the hip|: 363704007 |Procedure site| = " + "( 24136001 |Hip joint structure|: 272741003 |Laterality| = 7771000 |Left| )'" + "|http://snomed.info/sct/32506021000036107/version/20201231";
final CodingLiteralPath codingLiteralPath = CodingLiteralPath.fromString(expression, inputContext);
final Coding literalValue = codingLiteralPath.getLiteralValue();
assertEquals("http://snomed.info/sct", literalValue.getSystem());
assertEquals("http://snomed.info/sct/32506021000036107/version/20201231", literalValue.getVersion());
assertEquals("397956004 |Prosthetic arthroplasty of the hip|: 363704007 |Procedure site| = " + "( 24136001 |Hip joint structure|: 272741003 |Laterality| = 7771000 |Left| )", literalValue.getCode());
final String actualExpression = codingLiteralPath.getExpression();
assertEquals(expression, actualExpression);
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project quality-measure-and-cohort-service by Alvearie.
the class MeasureCLITest method testFolderKnowledgeArtifacts.
@Test
public void testFolderKnowledgeArtifacts() throws Exception {
mockFhirResourceRetrieval("/metadata?_format=json", getCapabilityStatement());
Patient patient = getPatient("123", AdministrativeGender.MALE, 65);
mockFhirResourceRetrieval(patient);
Bundle emptyBundle = getBundle();
mockFhirResourceRetrieval(get(urlMatching("/Condition.*")), emptyBundle);
mockFhirResourceRetrieval(get(urlMatching("/Procedure.*")), emptyBundle);
mockFhirResourceRetrieval(get(urlMatching("/Observation.*")), emptyBundle);
mockSampleValueSets();
File tmpFile = createFhirConfigFile();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream out = new PrintStream(baos);
try {
MeasureCLI cli = new MeasureCLI();
cli.runWithArgs(new String[] { "-d", tmpFile.getAbsolutePath(), "-m", "src/test/resources/cql/measure-folders", "-r", "http://ibm.com/health/Measure/measure-COL_ColorectalCancerScreening|1.0.0", "--filter", "fhirResources", "-c", patient.getId(), "-o", "ALL", "-f", "JSON" }, out);
} finally {
tmpFile.delete();
}
String output = new String(baos.toByteArray());
System.out.println(output);
assertTrue(output.contains("\"resourceType\": \"MeasureReport\""));
assertFalse("Found null string in output", output.contains("null/"));
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project quality-measure-and-cohort-service by Alvearie.
the class MeasureCLITest method testZipFileKnowledgeArtifacts.
@Test
public void testZipFileKnowledgeArtifacts() throws Exception {
mockFhirResourceRetrieval("/metadata?_format=json", getCapabilityStatement());
Patient patient = getPatient("123", AdministrativeGender.MALE, 65);
mockFhirResourceRetrieval(patient);
Bundle emptyBundle = getBundle();
assertTrue("Bundle should be empty", emptyBundle.isEmpty());
mockFhirResourceRetrieval(get(urlMatching("/Condition.*&_count=500&_format=json")), emptyBundle);
mockFhirResourceRetrieval(get(urlMatching("/Procedure.*")), emptyBundle);
mockFhirResourceRetrieval(get(urlMatching("/Observation.*")), emptyBundle);
mockSampleValueSets();
File tmpFile = createFhirConfigFile();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream out = new PrintStream(baos);
try {
MeasureCLI cli = new MeasureCLI();
cli.runWithArgs(new String[] { "-d", tmpFile.getAbsolutePath(), "-m", "src/test/resources/cql/measure-zip/col_colorectal_cancer_screening_1.0.0.zip", "-r", "Measure/measure-COL_ColorectalCancerScreening-1.0.0", "--filter", "fhirResources", "-c", patient.getId(), "-f", "JSON", "--enable-terminology-optimization", "--search-page-size", "500" }, out);
} finally {
tmpFile.delete();
}
String output = new String(baos.toByteArray());
System.out.println(output);
assertTrue(output.contains("\"resourceType\": \"MeasureReport\""));
assertFalse("Found null string in output", output.contains("null/"));
verify(5, getRequestedFor(urlMatching("/Observation\\?code%3Ain=.*")));
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project quality-measure-and-cohort-service by Alvearie.
the class MeasureCLITest method testZipFileInputExtraFolders.
@Test
public void testZipFileInputExtraFolders() throws Exception {
mockFhirResourceRetrieval("/metadata?_format=json", getCapabilityStatement());
Patient patient = getPatient("123", AdministrativeGender.MALE, 65);
mockFhirResourceRetrieval(patient);
Bundle emptyBundle = getBundle();
mockFhirResourceRetrieval(get(urlMatching("/Condition.*")), emptyBundle);
mockFhirResourceRetrieval(get(urlMatching("/Procedure.*")), emptyBundle);
mockFhirResourceRetrieval(get(urlMatching("/Observation.*")), emptyBundle);
File tmpFile = createFhirConfigFile();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream out = new PrintStream(baos);
try {
MeasureCLI cli = new MeasureCLI();
cli.runWithArgs(new String[] { "-d", tmpFile.getAbsolutePath(), "-m", "src/test/resources/cql/measure-zip/simple_age_measure_v2_2_2.zip", "-r", "http://ibm.com/health/Measure/SimpleAgeMeasure|2.2.2", "--filter", "fhirResources", "--filter", "fhirResources/libraries", "-c", patient.getId(), "-f", "JSON" }, out);
} finally {
tmpFile.delete();
}
String output = new String(baos.toByteArray());
System.out.println(output);
assertTrue(output.contains("\"resourceType\": \"MeasureReport\""));
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeExplanationOfBenefit.
protected void composeExplanationOfBenefit(Complex parent, String parentType, String name, ExplanationOfBenefit element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "ExplanationOfBenefit", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "ExplanationOfBenefit", "identifier", element.getIdentifier().get(i), i);
if (element.hasClaim())
composeType(t, "ExplanationOfBenefit", "claim", element.getClaim(), -1);
if (element.hasClaimResponse())
composeType(t, "ExplanationOfBenefit", "claimResponse", element.getClaimResponse(), -1);
for (int i = 0; i < element.getSubType().size(); i++) composeCoding(t, "ExplanationOfBenefit", "subType", element.getSubType().get(i), i);
if (element.hasRuleset())
composeCoding(t, "ExplanationOfBenefit", "ruleset", element.getRuleset(), -1);
if (element.hasOriginalRuleset())
composeCoding(t, "ExplanationOfBenefit", "originalRuleset", element.getOriginalRuleset(), -1);
if (element.hasCreatedElement())
composeDateTime(t, "ExplanationOfBenefit", "created", element.getCreatedElement(), -1);
if (element.hasBillablePeriod())
composePeriod(t, "ExplanationOfBenefit", "billablePeriod", element.getBillablePeriod(), -1);
if (element.hasDispositionElement())
composeString(t, "ExplanationOfBenefit", "disposition", element.getDispositionElement(), -1);
if (element.hasProvider())
composeType(t, "ExplanationOfBenefit", "provider", element.getProvider(), -1);
if (element.hasOrganization())
composeType(t, "ExplanationOfBenefit", "organization", element.getOrganization(), -1);
if (element.hasFacility())
composeType(t, "ExplanationOfBenefit", "facility", element.getFacility(), -1);
for (int i = 0; i < element.getRelated().size(); i++) composeExplanationOfBenefitRelatedClaimsComponent(t, "ExplanationOfBenefit", "related", element.getRelated().get(i), i);
if (element.hasPrescription())
composeType(t, "ExplanationOfBenefit", "prescription", element.getPrescription(), -1);
if (element.hasOriginalPrescription())
composeType(t, "ExplanationOfBenefit", "originalPrescription", element.getOriginalPrescription(), -1);
if (element.hasPayee())
composeExplanationOfBenefitPayeeComponent(t, "ExplanationOfBenefit", "payee", element.getPayee(), -1);
if (element.hasReferral())
composeType(t, "ExplanationOfBenefit", "referral", element.getReferral(), -1);
for (int i = 0; i < element.getOccurrenceCode().size(); i++) composeCoding(t, "ExplanationOfBenefit", "occurrenceCode", element.getOccurrenceCode().get(i), i);
for (int i = 0; i < element.getOccurenceSpanCode().size(); i++) composeCoding(t, "ExplanationOfBenefit", "occurenceSpanCode", element.getOccurenceSpanCode().get(i), i);
for (int i = 0; i < element.getValueCode().size(); i++) composeCoding(t, "ExplanationOfBenefit", "valueCode", element.getValueCode().get(i), i);
for (int i = 0; i < element.getDiagnosis().size(); i++) composeExplanationOfBenefitDiagnosisComponent(t, "ExplanationOfBenefit", "diagnosis", element.getDiagnosis().get(i), i);
for (int i = 0; i < element.getProcedure().size(); i++) composeExplanationOfBenefitProcedureComponent(t, "ExplanationOfBenefit", "procedure", element.getProcedure().get(i), i);
for (int i = 0; i < element.getSpecialCondition().size(); i++) composeCoding(t, "ExplanationOfBenefit", "specialCondition", element.getSpecialCondition().get(i), i);
if (element.hasPatient())
composeType(t, "ExplanationOfBenefit", "patient", element.getPatient(), -1);
if (element.hasPrecedenceElement())
composePositiveInt(t, "ExplanationOfBenefit", "precedence", element.getPrecedenceElement(), -1);
if (element.hasCoverage())
composeExplanationOfBenefitCoverageComponent(t, "ExplanationOfBenefit", "coverage", element.getCoverage(), -1);
if (element.hasAccidentDateElement())
composeDate(t, "ExplanationOfBenefit", "accidentDate", element.getAccidentDateElement(), -1);
if (element.hasAccidentType())
composeCoding(t, "ExplanationOfBenefit", "accidentType", element.getAccidentType(), -1);
if (element.hasAccidentLocation())
composeType(t, "ExplanationOfBenefit", "accidentLocation", element.getAccidentLocation(), -1);
for (int i = 0; i < element.getInterventionException().size(); i++) composeCoding(t, "ExplanationOfBenefit", "interventionException", element.getInterventionException().get(i), i);
for (int i = 0; i < element.getOnset().size(); i++) composeExplanationOfBenefitOnsetComponent(t, "ExplanationOfBenefit", "onset", element.getOnset().get(i), i);
if (element.hasEmploymentImpacted())
composePeriod(t, "ExplanationOfBenefit", "employmentImpacted", element.getEmploymentImpacted(), -1);
if (element.hasHospitalization())
composePeriod(t, "ExplanationOfBenefit", "hospitalization", element.getHospitalization(), -1);
for (int i = 0; i < element.getItem().size(); i++) composeExplanationOfBenefitItemsComponent(t, "ExplanationOfBenefit", "item", element.getItem().get(i), i);
for (int i = 0; i < element.getAddItem().size(); i++) composeExplanationOfBenefitAddedItemComponent(t, "ExplanationOfBenefit", "addItem", element.getAddItem().get(i), i);
for (int i = 0; i < element.getMissingTeeth().size(); i++) composeExplanationOfBenefitMissingTeethComponent(t, "ExplanationOfBenefit", "missingTeeth", element.getMissingTeeth().get(i), i);
if (element.hasTotalCost())
composeQuantity(t, "ExplanationOfBenefit", "totalCost", element.getTotalCost(), -1);
if (element.hasUnallocDeductable())
composeQuantity(t, "ExplanationOfBenefit", "unallocDeductable", element.getUnallocDeductable(), -1);
if (element.hasTotalBenefit())
composeQuantity(t, "ExplanationOfBenefit", "totalBenefit", element.getTotalBenefit(), -1);
if (element.hasPaymentAdjustment())
composeQuantity(t, "ExplanationOfBenefit", "paymentAdjustment", element.getPaymentAdjustment(), -1);
if (element.hasPaymentAdjustmentReason())
composeCoding(t, "ExplanationOfBenefit", "paymentAdjustmentReason", element.getPaymentAdjustmentReason(), -1);
if (element.hasPaymentDateElement())
composeDate(t, "ExplanationOfBenefit", "paymentDate", element.getPaymentDateElement(), -1);
if (element.hasPaymentAmount())
composeQuantity(t, "ExplanationOfBenefit", "paymentAmount", element.getPaymentAmount(), -1);
if (element.hasPaymentRef())
composeIdentifier(t, "ExplanationOfBenefit", "paymentRef", element.getPaymentRef(), -1);
if (element.hasReserved())
composeCoding(t, "ExplanationOfBenefit", "reserved", element.getReserved(), -1);
if (element.hasForm())
composeCoding(t, "ExplanationOfBenefit", "form", element.getForm(), -1);
for (int i = 0; i < element.getNote().size(); i++) composeExplanationOfBenefitNotesComponent(t, "ExplanationOfBenefit", "note", element.getNote().get(i), i);
for (int i = 0; i < element.getBenefitBalance().size(); i++) composeExplanationOfBenefitBenefitBalanceComponent(t, "ExplanationOfBenefit", "benefitBalance", element.getBenefitBalance().get(i), i);
}
Aggregations