Examples of ExitFromCareProperty


Examples of org.openmrs.module.htmlformentry.property.ExitFromCareProperty

            Context.getPersonService().savePerson(patient);
        }

        // exit the patient from care or process patient's death
        if (submissionActions.getExitFromCareProperty() != null) {
            ExitFromCareProperty exitFromCareProperty =
                    submissionActions.getExitFromCareProperty();
            if (exitFromCareProperty.getCauseOfDeathConcept() != null) {
                Context.getPatientService().processDeath(this.getPatient(), exitFromCareProperty.getDateOfExit(),
                        exitFromCareProperty.getCauseOfDeathConcept(), exitFromCareProperty.getOtherReason());
            } else {
                Context.getPatientService().exitFromCare(this.getPatient(), exitFromCareProperty.getDateOfExit(), exitFromCareProperty.getReasonExitConcept());
            }

        }

        // handle any custom actions (for an example of a custom action, see: https://github.com/PIH/openmrs-module-appointmentschedulingui/commit/e2cda8de1caa8a45d319ae4fbf7714c90c9adb8b)
View Full Code Here

Examples of org.openmrs.module.htmlformentry.property.ExitFromCareProperty

     * @param otherReason - in case the causeOfDeath is 'other', a place to store more info
     */
    public void exitFromCare(Date date, Concept exitReasonConcept, Concept causeOfDeathConcept, String otherReason){

        if (date != null && exitReasonConcept != null){
            this.exitFromCareProperty = new ExitFromCareProperty(date,exitReasonConcept,causeOfDeathConcept,otherReason);
        }else {
            throw new IllegalArgumentException("Exit From Care: date and exitReasonConcept cannot be null");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.