Skip to content

Commit

Permalink
Merge pull request #517 from nelsonhomo/SESP-315
Browse files Browse the repository at this point in the history
SESP-315: Include cd4 semi quantitativo
  • Loading branch information
Guimino authored Dec 17, 2024
2 parents 728a484 + 2f71212 commit a56da9f
Show file tree
Hide file tree
Showing 9 changed files with 963 additions and 423 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class QUERY {
+ "SELECT p.patient_id, pg.patient_program_id, MIN(ps.start_date) as minStateDate FROM patient p "
+ "inner join patient_program pg on p.patient_id=pg.patient_id "
+ "inner join patient_state ps on pg.patient_program_id=ps.patient_program_id "
+ "WHERE pg.voided=0 and ps.voided=0 and p.voided=0 and pg.program_id=2 and location_id=:location and ps.start_date BETWEEN :startDate and :endDate "
+ "WHERE pg.voided=0 and ps.voided=0 and p.voided=0 and pg.program_id=2 and location_id=:location and ps.start_date <=:endDate "
+ "GROUP BY pg.patient_program_id) minState "
+ "inner join patient_state ps on ps.patient_program_id=minState.patient_program_id "
+ "where ps.start_date=minState.minStateDate and ps.state=29 and ps.voided=0 ";
Expand All @@ -24,7 +24,7 @@ class QUERY {
+ "INNER JOIN obs obsTrans ON e.encounter_id=obsTrans.encounter_id AND obsTrans.voided=0 AND obsTrans.concept_id=1369 AND obsTrans.value_coded=1065 "
+ "INNER JOIN obs obsTarv ON e.encounter_id=obsTarv.encounter_id AND obsTarv.voided=0 AND obsTarv.concept_id=6300 AND obsTarv.value_coded=6276 "
+ "INNER JOIN obs obsData ON e.encounter_id=obsData.encounter_id AND obsData.voided=0 AND obsData.concept_id=23891 "
+ "WHERE p.voided=0 AND e.voided=0 AND e.encounter_type=53 AND obsData.value_datetime BETWEEN :startDate AND :endDate AND e.location_id=:location GROUP BY p.patient_id "
+ "WHERE p.voided=0 AND e.voided=0 AND e.encounter_type=53 AND obsData.value_datetime<=:endDate AND e.location_id=:location GROUP BY p.patient_id "
+ ") tr GROUP BY tr.patient_id ";

public static final String findPatientsWhoAreNewlyEnrolledOnART =
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ public String getExcelDesignUuid() {

@Override
public String getName() {
return "PEPFAR MER 2.7 Quarterly";
return "PEPFAR MER 2.8 Quarterly";
}

@Override
public String getDescription() {
return "PEPFAR MER 2.7 Quarterly";
return "PEPFAR MER 2.8 Quarterly";
}

@Override
Expand Down Expand Up @@ -149,8 +149,8 @@ public List<ReportDesign> constructReportDesigns(final ReportDefinition reportDe
reportDesign =
this.createXlsReportDesign(
reportDefinition,
"PEPFAR_MER_2.7_Quarterly.xls",
"PEPFAR MER 2.7 Quarterly",
"PEPFAR_MER_2.8_Quarterly.xls",
"PEPFAR MER 2.8 Quarterly",
this.getExcelDesignUuid(),
null);
final Properties props = new Properties();
Expand Down
Empty file.
Binary file removed api/src/main/resources/PEPFAR_MER_2.7_Quarterly.xls
Binary file not shown.
Binary file not shown.
685 changes: 454 additions & 231 deletions api/src/main/resources/TX_NEW/PATIENTS_WITH_CD4_GREATER_OR_EQUAL_200.sql

Large diffs are not rendered by default.

266 changes: 246 additions & 20 deletions api/src/main/resources/TX_NEW/PATIENTS_WITH_CD4_LESS_THAN_200.sql

Large diffs are not rendered by default.

271 changes: 181 additions & 90 deletions api/src/main/resources/TX_RTT/PATIENTS_IIT_PREVIOUS_PERIOD_WITH_CD4.sql

Large diffs are not rendered by default.

0 comments on commit a56da9f

Please # to comment.