Search in sources :

Example 21 with DocumentedDefinition

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());
}
Also used : ObsForEncounterDataDefinition(org.openmrs.module.reporting.data.encounter.definition.ObsForEncounterDataDefinition) Obs(org.openmrs.Obs) ObjectFormatter(org.openmrs.module.reporting.data.converter.ObjectFormatter) ConvertedEncounterDataDefinition(org.openmrs.module.reporting.data.encounter.definition.ConvertedEncounterDataDefinition) PropertyConverter(org.openmrs.module.reporting.data.converter.PropertyConverter) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 22 with DocumentedDefinition

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());
}
Also used : ObsForEncounterDataDefinition(org.openmrs.module.reporting.data.encounter.definition.ObsForEncounterDataDefinition) ObjectFormatter(org.openmrs.module.reporting.data.converter.ObjectFormatter) ConvertedEncounterDataDefinition(org.openmrs.module.reporting.data.encounter.definition.ConvertedEncounterDataDefinition) Location(org.openmrs.Location) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 23 with DocumentedDefinition

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());
}
Also used : PersonAttributeDataDefinition(org.openmrs.module.reporting.data.person.definition.PersonAttributeDataDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 24 with DocumentedDefinition

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;
}
Also used : GroupMemberObsDataDefinition(org.openmrs.module.reporting.data.obs.definition.GroupMemberObsDataDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Example 25 with DocumentedDefinition

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);
}
Also used : EncounterToObsDataDefinition(org.openmrs.module.reporting.data.obs.definition.EncounterToObsDataDefinition) EncounterProviderDataDefinition(org.openmrs.module.reporting.data.encounter.definition.EncounterProviderDataDefinition) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Aggregations

DocumentedDefinition (org.openmrs.module.reporting.definition.library.DocumentedDefinition)29 Date (java.util.Date)11 Location (org.openmrs.Location)10 MappedParametersCohortDefinition (org.openmrs.module.reporting.cohort.definition.MappedParametersCohortDefinition)9 ConvertedEncounterDataDefinition (org.openmrs.module.reporting.data.encounter.definition.ConvertedEncounterDataDefinition)6 Parameter (org.openmrs.module.reporting.evaluation.parameter.Parameter)6 DiedSoonAfterEncounterCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.DiedSoonAfterEncounterCohortDefinition)5 InpatientTransferCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.InpatientTransferCohortDefinition)5 ObjectFormatter (org.openmrs.module.reporting.data.converter.ObjectFormatter)5 DiagnosisCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.DiagnosisCohortDefinition)4 InpatientLocationCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.InpatientLocationCohortDefinition)4 EncounterCohortDefinition (org.openmrs.module.reporting.cohort.definition.EncounterCohortDefinition)4 EncounterWithCodedObsCohortDefinition (org.openmrs.module.reporting.cohort.definition.EncounterWithCodedObsCohortDefinition)4 PersonAttributeCohortDefinition (org.openmrs.module.reporting.cohort.definition.PersonAttributeCohortDefinition)4 EncounterProviderDataDefinition (org.openmrs.module.reporting.data.encounter.definition.EncounterProviderDataDefinition)4 ObsForEncounterDataDefinition (org.openmrs.module.reporting.data.encounter.definition.ObsForEncounterDataDefinition)4 LastDispositionBeforeExitCohortDefinition (org.openmrs.module.pihcore.reporting.cohort.definition.LastDispositionBeforeExitCohortDefinition)3 CohortDefinition (org.openmrs.module.reporting.cohort.definition.CohortDefinition)3 CompositionCohortDefinition (org.openmrs.module.reporting.cohort.definition.CompositionCohortDefinition)3 PropertyConverter (org.openmrs.module.reporting.data.converter.PropertyConverter)3