List of usage examples for org.apache.commons.collections4 MapUtils getString
public static <K> String getString(final Map<? super K, ?> map, final K key)
From source file:org.rippleosi.patient.careplans.search.CarePlanDetailsTransformer.java
private CareDocument extractCareDocument(Map<String, Object> input) { Date dateCreated = DateFormatter.toDate(MapUtils.getString(input, "date_created")); CareDocument careDocument = new CareDocument(); careDocument.setName("End of Life Care"); careDocument.setAuthor(MapUtils.getString(input, "author")); careDocument.setDateCreated(dateCreated); careDocument.setType("Document"); return careDocument; }
From source file:org.rippleosi.patient.careplans.search.CarePlanDetailsTransformer.java
private CPRDecision extractCPRDecision(Map<String, Object> input) { Date dateOfDecision = DateFormatter.toDate(MapUtils.getString(input, "cpr_date_of_decision")); CPRDecision cprDecision = new CPRDecision(); cprDecision.setCprDecision(MapUtils.getString(input, "cpr_decision")); cprDecision.setDateOfDecision(dateOfDecision); cprDecision.setComment(MapUtils.getString(input, "cpr_comment")); return cprDecision; }
From source file:org.rippleosi.patient.careplans.search.CarePlanDetailsTransformer.java
private PrioritiesOfCare extractPrioritiesOfCare(Map<String, Object> input) { PrioritiesOfCare prioritiesOfCare = new PrioritiesOfCare(); prioritiesOfCare.setPlaceOfCare(MapUtils.getString(input, "priority_place_of_care")); prioritiesOfCare.setPlaceOfDeath(MapUtils.getString(input, "priority_place_of_death")); prioritiesOfCare.setComment(MapUtils.getString(input, "priority_comment")); return prioritiesOfCare; }
From source file:org.rippleosi.patient.careplans.search.CarePlanDetailsTransformer.java
private TreatmentDecision extractTreatmentDecision(Map<String, Object> input) { Date dateOfDecision = DateFormatter.toDate(MapUtils.getString(input, "treatment_date_of_decision")); TreatmentDecision treatmentDecision = new TreatmentDecision(); treatmentDecision.setDecisionToRefuseTreatment(MapUtils.getString(input, "treatment_decision")); treatmentDecision.setDateOfDecision(dateOfDecision); treatmentDecision.setComment(MapUtils.getString(input, "treatment_comment")); return treatmentDecision; }
From source file:org.rippleosi.patient.careplans.search.CarePlanSummaryTransformer.java
@Override public CarePlanSummary transform(Map<String, Object> input) { Date date = DateFormatter.toDate(MapUtils.getString(input, "date_created")); CarePlanSummary carePlan = new CarePlanSummary(); carePlan.setSource("Marand"); carePlan.setSourceId(MapUtils.getString(input, "uid")); carePlan.setName("End of Life Care"); carePlan.setDate(date);//from ww w . ja v a 2 s .co m carePlan.setType("Document"); return carePlan; }
From source file:org.rippleosi.patient.clinicalnotes.search.ClinicalNoteDetailsTransformer.java
@Override public ClinicalNoteDetails transform(Map<String, Object> input) { final String uid = MapUtils.getString(input, "uid"); final String type = MapUtils.getString(input, "type"); final String note = MapUtils.getString(input, "note"); final String author = MapUtils.getString(input, "author"); final String dateCreated = MapUtils.getString(input, "date_created"); final ClinicalNoteDetails clinicalNote = new ClinicalNoteDetails(); clinicalNote.setSource("openehr"); clinicalNote.setSourceId(uid);//from w w w . j a v a 2s . c om clinicalNote.setType(type); clinicalNote.setNote(note); clinicalNote.setAuthor(author); clinicalNote.setDateCreated(DateFormatter.toDate(dateCreated)); return clinicalNote; }
From source file:org.rippleosi.patient.clinicalnotes.search.ClinicalNoteSummaryTransformer.java
@Override public ClinicalNoteSummary transform(Map<String, Object> input) { final String uid = MapUtils.getString(input, "uid"); final String type = MapUtils.getString(input, "type"); final String author = MapUtils.getString(input, "author"); final String dateCreated = MapUtils.getString(input, "date_created"); final ClinicalNoteSummary clinicalNote = new ClinicalNoteSummary(); clinicalNote.setSource("openehr"); clinicalNote.setSourceId(uid);// ww w . ja v a 2 s .co m clinicalNote.setType(type); clinicalNote.setAuthor(author); clinicalNote.setDateCreated(DateFormatter.toDate(dateCreated)); return clinicalNote; }
From source file:org.rippleosi.patient.contacts.search.ContactDetailsTransformer.java
@Override public ContactDetails transform(Map<String, Object> input) { Boolean nextOfKin = MapUtils.getBoolean(input, "next_of_kin"); ContactDetails contact = new ContactDetails(); contact.setSource("Marand"); contact.setSourceId(MapUtils.getString(input, "uid")); contact.setName(MapUtils.getString(input, "name")); contact.setNextOfKin(nextOfKin != null && nextOfKin.booleanValue()); contact.setRelationship(MapUtils.getString(input, "relationshipRoleType")); contact.setRelationshipType(MapUtils.getString(input, "relationship_type")); contact.setRelationshipCode(MapUtils.getString(input, "relationshipCategoryCode")); contact.setRelationshipTerminology(MapUtils.getString(input, "relationshipCategoryTerminology")); contact.setPhone(MapUtils.getString(input, "contact_information")); contact.setNotes(MapUtils.getString(input, "notes")); contact.setAuthor(MapUtils.getString(input, "author")); String dateCreated = MapUtils.getString(input, "date_created"); contact.setDateCreated(DateFormatter.toDate(dateCreated)); contact.setAddress(MapUtils.getString(input, "address")); return contact; }
From source file:org.rippleosi.patient.contacts.search.ContactHeadlineTransformer.java
@Override public ContactHeadline transform(Map<String, Object> input) { ContactHeadline contact = new ContactHeadline(); contact.setSource("Marand"); contact.setSourceId(MapUtils.getString(input, "uid")); contact.setName(MapUtils.getString(input, "name")); return contact; }
From source file:org.rippleosi.patient.contacts.search.ContactSummaryTransformer.java
@Override public ContactSummary transform(Map<String, Object> input) { Boolean nextOfKin = MapUtils.getBoolean(input, "next_of_kin"); ContactSummary contact = new ContactSummary(); contact.setSource("Marand"); contact.setSourceId(MapUtils.getString(input, "uid")); contact.setName(MapUtils.getString(input, "name")); contact.setNextOfKin(nextOfKin != null && nextOfKin.booleanValue()); contact.setRelationship(MapUtils.getString(input, "relationshipRoleType")); return contact; }