Details
-
Bug
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
None
-
None
-
None
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.
Gliffy Diagrams
Attachments
Issue Links
- is related to
-
TRUNK-5228 PatientProgram: If a program is completed, voidPatientState should set end date of previous state to date completed of program
-
- Closed
-
-
TRUNK-5230 PatientProgram: When completing a program, the end date of the most recent state in each workflow should be set to the completion date of the program
-
- Closed
-