I’m trying to save the a the state of my patient. However, I can’t find the service that saves the patient’s state. There is no method in the ProgramWorkflowService class that saves the patient state.
Does anybody know where it can be found, or does it not work that way?
PatientStates don’t exist on their own, they belong to PatientPrograms, you need to set the states on a PatientProgram and then save the PatientProgram
You should actually be calling PatientProgram.transitionToState(ProgramWorkflowState), the API will create and set the PatientState for you the proper way.