use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getIdCardPrintQuestion.
public Question getIdCardPrintQuestion() {
Question q = new Question();
q.setId("idcardLabel");
q.setLegend("zl.registration.patient.idcard.label");
q.setHeader("zl.registration.patient.idcard.question");
Field f = new Field();
f.setFormFieldName("obs.PIH:ID Card Printing Requested");
f.setType("obs");
DropdownWidget w = new DropdownWidget();
w.getConfig().setExpanded(true);
w.getConfig().setHideEmptyLabel(true);
w.getConfig().setInitialValue("PIH:YES");
w.getConfig().addOption("PIH:YES", "emr.yes");
w.getConfig().addOption("PIH:NO", "emr.no");
f.setWidget(toObjectNode(w));
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getHivEmrId.
public Question getHivEmrId() {
Question q = new Question();
q.setId("hivemr-v1-id");
q.setLegend("HIVEMR-V1");
q.setHeader("ui.i18n.PatientIdentifierType.name." + PihHaitiPatientIdentifierTypes.HIVEMR_V1.uuid());
Field f = new Field();
f.setFormFieldName("patientIdentifier" + PihHaitiPatientIdentifierTypes.HIVEMR_V1.uuid());
f.setUuid(PihHaitiPatientIdentifierTypes.HIVEMR_V1.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 getContactPhoneNumber.
public Question getContactPhoneNumber(Config config, Boolean required) {
Question q = new Question();
q.setId("contactPhoneNumberQuestionLabel");
q.setHeader("zl.registration.patient.contactPerson.phonenumber.question");
q.setLegend("zl.registration.patient.contactPerson.phonenumber.label");
{
Field f = new Field();
f.setFormFieldName("obsgroup.PIH:PATIENT CONTACTS CONSTRUCT.obs.PIH:TELEPHONE NUMBER OF CONTACT");
f.setLabel("registrationapp.patient.phone.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 getBiometricsFingerprintsQuestion.
public Question getBiometricsFingerprintsQuestion(Config config) {
Question q = new Question();
q.setId("biometrics-fieldset");
q.setCssClasses(Collections.singletonList("no-confirmation"));
q.setLegend("zl.registration.patient.biometrics.fingerprints.label");
q.setHeader("zl.registration.patient.biometrics.fingerprints.question");
Field f = new Field();
f.setType("fingerprint");
f.setUuid(HaitiPatientIdentifierTypes.BIOMETRIC_REF_NUMBER.uuid());
f.setWidget(getFingerprintWidget(config, featureToggles));
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getMothersNameQuestion.
public Question getMothersNameQuestion(Config config) {
Question q = new Question();
q.setId("mothersFirstNameLabel");
q.setLegend("zl.registration.patient.mothersFirstName.label");
q.setHeader("zl.registration.patient.mothersFirstName.question");
Field f = new Field();
f.setFormFieldName("mothersFirstName");
f.setType("personAttribute");
f.setUuid(HaitiPersonAttributeTypes.MOTHERS_FIRST_NAME.uuid());
f.setWidget(getTextFieldWidget());
if (config.getRegistrationConfig().getDemographics().getMothersName().getRequired()) {
f.setCssClasses(Arrays.asList("required"));
}
q.addField(f);
return q;
}
Aggregations