Skip to content

Commit

Permalink
Previous work
Browse files Browse the repository at this point in the history
  • Loading branch information
pmanko committed Aug 18, 2024
1 parent 8efe582 commit 292a965
Show file tree
Hide file tree
Showing 19 changed files with 151 additions and 10 deletions.
8 changes: 4 additions & 4 deletions input/cql/HIVElements.cql
Original file line number Diff line number Diff line change
Expand Up @@ -2580,10 +2580,10 @@ define "HIV retest prior to starting ART conducted Observation":
*/

define "At elevated risk for HIV acquisition B.DE225":
[Observation] O
where O.status in { 'final', 'amended', 'corrected' }
and exists(O.category OC where OC ~ ConceptsCustom."social-history")
and O.code ~ Concepts."At elevated risk for HIV acquisition - HIV.B.DE225"
[Condition] C
where C.code ~ Concepts."At elevated risk for HIV acquisition - HIV.B.DE225"
and C.verificationStatus.text = 'confirmed'

/* End of At elevated risk for HIV acquisition B.DE225 */

/*
Expand Down
7 changes: 4 additions & 3 deletions input/cql/HIVEncounterElements.cql
Original file line number Diff line number Diff line change
Expand Up @@ -1665,9 +1665,9 @@ define "HIV retest prior to starting ART conducted Observation":
@description: Client is at elevated risk for HIV acquisition
*/
define "At elevated risk for HIV acquisition B.DE225":
Elements."At elevated risk for HIV acquisition B.DE225" O
where O.encounter.references(EncounterId)
or O.effective.toInterval() starts on or before Today
Elements."At elevated risk for HIV acquisition B.DE225" C
where C.prevalenceInterval() starts on or before Today
or C.encounter.references(EncounterId)
/* End of At elevated risk for HIV acquisition B.DE225 */

/*
Expand Down Expand Up @@ -1696,6 +1696,7 @@ define "Positive B.DE251":
define "Positive B.DE251 Condition":
Elements."Positive B.DE251 Condition" C
where C.prevalenceInterval() starts on or before Today
or C.encounter.references(EncounterId)
define "Positive B.DE251 Observation":
Elements."Positive B.DE251 Observation" O
where O.encounter.references(EncounterId)
Expand Down
4 changes: 2 additions & 2 deletions input/cql/HIVIndicatorElements.cql
Original file line number Diff line number Diff line change
Expand Up @@ -1558,8 +1558,8 @@ define "Other B.DE222 Observation":
*/

define "At elevated risk for HIV acquisition B.DE225":
exists(Elements."At elevated risk for HIV acquisition B.DE225" O
where O.effective.toInterval() overlaps "Measurement Period")
exists(Elements."At elevated risk for HIV acquisition B.DE225" C
where C.prevalenceInterval() overlaps "Measurement Period")
/* End of At elevated risk for HIV acquisition B.DE225 */

/*
Expand Down
9 changes: 9 additions & 0 deletions input/fsh/examples/HivElevatedRiskForAcquisition.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Instance: ExampleElevatedHivRiskCondition
InstanceOf: ElevatedHivRiskCondition
Title: "Example Elevated HIV Risk Condition"
Description: "This is an example of an Elevated HIV Risk Condition resource based on the ElevatedHivRiskCondition profile."

* verificationStatus = #confirmed
* code = Concepts."At elevated risk for HIV acquisition - HIV.B.DE225"
* subject = Reference(Patient/example-hiv-patient)
* onsetDateTime = "2023-01-11T10:00:00Z"
11 changes: 11 additions & 0 deletions input/fsh/examples/HivKeyPopulation.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Instance: ExampleHivKeyPopulation
InstanceOf: HivKeyPopulation
Title: "Example HIV Key Population Observation"
Description: "This is an example of an HIV Key Population Observation resource based on the HivKeyPopulation profile."

* status = #final
* category = http://terminology.hl7.org/CodeSystem/observation-category#social-history
* code = HIVConcepts#HIV.B.DE50 "Key Population Status"
* subject = Reference(Patient/HivPatient)
* effectiveDateTime = "2023-01-12T14:00:00Z"
* valueCodeableConcept = HIVConcepts#HIV.B.DE52 "Men who have sex with men"
10 changes: 10 additions & 0 deletions input/fsh/examples/HivOnArt.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Instance: ExampleHivOnArt
InstanceOf: HivOnArt
Title: "Example HIV On ART Medication Statement"
Description: "This is an example of an On ART Medication Statement resource based on the HivOnArtMedicationStatement profile."

* status = #active
* medicationCodeableConcept = HIV.D.DE90#ART "Antiretroviral Therapy (ART)"
* subject = Reference(Patient/example-hiv-patient) // Reference to a Patient resource
* effectiveDateTime = "2024-08-17T12:00:00Z" // Example effective dateTime
* reasonCode = HIVConcepts#HIV.D.DE39 "HIV Infection"
4 changes: 4 additions & 0 deletions input/fsh/examples/HivPatient.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Instance: ExampleHivPatient
InstanceOf: HivPatient

* id = "example-hiv-patient"
10 changes: 10 additions & 0 deletions input/fsh/examples/HivStatusCondition.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Instance: ExampleHivPositiveCondition
InstanceOf: HivStatusCondition
Title: "Example HIV Positive Status Condition"
Description: "This is an example of an HIV Positive Status Condition resource based on the HivStatusCondition profile."

* clinicalStatus = #active
* category = http://terminology.hl7.org/CodeSystem/condition-category#encounter-diagnosis
* code = HIV.B.D115#HIV-positive "HIV Positive"
* subject = Reference(Patient/example-hiv-patient)
* onsetDateTime = "2023-01-15T08:30:00Z"
10 changes: 10 additions & 0 deletions input/fsh/examples/HivStatusObservation.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Instance: ExampleHivStatusPositiveObservation
InstanceOf: HivStatusObservation
Title: "Example HIV Positive Status Observation"
Description: "This is an example of an HIV Positive Status Observation resource based on the HivStatusObservation profile."

* status = #final
* code = HIVConcepts#HIV.B.DE115
* subject = Reference(Patient/HivExamplePatient) // Reference to a Patient resource
* effectiveDateTime = "2023-01-10T09:00:00Z" // Example effective dateTime
* valueCodeableConcept = HIVConcepts#HIV.B.DE116 "HIV-positive"
12 changes: 12 additions & 0 deletions input/fsh/examples/HivTest.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Instance: HivTest
InstanceOf: HivTest
Title: "Example HIV Test Observation for Positive Result"
Description: "This is an example of an HIV Test Observation resource based on the HivTest profile for a positive test result."

* status = #final
* category = http://terminology.hl7.org/CodeSystem/observation-category#laboratory
* code = HIVConcepts#HIV.B.DE81 "HIV Test"
* subject = Reference(Patient/example-hiv-patient)
* effectiveDateTime = "2023-01-01T14:30:00Z"
* issued = "2023-01-03T15:00:00Z" // Example issued time
* valueCodeableConcept = HIVConcepts#HIV.B.DE112 "HIV-positive"
9 changes: 9 additions & 0 deletions input/fsh/profiles/HivElevatedRiskForAcquisition.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Profile: HivElevatedRiskForAcquisition
Parent: Condition
Description: "A condition identifying patients at elevated risk for HIV acquisition."
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition"
* ^experimental = true
* ^title = "Elevated HIV Risk Acquisition Condition"
* verificationStatus from http://hl7.org/fhir/ValueSet/condition-ver-status (required)
* code = Concepts."At elevated risk for HIV acquisition - HIV.B.DE225"
1 change: 1 addition & 0 deletions input/fsh/profiles/HivKeyPopulation.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Description: "An observation describing Patient's key population status"
* ^experimental = true
* ^title = "Patient Key Population Status"
* value[x] only CodeableConcept 1..*
* category from http://terminology.hl7.org/CodeSystem/observation-category#social-history
* valueCodeableConcept from HIV.B.DE50 (required)
* code = HIVConcepts#HIV.B.DE50
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Profile: HivOnArtMedicationStatement
Profile: HivOnArt
Parent: MedicationStatement
Description: "A medication statement describing a Patient's ART program"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition"
* ^experimental = true
* ^title = "On ART Medication Statement"
* medication[x] only CodeableConcept 1..1
* medicationCodeableConcept from HIV.D.DE90 (required)
* reasonCode = HIVConcepts#HIV.D.DE39

5 changes: 5 additions & 0 deletions input/fsh/profiles/HivPatient.fsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Profile: HivPatient
Parent: Patient


// Gender
// Geographic Region
// Date of Birth



11 changes: 11 additions & 0 deletions input/fsh/profiles/HivPrepActive.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Profile: HivPrepActive
Parent: MedicationStatement
Description: "A medication statement describing a patient on active PrEP"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition"
* ^experimental = true
* ^title = "HIV Prep Active"
* reasonCode = HIVConcepts#HIV.C.DE76 (required)
* medicationCodeableConcept from HIV.C.DE80 (required)


10 changes: 10 additions & 0 deletions input/fsh/profiles/HivStatusCondition.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Profile: HivStatusCondition
Parent: Condition
Description: "A condition representing a patient's HIV status."
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition"
* ^experimental = true
* ^title = "HIV Status Condition"
* clinicalStatus from http://hl7.org/fhir/ValueSet/condition-clinical (required)
* category from http://terminology.hl7.org/CodeSystem/condition-category where code = #encounter-diagnosis
* code from HIV.B.D115 (required)
10 changes: 10 additions & 0 deletions input/fsh/profiles/HivStatusObservation.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Profile: HivStatusObservation
Parent: Observation
Description: "An observation representing a patient's HIV status."
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition"
* ^experimental = true
* ^title = "HIV Status Observation"
* code = HIVConcepts#HIV.B.DE115
* value[x] only CodeableConcept 1..1
* valueCodeableConcept from HIV.B.D115 (required)
17 changes: 17 additions & 0 deletions input/fsh/profiles/HivTest.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Profile: HivTest
Parent: Observation
Description: "An DAK-specific HIV test observation with possible results"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition"
* ^experimental = true
* ^title = "HIV Test"
* code = HIVConcepts#HIV.B.DE81
* category from http://terminology.hl7.org/CodeSystem/observation-category#laboratory
* value[x] only CodeableConcept 1..*
* valueCodeableConcept from HIV.B.DE111 (required)
* effective[x] ^short = "Time at which test performed"
* effective[x] only dateTime or instant
* effective[x] ^definition = "The point in time at which the test was performed"
* issued ^short = "Time at which test results returned"
* issued ^definition = "The point in time at which the test results were returned to the patient or provider"

8 changes: 8 additions & 0 deletions input/fsh/profiles/template.fsh.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Profile:
Parent:
Description: ""
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablestructuredefinition"
* ^meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition"
* ^experimental = true
* ^title = ""

0 comments on commit 292a965

Please sign in to comment.