From f94dc0b6654a1b9f0fca4029277218abfe5253b7 Mon Sep 17 00:00:00 2001 From: Richard Stanley <2528387+citizenrich@users.noreply.github.com> Date: Mon, 10 Jul 2023 11:51:05 -0400 Subject: [PATCH] fix build errors, update load script --- input/cql/Debug.cql | 6 +++++ input/fsh/measure.fsh | 52 ++++++++++++++++++++++++++++----------- input/fsh/terminology.fsh | 1 + input/fsh/test-ciel0.fsh | 6 ++++- test/scripts/_runload.sh | 27 ++++++++++---------- 5 files changed, 63 insertions(+), 29 deletions(-) diff --git a/input/cql/Debug.cql b/input/cql/Debug.cql index 74d668289..06b969348 100644 --- a/input/cql/Debug.cql +++ b/input/cql/Debug.cql @@ -12,6 +12,12 @@ parameter "Measurement Period" Interval default Interval[@1990-01-01T, context Patient + +define "Exists Patient": + exists ["Patient"] P + + + define "Deceased": Patient.deceased is not null and (Patient.deceased is true or Patient.deceased before end of "Measurement Period") diff --git a/input/fsh/measure.fsh b/input/fsh/measure.fsh index 1256fbe84..769f060c5 100644 --- a/input/fsh/measure.fsh +++ b/input/fsh/measure.fsh @@ -93,19 +93,41 @@ Description: "MERTXCURR" * insert common-numonly -Instance: MERDebug -InstanceOf: Measure -Title: "MERDebug" -Description: "MERDebug" -* id = "MERDebug" -* insert meas-common -* name = "MERDebug" -* title = "MERDebug" -* description = "MERDebug" -* url = "https://path-global-health.github.io/MERindicators/Measure/MERDebug" -* identifier[0].value = "MERDebug" -// only numerator -* scoring = $measure-scoring#cohort -* library[+] = Canonical(Debug) -* insert common-numonly +// Not using for now, will try evaluate library: +// https://build.fhir.org/ig/HL7/cqf-recommendations/OperationDefinition-cpg-library-evaluate.html + +// Instance: MERDebug +// InstanceOf: Measure +// Title: "MERDebug" +// Description: "MERDebug" +// * id = "MERDebug" +// * insert meas-common +// * name = "MERDebug" +// * title = "MERDebug" +// * description = "MERDebug" +// * url = "https://path-global-health.github.io/MERindicators/Measure/MERDebug" +// * identifier[0].value = "MERDebug" +// // only numerator +// * scoring = $measure-scoring#cohort +// * library[+] = Canonical(Debug) +// * group[+] +// * code = $OpenHIE#cohort "cohort" +// * population[+] +// * description = "Initial Population" +// * code = $measure-population#initial-population +// * criteria.language = #text/cql +// * criteria.expression = "Initial Population" +// * population[+] +// * description = "Numerator-Exclusion" +// * code = $measure-population#numerator-exclusion +// * criteria.language = #text/cql +// * criteria.expression = "Numerator-Exclusion" +// * population[+] +// * description = "Numerator" +// * code = $measure-population#numerator +// * criteria.language = #text/cql +// * criteria.expression = "Numerator" + // * stratifier[+] + // * criteria.language = #text/cql + // * criteria.expression = "Stratifier" diff --git a/input/fsh/terminology.fsh b/input/fsh/terminology.fsh index 148bc961d..463924797 100644 --- a/input/fsh/terminology.fsh +++ b/input/fsh/terminology.fsh @@ -42,6 +42,7 @@ Description: "Columbia International eHealth Laboratory (CIEL)" * #1434 "Currently pregnant" // boolean * #138405 "Human immunodeficiency virus (HIV) disease" // coded * #160119 "CURRENTLY TAKING ARV" // q&a +* #116128 "Malaria" // For tests from OMRS IG // WIP * #86663 "Zidovudine" * #74807 "Didanosine" diff --git a/input/fsh/test-ciel0.fsh b/input/fsh/test-ciel0.fsh index 0d86d1899..5fa09eb49 100644 --- a/input/fsh/test-ciel0.fsh +++ b/input/fsh/test-ciel0.fsh @@ -8,7 +8,11 @@ Description: "PatientCIEL" * gender = #female * birthDate = "1985-01-01" * identifier.use = #official -* identifier.extension[OMRSPatientIdentifierLocationExtension].valueReference = Reference(LocationCIEL) +// * identifier.extension[OMRSPatientIdentifierLocationExtension].url = "http://fhir.openmrs.org/ext/patient/identifier#location" +// * identifier.extension[OMRSPatientIdentifierLocationExtension].valueReference = Reference(LocationCIEL) +// have to fix the openmrs ig patient.identififer.extension.url until its fixed in that ig +* identifier.extension.url = "http://fhir.openmrs.org/ext/patient/identifier#location" +* identifier.extension.valueReference = Reference(LocationCIEL) * type = "Location" * display = "Inpatient Ward" * identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#MR diff --git a/test/scripts/_runload.sh b/test/scripts/_runload.sh index 9f577fba3..d3b958698 100755 --- a/test/scripts/_runload.sh +++ b/test/scripts/_runload.sh @@ -14,20 +14,21 @@ export FHIR="http://localhost:8080/fhir" # export FHIR="http://ryzen.local:8080/fhir" export HEADER="Content-Type: application/fhir+json" -export output="../../../output" -export OUTPUT="@../../../output" +export output="../../output" +export OUTPUT="@../../output" +export SCRIPTS="../test/scripts" -function confirmation { - printf '\nDo you wish to continue (y/n)? ' - read answer +# function confirmation { +# printf '\nDo you wish to continue (y/n)? ' +# read answer - if [ "$answer" != "${answer#[Yy]}" ] ;then - echo "" - else - echo "" - exit - fi -} +# if [ "$answer" != "${answer#[Yy]}" ] ;then +# echo "" +# else +# echo "" +# exit +# fi +# } function Loader() { cd ${output} @@ -38,7 +39,7 @@ function Loader() { curl -s -X PUT -H "$HEADER" --data @${FILE} $FHIR/$1/${EYED} | jq . done - cd ../input/tests/server + cd ${SCRIPTS} } # on some servers this isn't needed, but it is included here