Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2995

A Program work flow should provide the transition order of its states

    Details

    • Type: New Feature
    • Status: Ready for Work
    • Priority: Could
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      Add these two methods to PatientProgram:

      class PatientProgram {
          // ...
      
          // returns statuses, in date order, for the specified workflow within this program enrollment
          List<PatientState> getStates(ProgramWorkflow forWorkflow) { ... }
      
          // organizes all patient states for this program enrollment by their workflow, and sorts them in date order
          Map<ProgramWorkflow, List<PatientState>> getStatesByWorkflow() { ... }
      }
      

      Extra credit for refactoring the code in PatientProgramValidator to use these methods to determine overlapping states and invalid transitions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                wyclif Wyclif Luyima
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: