Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEPTS-1623 | RM DAH CHANGES DECEMBER #1305

Open
wants to merge 8 commits into
base: 2.x_develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"B12",
map(
resumoMensalCohortQueries.getPatientsWhoWereActiveByEndOfPreviousMonthB12(),
"startDate=${startDate},endDate=${endDate},location=${location}"));
"startDate=${startDate-4m},endDate=${startDate-3m-1d},location=${location}"));

cd.addSearch(
"I1",
Expand Down Expand Up @@ -324,10 +324,17 @@
cd.setName("Relatório – Indicador 10 Resultado de CD4 baixo");
cd.addParameters(getCohortParameters());

cd.addSearch("haveCd4Results", mapStraightThrough(getPatientsWhoHaveCd4Results()));
cd.addSearch(

Check warning on line 327 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L327

Added line #L327 was not covered by tests
"haveCd4Results",
map(
getPatientsWhoHaveCd4ResultsComposition(),

Check warning on line 330 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L329-L330

Added lines #L329 - L330 were not covered by tests
"startDate=${startDate},endDate=${endDate},location=${location}"));

cd.addSearch(
"cd4ByAgeAndResult", mapStraightThrough(getPatientsWithCD4BasedOnAgeAndCd4Results()));
"cd4ByAgeAndResult",
map(
getPatientsWithCD4BasedOnAgeAndCd4Results(),

Check warning on line 336 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L335-L336

Added lines #L335 - L336 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand All @@ -353,7 +360,7 @@
* Clínica” com “Data de Consulta” ocorrida durante o período (>= “Data Início” e <= “Data
* Fim) e resultado igual a “Positivo” ou “Negativo”.
*
* @see #getPatientsWhoHaveCd4Results
* @see #getPatientsWhoHaveCd4ResultsComposition
* @return {@link CohortDefinition}
*/
public CohortDefinition getPatientsWithTBLAMResults() {
Expand All @@ -365,21 +372,22 @@
cd.addSearch(
"haveCd4Results",
map(
getPatientsWhoHaveCd4Results(),
"startDate=${startDate-1m},endDate=${endDate},location=${location}"));
getPatientsWhoHaveCd4ResultsComposition(),

Check warning on line 375 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L375

Added line #L375 was not covered by tests
"startDate=${startDate},endDate=${endDate},location=${location}"));

cd.addSearch(
"cd4ByAgeAndResult",
map(
getPatientsWithCD4BasedOnAgeAndCd4Results(),
"startDate=${startDate-1m},endDate=${endDate},location=${location}"));
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"tbLamResults",
mapStraightThrough(
map(

Check warning on line 386 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L386

Added line #L386 was not covered by tests
getPatientsWithPositiveOrNegativeTestResults(
Collections.singletonList(tbMetadata.getTestTBLAM()),
Arrays.asList(hivMetadata.getPositive(), hivMetadata.getNegative()))));
Arrays.asList(hivMetadata.getPositive(), hivMetadata.getNegative())),

Check warning on line 389 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L389

Added line #L389 was not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand Down Expand Up @@ -411,14 +419,19 @@
cd.setName("Relatório – Indicador 12 Resultado de TB LAM Positivo");
cd.addParameters(getCohortParameters());

cd.addSearch("tbLamResults", mapStraightThrough(getPatientsWithTBLAMResults()));
cd.addSearch(

Check warning on line 422 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L422

Added line #L422 was not covered by tests
"tbLamResults",
map(
getPatientsWithTBLAMResults(),

Check warning on line 425 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L424-L425

Added lines #L424 - L425 were not covered by tests
"startDate=${startDate},endDate=${endDate},location=${location}"));

cd.addSearch(
"tbLamPositive",
mapStraightThrough(
map(

Check warning on line 430 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L430

Added line #L430 was not covered by tests
getPatientsWithPositiveOrNegativeTestResults(
Collections.singletonList(tbMetadata.getTestTBLAM()),
Collections.singletonList(hivMetadata.getPositive()))));
Collections.singletonList(hivMetadata.getPositive())),

Check warning on line 433 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L433

Added line #L433 was not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand All @@ -431,7 +444,7 @@
}

/**
* <b> Relatório – Indicador 13 CD4 Baixo e Resultado de CrAg Sérico</b>
* <b> Relatório – Indicador 13 CD4 Baixo e Resultado de CrAg Sérvico</b>
* <li>Incluindo todos os utentes com resultado de CD4 baixo durante o período compreendido entre
* “Data Início” menos (-) 1 mês e “Data Fim” (seguindo os critérios definidos no Indicador 10
* – RF16 com período diferente)
Expand All @@ -449,22 +462,19 @@
public CohortDefinition getPatientsWithLowCd4AndCragResults() {
CompositionCohortDefinition cd = new CompositionCohortDefinition();

cd.setName("Relatório – Indicador 13 CD4 Baixo e Resultado de CrAg Sérico");
cd.setName("Relatório – Indicador 13 CD4 Baixo e Resultado de CrAg Sérvico");

Check warning on line 465 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L465

Added line #L465 was not covered by tests
cd.addParameters(getCohortParameters());

cd.addSearch(
"haveLowCd4Results",
map(
getPatientsWithLowCd4Results(),
"startDate=${startDate-1m},endDate=${endDate},location=${location}"));
cd.addSearch("haveLowCd4Results", mapStraightThrough(getPatientsWithLowCd4Results()));

Check warning on line 468 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L468

Added line #L468 was not covered by tests

cd.addSearch(
"cragResults",
mapStraightThrough(
map(

Check warning on line 472 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L472

Added line #L472 was not covered by tests
getPatientsWithPositiveOrNegativeTestResults(
Arrays.asList(
hivMetadata.getCragSoroLabsetConcept(), hivMetadata.getCragSoroConcept()),
Arrays.asList(hivMetadata.getPositive(), hivMetadata.getNegative()))));
Arrays.asList(hivMetadata.getPositive(), hivMetadata.getNegative())),

Check warning on line 476 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L476

Added line #L476 was not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand Down Expand Up @@ -500,11 +510,12 @@

cd.addSearch(
"cragPositive",
mapStraightThrough(
map(

Check warning on line 513 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L513

Added line #L513 was not covered by tests
getPatientsWithPositiveOrNegativeTestResults(
Arrays.asList(
hivMetadata.getCragSoroLabsetConcept(), hivMetadata.getCragSoroConcept()),
Collections.singletonList(hivMetadata.getPositive()))));
Collections.singletonList(hivMetadata.getPositive())),

Check warning on line 517 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L517

Added line #L517 was not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand Down Expand Up @@ -537,9 +548,10 @@

cd.addSearch(
"cragResults",
mapStraightThrough(
map(

Check warning on line 551 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L551

Added line #L551 was not covered by tests
getPatientsWithPositiveOrNegativeCragLCRResults(
Arrays.asList(hivMetadata.getPositive(), hivMetadata.getNegative()))));
Arrays.asList(hivMetadata.getPositive(), hivMetadata.getNegative())),

Check warning on line 553 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L553

Added line #L553 was not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand Down Expand Up @@ -568,7 +580,11 @@

cd.addSearch("cragPositive", mapStraightThrough(getPatientsWithLowCd4AndPositiveCragResults()));

cd.addSearch("mccPreventivo", mapStraightThrough(getPatientsWhoStartedMccPreventivo()));
cd.addSearch(

Check warning on line 583 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L583

Added line #L583 was not covered by tests
"mccPreventivo",
map(
getPatientsWhoStartedMccPreventivo(),

Check warning on line 586 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L585-L586

Added lines #L585 - L586 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand Down Expand Up @@ -602,11 +618,16 @@

cd.addSearch(
"cragLCRPositive",
mapStraightThrough(
map(

Check warning on line 621 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L621

Added line #L621 was not covered by tests
getPatientsWithPositiveOrNegativeCragLCRResults(
Collections.singletonList(hivMetadata.getPositive()))));
Collections.singletonList(hivMetadata.getPositive())),

Check warning on line 623 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L623

Added line #L623 was not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch("mmcTreatment", mapStraightThrough(getPatientsInMccTretament()));
cd.addSearch(

Check warning on line 626 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L626

Added line #L626 was not covered by tests
"mmcTreatment",
map(
getPatientsInMccTretament(),

Check warning on line 629 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L628-L629

Added lines #L628 - L629 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
Expand Down Expand Up @@ -947,6 +968,36 @@
return sqlCohortDefinition;
}

/**
* Filtrando os utentes com o respectivo “Resultado de CD4” (identificado nos critérios acima
* definidos) de acordo com a seguinte definição:
* <li>< 750 para os utentes com idade < 1 ano
* <li>< 500 para os utentes com idade entre 1 a 4anos
* <li>< 200 (absoluto) ou “<=200” (semi-quantitativo) para os utentes com idade >= 5 anos
*
* @return {@link CohortDefinition}
*/
public CohortDefinition getPatientsWhoHaveCd4ResultsComposition() {
CompositionCohortDefinition cd = new CompositionCohortDefinition();
cd.setName("Número de utentes com resultado de CD4 de rastreio disponível");
cd.addParameters(getCohortParameters());

Check warning on line 983 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L981-L983

Added lines #L981 - L983 were not covered by tests

CohortDefinition cd4Results = getPatientsWhoHaveCd4Results();
CohortDefinition cd4Request = getPatientsWhoHaveCd4Request();

Check warning on line 986 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L985-L986

Added lines #L985 - L986 were not covered by tests

cd.addSearch(

Check warning on line 988 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L988

Added line #L988 was not covered by tests
"cd4Results",
map(cd4Results, "startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));
cd.addSearch(

Check warning on line 991 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L990-L991

Added lines #L990 - L991 were not covered by tests
"cd4Request",
map(

Check warning on line 993 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L993

Added line #L993 was not covered by tests
cd4Request,
"startDate=${startDate-4m+1d},endDate=${startDate-3m-1d},location=${location}"));

cd.setCompositionString("cd4Results AND cd4Request");
return cd;

Check warning on line 998 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L997-L998

Added lines #L997 - L998 were not covered by tests
}

/**
* Filtrando os utentes com o respectivo “Resultado de CD4” (identificado nos critérios acima
* definidos) de acordo com a seguinte definição:
Expand Down Expand Up @@ -1234,15 +1285,24 @@
cd.addParameters(getCohortParameters());

cd.addSearch(
"onSKIndication", mapStraightThrough(getPatientsWithSarcomaSKAndQuimiotherapyIndication()));
"onSKIndication",
map(
getPatientsWithSarcomaSKAndQuimiotherapyIndication(),

Check warning on line 1290 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1289-L1290

Added lines #L1289 - L1290 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
map(
getPatientsWhoStartedFollowupOnDAHComposition(),
"startDate=${endDate},endDate={endDate},location=${location}"));

cd.setCompositionString("onDAH AND onSKIndication");
cd.addSearch(

Check warning on line 1299 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1299

Added line #L1299 was not covered by tests
"cd4Request",
map(
getPatientsWhoHaveCd4Request(),

Check warning on line 1302 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1301-L1302

Added lines #L1301 - L1302 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${startDate-3m-1d},location=${location}"));

cd.setCompositionString("onDAH AND onSKIndication AND cd4Request");

Check warning on line 1305 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1305

Added line #L1305 was not covered by tests
return cd;
}

Expand All @@ -1262,15 +1322,23 @@

cd.addSearch(
"onSKIndicationStartedQuimio",
mapStraightThrough(getPatientsWithSarcomaSKAndStartedQuimiotherapy()));
map(
getPatientsWithSarcomaSKAndStartedQuimiotherapy(),

Check warning on line 1326 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1325-L1326

Added lines #L1325 - L1326 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${endDate},location=${location}"));

cd.addSearch(
"onDAH",
map(
getPatientsWhoStartedFollowupOnDAHComposition(),
"startDate=${endDate},endDate={endDate},location=${location}"));

cd.setCompositionString("onDAH AND onSKIndicationStartedQuimio");
cd.addSearch(

Check warning on line 1335 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1335

Added line #L1335 was not covered by tests
"cd4Request",
map(
getPatientsWhoHaveCd4Request(),

Check warning on line 1338 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1337-L1338

Added lines #L1337 - L1338 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${startDate-3m-1d},location=${location}"));

cd.setCompositionString("onDAH AND onSKIndicationStartedQuimio AND cd4Request");

Check warning on line 1341 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1341

Added line #L1341 was not covered by tests
return cd;
}

Expand Down Expand Up @@ -1406,10 +1474,12 @@

if (eightToNine) {
cd.addSearch(
"B1", map(rmB1, "startDate=${startDate-2m},endDate=${endDate},location=${location}"));
"B1",
map(rmB1, "startDate=${startDate-6m},endDate=${startDate-3m-1d},location=${location}"));

Check warning on line 1478 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1478

Added line #L1478 was not covered by tests

cd.addSearch(
"A2", map(rmA2, "startDate=${startDate-2m},endDate=${endDate},location=${location}"));
"A2",
map(rmA2, "startDate=${startDate-6m},endDate=${startDate-3m-1d},location=${location}"));

Check warning on line 1482 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1482

Added line #L1482 was not covered by tests
} else {
cd.addSearch(
"B1",
Expand All @@ -1428,7 +1498,7 @@
"PREGNANT",
map(
intensiveMonitoringCohortQueries.getMI15C(),
"startDate=${startDate-3m},endDate=${endDate},location=${location}"));
"startDate=${startDate-7m},endDate=${startDate-3m-1d},location=${location}"));

cd.setCompositionString(
eightToNine ? "(B1 OR A2) AND NOT PREGNANT" : "(newOnArt OR B1 OR A2) AND NOT PREGNANT");
Expand Down Expand Up @@ -1472,14 +1542,15 @@
if (eightToNine) {
cd.addSearch(
"B3P1",
map(rmB3, "startDate=${startDate-2m},endDate=${endDate-2m},location=${location}"));
map(rmB3, "startDate=${startDate-6m},endDate=${startDate-5m-1d},location=${location}"));

Check warning on line 1545 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1545

Added line #L1545 was not covered by tests

cd.addSearch(
"B3P2",
map(rmB3, "startDate=${startDate-1m},endDate=${endDate-1m},location=${location}"));
map(rmB3, "startDate=${startDate-5m},endDate=${startDate-4m-1d},location=${location}"));

Check warning on line 1549 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1549

Added line #L1549 was not covered by tests

cd.addSearch(
"B3P3", map(rmB3, "startDate=${startDate},endDate=${endDate},location=${location}"));
"B3P3",
map(rmB3, "startDate=${startDate-4m},endDate=${startDate-3m-1d},location=${location}"));

Check warning on line 1553 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1553

Added line #L1553 was not covered by tests
} else {
cd.addSearch(
"B3P1",
Expand Down Expand Up @@ -1507,7 +1578,7 @@
"PREGNANT",
map(
intensiveMonitoringCohortQueries.getMI15C(),
"startDate=${startDate-3m},endDate=${endDate},location=${location}"));
"startDate=${startDate-7m},endDate=${startDate-3m-1d},location=${location}"));

cd.addSearch(
"newArt", mapStraightThrough(getPatientsWhoAreNewInArtDisaggregation(eightToNine)));
Expand Down Expand Up @@ -1555,7 +1626,8 @@

if (eightToNine) {
cd.addSearch(
"B12", map(rmb12, "startDate=${startDate},endDate=${endDate},location=${location}"));
"B12",
map(rmb12, "startDate=${startDate-4m},endDate=${startDate-3m-1d},location=${location}"));

Check warning on line 1630 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1630

Added line #L1630 was not covered by tests
} else {
cd.addSearch(
"B12",
Expand All @@ -1569,7 +1641,7 @@
"PREGNANT",
map(
intensiveMonitoringCohortQueries.getMI15C(),
"startDate=${startDate-3m},endDate=${endDate},location=${location}"));
"startDate=${startDate-7m},endDate=${startDate-3m-1d},location=${location}"));

cd.addSearch(
"restarted", mapStraightThrough(getPatientsWhoRestartedArtDisaggregation(eightToNine)));
Expand Down Expand Up @@ -1606,7 +1678,9 @@

cd.addSearch(
"RM",
map(rmDefinition, "startDate=${startDate-2m},endDate=${endDate},location=${location}"));
map(

Check warning on line 1681 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/cohorts/advancedhivillness/ResumoMensalDAHCohortQueries.java#L1681

Added line #L1681 was not covered by tests
rmDefinition,
"startDate=${startDate-6m},endDate=${startDate-3m-1d},location=${location}"));

cd.addSearch(
"tarvSituation", mapStraightThrough(getPatientsWithAnyArtSituationOrWithoutFichaDAH()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,18 @@
return mapStraightThrough(
eptsGeneralIndicator.getIndicator(
"Relatório- Indicador 8 – Pedido de CD4",
mapStraightThrough(resumoMensalDAHCohortQueries.getPatientsWhoHaveCd4Request())));
map(
resumoMensalDAHCohortQueries.getPatientsWhoHaveCd4Request(),

Check warning on line 417 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/datasets/resumo/ResumoMensalDAHDatasetDefinition.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/datasets/resumo/ResumoMensalDAHDatasetDefinition.java#L416-L417

Added lines #L416 - L417 were not covered by tests
"startDate=${startDate-4m+1d},endDate=${startDate-3m-1d},location=${location}")));
}

private Mapped<CohortIndicator> getPatientsWhoHaveCd4Results() {
return mapStraightThrough(
eptsGeneralIndicator.getIndicator(
"Relatório- Indicador 9 – Resultado de CD4",
mapStraightThrough(resumoMensalDAHCohortQueries.getPatientsWhoHaveCd4Results())));
map(
resumoMensalDAHCohortQueries.getPatientsWhoHaveCd4ResultsComposition(),

Check warning on line 426 in api/src/main/java/org/openmrs/module/eptsreports/reporting/library/datasets/resumo/ResumoMensalDAHDatasetDefinition.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/openmrs/module/eptsreports/reporting/library/datasets/resumo/ResumoMensalDAHDatasetDefinition.java#L425-L426

Added lines #L425 - L426 were not covered by tests
"startDate=${startDate},endDate=${endDate},location=${location}")));
}

private Mapped<CohortIndicator> getPatientsWithLowCd4Results() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public CohortDefinitionDimension maternityDimension() {
"pregnant-dah",
EptsReportUtils.map(
intensiveMonitoringCohortQueries.getMI15C(),
"startDate=${startDate-3m},endDate=${endDate},location=${location}"));
"startDate=${startDate-7m},endDate=${startDate-3m-1d},location=${location}"));
return dim;
}

Expand Down
Loading