From 869e397848d3817b888adb7dd135489bbcb402a2 Mon Sep 17 00:00:00 2001 From: Kipkemoii Date: Mon, 17 Mar 2025 09:01:44 +0300 Subject: [PATCH 1/3] POC-907: Added hpv test to patient summary for patients who have had the test done on them --- dao/patient/etl-patient-dao.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dao/patient/etl-patient-dao.js b/dao/patient/etl-patient-dao.js index 39a632892..902bf7954 100755 --- a/dao/patient/etl-patient-dao.js +++ b/dao/patient/etl-patient-dao.js @@ -28,7 +28,7 @@ module.exports = (function () { ? { columns: request.query.fields || - 'fli.vl_1_date as latest_vl_date,fli.vl_1 as latest_vl,t1.*, t3.cm_result,t3.cm_result_date, t3.cm_test, t3.cm_treatment_end_date, t3.cm_treatment_phase, t3.cm_treatment_start_date', + 't4.hpv,fli.vl_1_date as latest_vl_date,fli.vl_1 as latest_vl,t1.*, t3.cm_result,t3.cm_result_date, t3.cm_test, t3.cm_treatment_end_date, t3.cm_treatment_phase, t3.cm_treatment_start_date', table: 'etl.flat_hiv_summary_v15b', where: whereClause, leftOuterJoins: [ @@ -41,6 +41,11 @@ module.exports = (function () { '(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)', 'fli', 'fli.person_id = t1.person_id' + ], + [ + '(select t4.person_id, t4.hpv from etl.flat_labs_and_imaging t4 where t4.hpv is not null)', + 't4', + 't4.person_id = t1.person_id' ] ], order: order || [ From 5f001ae1b61352ae31d547340410a9aae6fda6cb Mon Sep 17 00:00:00 2001 From: Kipkemoii Date: Thu, 3 Apr 2025 09:06:12 +0300 Subject: [PATCH 2/3] POC-907: Added hpv test and test date under hiv summary --- dao/patient/etl-patient-dao.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dao/patient/etl-patient-dao.js b/dao/patient/etl-patient-dao.js index 902bf7954..3b5343dc6 100755 --- a/dao/patient/etl-patient-dao.js +++ b/dao/patient/etl-patient-dao.js @@ -28,7 +28,7 @@ module.exports = (function () { ? { columns: request.query.fields || - 't4.hpv,fli.vl_1_date as latest_vl_date,fli.vl_1 as latest_vl,t1.*, t3.cm_result,t3.cm_result_date, t3.cm_test, t3.cm_treatment_end_date, t3.cm_treatment_phase, t3.cm_treatment_start_date', + 'max(t4.test_datetime) as hpv_test_date, t4.hpv,fli.vl_1_date as latest_vl_date,fli.vl_1 as latest_vl,t1.*, t3.cm_result,t3.cm_result_date, t3.cm_test, t3.cm_treatment_end_date, t3.cm_treatment_phase, t3.cm_treatment_start_date', table: 'etl.flat_hiv_summary_v15b', where: whereClause, leftOuterJoins: [ @@ -43,7 +43,7 @@ module.exports = (function () { 'fli.person_id = t1.person_id' ], [ - '(select t4.person_id, t4.hpv from etl.flat_labs_and_imaging t4 where t4.hpv is not null)', + '(select t4.person_id, t4.hpv, t4.test_datetime from etl.flat_labs_and_imaging t4 where t4.hpv is not null)', 't4', 't4.person_id = t1.person_id' ] From 7d741a87518228882325223448f5597e45324863 Mon Sep 17 00:00:00 2001 From: Kipkemoii Date: Thu, 3 Apr 2025 09:09:05 +0300 Subject: [PATCH 3/3] POC-907: Added hpv test and test date under hiv summary --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 826d2f867..4117f1917 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,9 +11,9 @@ jobs: matrix: node-version: [12.x, 10.x] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Cache node modules - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}