use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihEncounterDataLibrary method getAdmissionStatus.
@DocumentedDefinition
public EncounterDataDefinition getAdmissionStatus() {
ObsForEncounterDataDefinition dd = new ObsForEncounterDataDefinition();
// concept with synonyms "Type of Patient" and "Admission Status", possible answers are Ambulatory and Hospitalized
dd.setQuestion(conceptService.getConceptByMapping("3289", "PIH"));
return new ConvertedEncounterDataDefinition(dd, new PropertyConverter(Obs.class, "valueCoded"), new ObjectFormatter());
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihEncounterDataLibrary method getRequestedAdmissionLocationName.
@DocumentedDefinition
public EncounterDataDefinition getRequestedAdmissionLocationName() {
ObsForEncounterDataDefinition dd = new ObsForEncounterDataDefinition();
dd.setQuestion(dispositionService.getDispositionDescriptor().getAdmissionLocationConcept());
return new ConvertedEncounterDataDefinition(dd, new ObsValueTextAsCodedConverter<Location>(Location.class), new ObjectFormatter());
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihPersonDataLibrary method getTelephoneNumber.
@DocumentedDefinition("telephoneNumber")
public PersonDataDefinition getTelephoneNumber() {
PersonAttributeDataDefinition d = new PersonAttributeDataDefinition();
d.setPersonAttributeType(emrApiProperties.getTelephoneAttributeType());
return convert("telephoneNumber.value", d, converters.getRawAttributeValue());
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihObsDataLibrary method getSingleObsInGroup.
@DocumentedDefinition
public ObsDataDefinition getSingleObsInGroup(Concept question) {
GroupMemberObsDataDefinition d = new GroupMemberObsDataDefinition();
d.setQuestion(question);
d.setSingleObs(true);
return d;
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihObsDataLibrary method getEncounterProvider.
@DocumentedDefinition
public ObsDataDefinition getEncounterProvider() {
EncounterProviderDataDefinition epdd = new EncounterProviderDataDefinition();
epdd.setSingleProvider(true);
return new EncounterToObsDataDefinition(epdd);
}
Aggregations