@Override
 protected Mapped<CohortDefinition> buildCohort(
     HybridReportDescriptor descriptor, PatientDataSetDefinition dsd) {
   Integer period = Integer.parseInt(descriptor.getId().split("\\.")[7]);
   CohortDefinition cd = artCohortLibrary.netCohortMonthsBetweenDatesGivenMonths(period);
   return ReportUtils.map(cd, "startDate=${startDate},endDate=${endDate}");
 }
 private DataDefinition lastSeen(HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition("lastSeenArt", new DateLastSeenArtCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }
 private DataDefinition viralSuppression(HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition("viralSuppression", new ViralSuppressionCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }
 private DataDefinition to(HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition("to", new IsArtTransferOutAndHasDateCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }
 private DataDefinition death(HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition("death", new DateOfDeathArtAnalysisCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }
 private DataDefinition baselineCd4(HybridReportDescriptor descriptor) {
   int months = Integer.parseInt(descriptor.getId().split("\\.")[7]);
   CalculationDataDefinition cd =
       new CalculationDataDefinition("baselinecd4", new BaselineCd4CountAndDateCalculation());
   cd.addCalculationParameter("outcomePeriod", months);
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   return cd;
 }
 private DataDefinition patientOutComes(HybridReportDescriptor descriptor) {
   int months = Integer.parseInt(descriptor.getId().split("\\.")[7]);
   CalculationDataDefinition cd =
       new CalculationDataDefinition("outcomes", new PatientArtOutComeCalculation());
   cd.addCalculationParameter("outcomePeriod", months);
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   return cd;
 }
 private DataDefinition nextAppointmentDate(HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition(
           "nextAppointmentArt", new LastReturnVisitDateArtAnalysisCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }
 private DataDefinition currentARTRegimen(HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition(
           "currentRegimen", new CurrentArtRegimenCohortAnalysisCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }
 private DataDefinition fromEligibilityToArtStart(HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition(
           "eligibilityToArtStart", new DaysFromArtEligibilityToArtInitiationCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }
 private DataDefinition dateAndReasonFirstMedicallyEligibleForArtCalculation(
     HybridReportDescriptor descriptor) {
   CalculationDataDefinition cd =
       new CalculationDataDefinition(
           "date and reason", new DateAndReasonFirstMedicallyEligibleForArtARTCalculation());
   cd.addParameter(new Parameter("onDate", "On Date", Date.class));
   cd.addCalculationParameter(
       "outcomePeriod", Integer.parseInt(descriptor.getId().split("\\.")[7]));
   return cd;
 }