use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-pihcore by PIH.
the class SectionsPeru method getDNIdocument.
private Question getDNIdocument() {
Question q = new Question();
q.setId("national-id");
q.setLegend("zl.registration.patient.documenttype.dni.label");
q.setHeader("zl.registration.patient.documenttype.dni.label");
Field f = new Field();
f.setFormFieldName("patientIdentifier" + SesConfigConstants.PATIENTIDENTIFIERTYPE_DNI_UUID);
f.setUuid(SesConfigConstants.PATIENTIDENTIFIERTYPE_DNI_UUID);
f.setType("patientIdentifier");
f.setWidget(getTextFieldWidget(8));
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getContactAddress.
public Question getContactAddress(Config config, boolean required) {
Question q = new Question();
q.setId("contactQuestionLabel");
q.setHeader("zl.registration.patient.contactPerson.address.question");
q.setLegend("zl.registration.patient.contactPerson.address.label");
if (config.getCountry().equals(ConfigDescriptor.Country.HAITI)) {
Field f = new Field();
// f.setFormFieldName("obsgroup.PIH:PATIENT CONTACTS CONSTRUCT.obs.PIH:ADDRESS OF PATIENT CONTACT");
f.setLabel("zl.registration.patient.contactPerson.address.label");
f.setType("personAddress");
// If there are address hierarchy levels configured, use the address hierarchy widget, otherwise use the standard address widget
List<AddressHierarchyLevel> levels = Context.getService(AddressHierarchyService.class).getAddressHierarchyLevels();
if (levels != null && levels.size() > 0) {
// q.setDisplayTemplate(getAddressHierarchyDisplayTemplate(levels));
f.setWidget(getAddressHierarchyWidget(levels, getContactAddressFieldMappings(config), true));
} else {
Map<String, String> m = new HashMap<String, String>();
m.put("providerName", "uicommons");
m.put("fragmentId", "field/personAddress");
f.setWidget(toObjectNode(m));
if (required) {
f.setCssClasses(Arrays.asList("required"));
}
}
q.addField(f);
} else {
Field f = new Field();
f.setFormFieldName("obsgroup.PIH:PATIENT CONTACTS CONSTRUCT.obs.PIH:ADDRESS OF PATIENT CONTACT");
f.setLabel("zl.registration.patient.contactPerson.address.label");
f.setType("obsgroup");
f.setWidget(getTextAreaWidget(250));
if (required) {
f.setCssClasses(Arrays.asList("required"));
}
q.addField(f);
}
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getHivDossierNumber.
public Question getHivDossierNumber() {
Question q = new Question();
q.setId("hivemr-dossier-id");
q.setLegend("HIV Dossier");
q.setHeader("ui.i18n.PatientIdentifierType.name." + PihHaitiPatientIdentifierTypes.HIV_DOSSIER_NUMBER.uuid());
Field f = new Field();
f.setFormFieldName("patientIdentifier" + PihHaitiPatientIdentifierTypes.HIV_DOSSIER_NUMBER.uuid());
f.setUuid(PihHaitiPatientIdentifierTypes.HIV_DOSSIER_NUMBER.uuid());
f.setType("patientIdentifier");
f.setWidget(getTextFieldWidget(16));
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getContactNameAndRelationship.
public Question getContactNameAndRelationship(Config config, boolean required) {
Question q = new Question();
q.setId("contactNameLabel");
q.setLegend("zl.registration.patient.contactPerson.name.label");
q.setHeader("zl.registration.patient.contactPerson.name.question");
{
Field f = new Field();
f.setFormFieldName("obsgroup.PIH:PATIENT CONTACTS CONSTRUCT.obs.PIH:NAMES AND FIRSTNAMES OF CONTACT");
f.setLabel("zl.registration.patient.contactPerson.contactName.question");
f.setType("obsgroup");
if (required) {
f.setCssClasses(Arrays.asList("required"));
}
f.setWidget(getTextFieldWidget(30));
q.addField(f);
}
{
Field f = new Field();
f.setFormFieldName("obsgroup.PIH:PATIENT CONTACTS CONSTRUCT.obs.PIH:RELATIONSHIPS OF CONTACT");
f.setLabel("zl.registration.patient.contactPerson.relationships.label");
f.setType("obsgroup");
if (required) {
f.setCssClasses(Arrays.asList("required"));
}
f.setWidget(getTextFieldWidget(30));
q.addField(f);
}
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getTelephoneNumberQuestion.
public Question getTelephoneNumberQuestion() {
Question q = new Question();
q.setId("phoneNumberLabel");
q.setLegend("registrationapp.patient.phone.label");
q.setHeader("registrationapp.patient.phone.question");
Field f = new Field();
f.setFormFieldName("phoneNumber");
f.setType("personAttribute");
f.setUuid(HaitiPersonAttributeTypes.TELEPHONE_NUMBER.uuid());
f.setWidget(getTextFieldWidget());
q.addField(f);
return q;
}
Aggregations