-
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!: rejigger resource/stratifier info for non-cubed tables
For never-cubed tables (resources_per_pt and all quality summaries), we were previously sticking a not-very-human-friendly identifier like observation_valuecodeableconcept in the first column, named "id". Now, we always name the first column "resource", add a second column with the specific metric's stratifier, and use better casing. id: observation_valuecodeableconcept -> becomes -> resource: Observation field: valueCodeableConcept All such tables now have two columns, even if a stratifier isn't used. In which case, we call the second column "stratifier" and leave it as all NULL.
- Loading branch information
Showing
18 changed files
with
132 additions
and
118 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""Data Metrics study for Cumulus Library""" | ||
|
||
__version__ = "3.0.0" | ||
__version__ = "4.0.0" |
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
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
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
id,numerator,denominator,percentage | ||
procedure,2,5,40.00 | ||
observation,0,0,0.00 | ||
medicationrequest,0,0,0.00 | ||
immunization,0,0,0.00 | ||
encounter,1,4,25.00 | ||
documentreference,0,0,0.00 | ||
diagnosticreport,0,0,0.00 | ||
condition,2,4,50.00 | ||
allergyintolerance,0,0,0.00 | ||
resource,stratifier,numerator,denominator,percentage | ||
Procedure,,2,5,40.00 | ||
Observation,,0,0,0.00 | ||
MedicationRequest,,0,0,0.00 | ||
Immunization,,0,0,0.00 | ||
Encounter,,1,4,25.00 | ||
DocumentReference,,0,0,0.00 | ||
DiagnosticReport,,0,0,0.00 | ||
Condition,,2,4,50.00 | ||
AllergyIntolerance,,0,0,0.00 |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
id,numerator,denominator,percentage | ||
resource,target,numerator,denominator,percentage | ||
# Various edge cases here in procedure | ||
procedure_patient,1,4,25.00 | ||
Procedure,Patient,1,4,25.00 | ||
# Rest are just short happy-path checks to confirm that we look at the right json field | ||
observation_patient,0,1,0.00 | ||
medicationrequest_patient,0,1,0.00 | ||
immunization_patient,0,1,0.00 | ||
encounter_patient,0,1,0.00 | ||
documentreference_patient,0,1,0.00 | ||
diagnosticreport_patient,0,1,0.00 | ||
device_patient,0,1,0.00 | ||
condition_patient,0,1,0.00 | ||
allergyintolerance_patient,0,1,0.00 | ||
Observation,Patient,0,1,0.00 | ||
MedicationRequest,Patient,0,1,0.00 | ||
Immunization,Patient,0,1,0.00 | ||
Encounter,Patient,0,1,0.00 | ||
DocumentReference,Patient,0,1,0.00 | ||
DiagnosticReport,Patient,0,1,0.00 | ||
Device,Patient,0,1,0.00 | ||
Condition,Patient,0,1,0.00 | ||
AllergyIntolerance,Patient,0,1,0.00 |
38 changes: 19 additions & 19 deletions
38
tests/data/q_ref_target_valid/general/expected_summary.csv
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
id,numerator,denominator,percentage | ||
resource,target,numerator,denominator,percentage | ||
# Various edge cases here in procedure | ||
procedure_patient,1,9,11.11 | ||
procedure_encounter,1,9,11.11 | ||
Procedure,Patient,1,9,11.11 | ||
Procedure,Encounter,1,9,11.11 | ||
# Rest are just short happy-path checks to confirm that we look at the right json field | ||
observation_patient,0,1,0.00 | ||
observation_encounter,0,1,0.00 | ||
medicationrequest_patient,0,1,0.00 | ||
medicationrequest_encounter,0,1,0.00 | ||
immunization_patient,0,1,0.00 | ||
immunization_encounter,0,1,0.00 | ||
encounter_patient,0,1,0.00 | ||
Observation,Patient,0,1,0.00 | ||
Observation,Encounter,0,1,0.00 | ||
MedicationRequest,Patient,0,1,0.00 | ||
MedicationRequest,Encounter,0,1,0.00 | ||
Immunization,Patient,0,1,0.00 | ||
Immunization,Encounter,0,1,0.00 | ||
Encounter,Patient,0,1,0.00 | ||
# Except DocRefs also have some extra cases around encounter array support | ||
documentreference_patient,0,6,0.00 | ||
documentreference_encounter,3,6,50.00 | ||
diagnosticreport_patient,0,1,0.00 | ||
diagnosticreport_encounter,0,1,0.00 | ||
device_patient,0,1,0.00 | ||
condition_patient,0,1,0.00 | ||
condition_encounter,0,1,0.00 | ||
allergyintolerance_patient,0,1,0.00 | ||
allergyintolerance_encounter,0,1,0.00 | ||
DocumentReference,Patient,0,6,0.00 | ||
DocumentReference,Encounter,3,6,50.00 | ||
DiagnosticReport,Patient,0,1,0.00 | ||
DiagnosticReport,Encounter,0,1,0.00 | ||
Device,Patient,0,1,0.00 | ||
Condition,Patient,0,1,0.00 | ||
Condition,Encounter,0,1,0.00 | ||
AllergyIntolerance,Patient,0,1,0.00 | ||
AllergyIntolerance,Encounter,0,1,0.00 |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
id,numerator,denominator,percentage | ||
resource,field,numerator,denominator,percentage | ||
# Various edge cases here in procedure | ||
procedure_code,4,12,33.33 | ||
Procedure,code,4,12,33.33 | ||
# Rest are often short happy-path checks to confirm that we look at the right json field | ||
observation_valuecodeableconcept,0,2,0.00 | ||
observation_code,0,2,0.00 | ||
medicationrequest_medicationcodeableconcept,0,1,0.00 | ||
medication_code,0,1,0.00 | ||
immunization_vaccinecode,0,1,0.00 | ||
documentreference_type,1,3,33.33 | ||
diagnosticreport_code,0,1,0.00 | ||
device_type,0,1,0.00 | ||
condition_code,0,1,0.00 | ||
allergyintolerance_code,0,1,0.00 | ||
Observation,valueCodeableConcept,0,2,0.00 | ||
Observation,code,0,2,0.00 | ||
MedicationRequest,medicationCodeableConcept,0,1,0.00 | ||
Medication,code,0,1,0.00 | ||
Immunization,vaccineCode,0,1,0.00 | ||
DocumentReference,type,1,3,33.33 | ||
DiagnosticReport,code,0,1,0.00 | ||
Device,type,0,1,0.00 | ||
Condition,code,0,1,0.00 | ||
AllergyIntolerance,code,0,1,0.00 |
Oops, something went wrong.