use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihPatientDataLibrary method getRegistrationAge.
@DocumentedDefinition("registration.age")
public PatientDataDefinition getRegistrationAge() {
MappedData<PatientDataDefinition> effectiveDate = new MappedData<PatientDataDefinition>(getRegistrationDatetime(), null);
AgeAtDateOfOtherDataDefinition ageAtRegistration = new AgeAtDateOfOtherDataDefinition();
ageAtRegistration.setEffectiveDateDefinition(effectiveDate);
return new ConvertedPatientDataDefinition(new PersonToPatientDataDefinition(ageAtRegistration), new AgeConverter("{y:1}"));
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihPatientDataLibrary method getAllPrimaryIdentifiers.
@DocumentedDefinition
public PatientDataDefinition getAllPrimaryIdentifiers() {
PatientIdentifierDataDefinition d = new PatientIdentifierDataDefinition();
d.setTypes(Arrays.asList(emrApiProperties.getPrimaryIdentifierType()));
return d;
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihPatientDataLibrary method getUnknownPatient.
// Demographics
@DocumentedDefinition("unknownPatient.value")
public PatientDataDefinition getUnknownPatient() {
PersonAttributeDataDefinition d = new PersonAttributeDataDefinition();
d.setPersonAttributeType(emrApiProperties.getUnknownPatientPersonAttributeType());
return convert(d, converters.getRawAttributeValue());
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihCohortDefinitionLibrary method getSpecificCodedDiagnosesBetweenDates.
@DocumentedDefinition(value = "specificCodedDiagnosesBetweenDates")
public DiagnosisCohortDefinition getSpecificCodedDiagnosesBetweenDates() {
DiagnosisCohortDefinition cd = new DiagnosisCohortDefinition();
cd.addParameter(new Parameter("onOrAfter", "reporting.parameter.onOrAfter", Date.class));
cd.addParameter(new Parameter("onOrBefore", "reporting.parameter.onOrBefore", Date.class));
cd.addParameter(new Parameter("codedDiagnoses", "mirebalaisreports.parameter.codedDiagnoses", Concept.class, List.class, null));
return cd;
}
use of org.openmrs.module.reporting.definition.library.DocumentedDefinition in project openmrs-module-pihcore by PIH.
the class PihCohortDefinitionLibrary method getInpatientAtLocationOnDate.
@DocumentedDefinition(value = "inpatientAtLocationOnDate")
public CohortDefinition getInpatientAtLocationOnDate() {
InpatientLocationCohortDefinition cd = new InpatientLocationCohortDefinition();
cd.addParameter(parameter(Date.class, "effectiveDate"));
cd.addParameter(parameter(Location.class, "ward"));
return new MappedParametersCohortDefinition(cd, "ward", "location", "effectiveDate", "date");
}
Aggregations