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

PatientProgram: If you transition to a new state when a program is complete, the state end date should be set to the completion date of the program

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Platform 2.2.0, Core 2.2.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      PatientProgram has the folllowing utility method to transition to a new state (which the REST module delegates to when adding new states):

      public void transitionToState(ProgramWorkflowState programWorkflowState, Date onDate)

      This method will set the end date of the current “last” state to the “onDate”, and then create a the new state with startDate = onDAte, and endDate = null.

      In this case, we want to set the endDate to the dateCompleted if the program is completed.

      ---------------------------

      This functionality has been implemented in the following feature branch:

      https://github.com/openmrs/openmrs-core/commit/abdb6bfdc15471ca35e655130cf3a0d9a6264d03

      ... but should not be added until TRUNK-5230 is completed for consistency.

      There was talk of backporting these, features, but I think it's fine to just apply them to the latest master at this point... *but note*that this feature branch was made off of 1.10.x, so you may want/need to cherry pick this commit into the master branch.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mogoodrich Mark Goodrich
                Reporter:
                mogoodrich Mark Goodrich
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: