Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 4862

Show
Ignore:
Timestamp:
07/08/08 20:30:46 (6 months ago)
Author:
catullus
Message:

data_sync_bidrectional: fixed hardcoding of HIV pediatric program

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/branches/data_synchronization_bidirectional/src/web/org/openmrs/web/controller/nealreports/NealReportController.java

    r4689 r4862  
    166166                List<Concept> conceptsToGet = new ArrayList<Concept>(); 
    167167                Map<Concept, String> namesForReportMaker = new HashMap<Concept, String>(); 
    168                 //conceptHelper(cs, conceptsToGet, namesForReportMaker, "ANTIRETROVIRAL TREATMENT GROUP", Hiv.TREATMENT_GROUP); 
     168                //conceptHelper(cs, conceptsToGet, namesForReportMaker, "ANTIRETROVIRAL        ", Hiv.TREATMENT_GROUP); 
    169169                //conceptHelper(cs, conceptsToGet, namesForReportMaker, "TUBERCULOSIS TREATMENT GROUP", TB.TB_GROUP); 
    170170                //conceptHelper(cs, conceptsToGet, namesForReportMaker, "CURRENT WHO HIV STAGE", Hiv.WHO_STAGE); 
     
    285285                // General.TB_ACTIVE_P  
    286286                Program hivProgram = Context.getProgramWorkflowService().getProgram("HIV PROGRAM"); 
    287                 if (hivProgram != null) { 
     287                Program hivPediatricProgram = Context.getProgramWorkflowService().getProgramByName("HIV PEDIATRIC PROGRAM"); 
     288                if (hivProgram != null && hivPediatricProgram != null) { 
    288289                        Map<Integer, PatientProgram> progs = pss.getCurrentPatientPrograms(ps, hivProgram); 
     290                        progs.putAll(pss.getCurrentPatientPrograms(ps, hivPediatricProgram)); 
    289291                        for (Map.Entry<Integer, PatientProgram> e : progs.entrySet()) { 
    290292                                patientDataHolder.get(e.getKey()).put(General.HIV_POSITIVE_P, "t"); 
     
    293295                        } 
    294296                        ProgramWorkflow wf = Context.getProgramWorkflowService().getWorkflow(hivProgram, "TREATMENT STATUS"); 
     297                        ProgramWorkflow wfPeds = hivPediatricProgram.getWorkflowByName("TREATMENT STATUS"); 
    295298                        log.debug("worlflow is " + wf + " and patientSet is " + ps); 
    296299                        Map<Integer, PatientState> states = pss.getCurrentStates(ps, wf); 
     300                        states.putAll(pss.getCurrentStates(ps, wfPeds)); 
    297301                        if ( states != null ) { 
    298302                                log.debug("about to loop through [" + states.size() + "] statuses"); 
     
    318322                         
    319323                        wf = Context.getProgramWorkflowService().getWorkflow(hivProgram, "TREATMENT GROUP"); 
     324                        wfPeds = hivPediatricProgram.getWorkflowByName("TREATMENT GROUP"); 
    320325                        log.debug("worlflow is " + wf + " and patientSet is " + ps); 
    321326                        states = pss.getCurrentStates(ps, wf); 
     327                        states.putAll(pss.getCurrentStates(ps, wfPeds)); 
    322328                        if ( states != null ) { 
    323329                                log.debug("about to loop through [" + states.size() + "] statuses");