Skip to content

Commit

Permalink
Merge pull request #1376 from Alfred-Mutai/POC-721
Browse files Browse the repository at this point in the history
POC-721:To add Height, Weight, WHO Stage Columns in AMRS Line list
  • Loading branch information
Rugute authored Apr 16, 2024
2 parents fcc487d + d1b9167 commit ee485a9
Show file tree
Hide file tree
Showing 12 changed files with 516 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/reporting-framework/hiv/moh-731.report.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export class Moh731Report extends MultiDatasetPatientlistReport {
params.hivMonthlyDatasetSource = 'etl.hiv_monthly_report_dataset_frozen'; // defaults to frozen
params.hivVlDataSource =
'(SELECT fli.person_id, fli.hiv_viral_load as vl_1, fli.test_datetime as vl_1_date FROM etl.flat_labs_and_imaging fli INNER JOIN (SELECT person_id, MAX(test_datetime) AS max_vl_1_date,max(encounter_id) as encounter_id FROM etl.flat_labs_and_imaging fli where fli.hiv_viral_load is not null GROUP BY person_id) max_dates ON fli.person_id = max_dates.person_id AND fli.test_datetime = max_dates.max_vl_1_date AND fli.encounter_id = max_dates.encounter_id)';
params.hivSummaryDataSource =
'(SELECT fhsvb.person_id, fhsvb.weight, fhsvb.height, fhsvb.cur_who_stage as stage FROM etl.flat_hiv_summary_v15b fhsvb where fhsvb.is_clinical_encounter = 1 and fhsvb.next_clinical_datetime_hiv is null)';
console.log('creating new moh 731 report service');
super(reportName, params);
}
Expand Down
15 changes: 15 additions & 0 deletions app/reporting-framework/json-reports/daily-appointments-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@
"type": "simple_column",
"alias": "hiv_disclosure_status",
"column": "fhs.hiv_disclosure_status_value"
},
{
"type": "simple_column",
"alias": "height",
"column": "fhs.height"
},
{
"type": "simple_column",
"alias": "weight",
"column": "fhs.weight"
},
{
"type": "simple_column",
"alias": "stage",
"column": "fhs.cur_who_stage"
}
],
"indexDirectives": [
Expand Down
Loading

0 comments on commit ee485a9

Please sign in to comment.