-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add anc observation flat view implemenatation
- Loading branch information
Showing
1 changed file
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"resourceType": "http://41.59.228.177/datapipes/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition", | ||
"text": "Flat view definition for ANC Observation resource using component matching with list handling.", | ||
"fhirVersion": ["4.0"], | ||
"select": [ | ||
{ | ||
"column": [ | ||
{ | ||
"path": "getResourceKey()", | ||
"name": "id", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "subject.getReferenceKey(Patient)", | ||
"name": "patient_id", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "encounter.getReferenceKey(Encounter)", | ||
"name": "encounter_id", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "effective.ofType(dateTime)", | ||
"name": "obs_date", | ||
"type": "dateTime" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '11884-4').value.ofType(Quantity).value", | ||
"name": "pregnancy_age_weeks", | ||
"type": "decimal" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '11449-6').value.ofType(boolean)", | ||
"name": "positive_hiv_status_before_service", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '409073007').value.ofType(boolean)", | ||
"name": "provided_family_planning_counseling", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '384469009').value.ofType(boolean)", | ||
"name": "provided_infant_feeding_counseling", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '306206005').value.ofType(boolean)", | ||
"name": "refered_to_ctc", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '11998-7').value.ofType(integer)", | ||
"name": "gravidity", | ||
"type": "integer" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = 'LA6577-6' and code.coding[0].display = 'HIV status of spouse' ).value.ofType(CodeableConcept).coding[0].code", | ||
"name": "hiv_spouse_status_code", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = 'LA6577-6' and code.coding[0].display = 'HIV status of spouse').value.ofType(CodeableConcept).coding[0].display", | ||
"name": "hiv_spouse_status_display", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = 'LA6577-6' and code.coding[0].display = 'Syphilis status of spouse').value.ofType(CodeableConcept).coding[0].code", | ||
"name": "syphilis_spouse_status_code", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = 'LA6577-6' and code.coding[0].display = 'Syphilis status of spouse').value.ofType(CodeableConcept).coding[0].display", | ||
"name": "syphilis_spouse_status_display", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '47399-5').value.ofType(CodeableConcept).coding[0].code", | ||
"name": "syphilis_status_code", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '47399-5').value.ofType(CodeableConcept).coding[0].display", | ||
"name": "syphilis_status_display", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '55277-8').value.ofType(CodeableConcept).coding[0].code", | ||
"name": "hiv_status_code", | ||
"type": "string" | ||
}, | ||
{ | ||
"path": "component.where(code.coding[0].code = '55277-8').value.ofType(CodeableConcept).coding[0].display", | ||
"name": "hiv_status_display", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
], | ||
"name": "anc_observation_flat", | ||
"status": "active", | ||
"resource": "Observation" | ||
} |