use of org.openmrs.module.registrationapp.model.Question 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;
}
use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getCivilStatusQuestion.
public Question getCivilStatusQuestion() {
Question q = new Question();
q.setId("civilStatusLabel");
q.setHeader("zl.registration.patient.civilStatus.question");
q.setLegend("zl.registration.patient.civilStatus.label");
Field f = new Field();
f.setFormFieldName("obs.PIH:CIVIL STATUS");
f.setType("obs");
DropdownWidget w = new DropdownWidget();
w.getConfig().setExpanded(true);
w.getConfig().addOption("PIH:SINGLE OR A CHILD", "zl.registration.patient.civilStatus.single.label");
w.getConfig().addOption("PIH:MARRIED", "zl.registration.patient.civilStatus.married.label");
w.getConfig().addOption("PIH:LIVING WITH PARTNER", "zl.registration.patient.civilStatus.livingWithPartner.label");
w.getConfig().addOption("PIH:SEPARATED", "zl.registration.patient.civilStatus.separated.label");
w.getConfig().addOption("PIH:DIVORCED", "zl.registration.patient.civilStatus.divorced.label");
w.getConfig().addOption("PIH:WIDOWED", "zl.registration.patient.civilStatus.widowed.label");
f.setWidget(toObjectNode(w));
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getNumeroIdentificationFiscal.
public Question getNumeroIdentificationFiscal() {
Question q = new Question();
q.setId("numero-identification-fiscal");
q.setLegend("NIF");
q.setHeader("ui.i18n.PatientIdentifierType.name." + HaitiPatientIdentifierTypes.NIF_ID.uuid());
Field f = new Field();
f.setFormFieldName("patientIdentifier" + HaitiPatientIdentifierTypes.NIF_ID.uuid());
// f.setLabel(HaitiPatientIdentifierTypes.NIF_ID.name());
f.setUuid(HaitiPatientIdentifierTypes.NIF_ID.uuid());
f.setType("patientIdentifier");
f.setWidget(getTextFieldWidget(16));
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getReligionQuestion.
public Question getReligionQuestion() {
Question q = new Question();
q.setId("religionLabel");
q.setLegend("zl.registration.patient.religion.label");
q.setHeader("zl.registration.patient.religion.question");
Field f = new Field();
f.setFormFieldName("obs.PIH:Religion");
f.setType("obs");
DropdownWidget w = new DropdownWidget();
w.getConfig().setExpanded(true);
w.getConfig().addOption("PIH:Voodoo", "zl.registration.patient.religion.voodoo.label");
w.getConfig().addOption("PIH:Catholic", "zl.registration.patient.religion.catholic.label");
w.getConfig().addOption("PIH:Baptist", "zl.registration.patient.religion.baptist.label");
w.getConfig().addOption("PIH:Islam", "zl.registration.patient.religion.islam.label");
w.getConfig().addOption("PIH:Pentecostal", "zl.registration.patient.religion.pentecostal.label");
w.getConfig().addOption("PIH:Seventh Day Adventist", "zl.registration.patient.religion.adventist.label");
w.getConfig().addOption("PIH:Jehovah's Witness", "zl.registration.patient.religion.jehovahsWitness.label");
w.getConfig().addOption("PIH:OTHER NON-CODED", "zl.registration.patient.religion.other.label");
f.setWidget(toObjectNode(w));
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getOccupationQuestion.
public Question getOccupationQuestion(Config config) {
Question q = new Question();
q.setId("occupationLabel");
q.setLegend("zl.registration.patient.occupation.label");
q.setHeader("zl.registration.patient.occupation.question");
Field f = new Field();
f.setFormFieldName("obs.PIH:Occupation");
f.setType("obs");
DropdownWidget w = new DropdownWidget();
if (config.getCountry().equals(ConfigDescriptor.Country.HAITI)) {
// ordered alphabetically in French, with Unemployed and Other last
w.getConfig().addOption("PIH:SHEPHERD", "zl.registration.patient.occupation.shepherd.label");
w.getConfig().addOption("PIH:DRIVER", "zl.registration.patient.occupation.driver.label");
w.getConfig().addOption("PIH:COMMERCE", "zl.registration.patient.occupation.commerce.label");
w.getConfig().addOption("PIH:FARMER", "zl.registration.patient.occupation.farmer.label");
w.getConfig().addOption("CIEL:162944", "zl.registration.patient.occupation.civilServant.label");
w.getConfig().addOption("PIH:MANUAL LABORER", "zl.registration.patient.occupation.manualLaborer.label");
w.getConfig().addOption("PIH:HEALTH CARE WORKER", "zl.registration.patient.occupation.healthCareWorker.label");
w.getConfig().addOption("PIH:Zanmi Lasante employee", "zl.registration.patient.occupation.zlStaff.label");
w.getConfig().addOption("PIH:MINER", "zl.registration.patient.occupation.miner.label");
w.getConfig().addOption("PIH:1404", "zl.registration.patient.occupation.housework.label");
w.getConfig().addOption("PIH:HOUSEWORK/FIELDWORK", "zl.registration.patient.occupation.houseworkFieldwork.label");
w.getConfig().addOption("PIH:FACTORY WORKER", "zl.registration.patient.occupation.factoryWorker.label");
w.getConfig().addOption("PIH:Teacher", "zl.registration.patient.occupation.teacher.label");
w.getConfig().addOption("PIH:PROFESSIONAL", "zl.registration.patient.occupation.professional.label");
w.getConfig().addOption("PIH:SHOP OWNER", "zl.registration.patient.occupation.shopOwner.label");
w.getConfig().addOption("CIEL:159674", "zl.registration.patient.occupation.fisherman.label");
w.getConfig().addOption("PIH:RETIRED", "zl.registration.patient.occupation.retired.label");
w.getConfig().addOption("PIH:FRUIT OR VEGETABLE SELLER", "zl.registration.patient.occupation.fruitOrVegetableVendor.label");
w.getConfig().addOption("CIEL:162945", "zl.registration.patient.occupation.marketVendor.label");
w.getConfig().addOption("PIH:STUDENT", "zl.registration.patient.occupation.student.label");
w.getConfig().addOption("PIH:UNEMPLOYED", "zl.registration.patient.occupation.unemployed.label");
w.getConfig().addOption("PIH:OTHER NON-CODED", "zl.registration.patient.occupation.other.label");
} else if (config.getCountry().equals(ConfigDescriptor.Country.LIBERIA) || (config.getCountry().equals(ConfigDescriptor.Country.SIERRA_LEONE))) {
// ordered alphabetically in English, with Unemployed and Other last
w.getConfig().addOption("PIH:BREWER", "zl.registration.patient.occupation.brewer.label");
w.getConfig().addOption("CIEL:162944", "zl.registration.patient.occupation.civilServant.label");
w.getConfig().addOption("PIH:COMMERCE", "zl.registration.patient.occupation.commerce.label");
w.getConfig().addOption("PIH:DRIVER", "zl.registration.patient.occupation.driver.label");
w.getConfig().addOption("PIH:FACTORY WORKER", "zl.registration.patient.occupation.factoryWorker.label");
w.getConfig().addOption("PIH:FARMER", "zl.registration.patient.occupation.farmer.label");
w.getConfig().addOption("CIEL:159674", "zl.registration.patient.occupation.fisherman.label");
w.getConfig().addOption("PIH:FRUIT OR VEGETABLE SELLER", "zl.registration.patient.occupation.fruitOrVegetableVendor.label");
w.getConfig().addOption("PIH:HEALTH CARE WORKER", "zl.registration.patient.occupation.healthCareWorker.label");
w.getConfig().addOption("PIH:1404", "zl.registration.patient.occupation.housework.label");
w.getConfig().addOption("PIH:HOUSEWORK/FIELDWORK", "zl.registration.patient.occupation.houseworkFieldwork.label");
w.getConfig().addOption("PIH:MANUAL LABORER", "zl.registration.patient.occupation.manualLaborer.label");
w.getConfig().addOption("CIEL:162945", "zl.registration.patient.occupation.marketVendor.label");
w.getConfig().addOption("PIH:MINER", "zl.registration.patient.occupation.miner.label");
w.getConfig().addOption("PIH:PROFESSIONAL", "zl.registration.patient.occupation.professional.label");
w.getConfig().addOption("PIH:RETIRED", "zl.registration.patient.occupation.retired.label");
w.getConfig().addOption("PIH:SHEPHERD", "zl.registration.patient.occupation.shepherd.label");
w.getConfig().addOption("PIH:SHOP OWNER", "zl.registration.patient.occupation.shopOwner.label");
w.getConfig().addOption("PIH:STUDENT", "zl.registration.patient.occupation.student.label");
w.getConfig().addOption("PIH:Teacher", "zl.registration.patient.occupation.teacher.label");
w.getConfig().addOption("PIH:UNEMPLOYED", "zl.registration.patient.occupation.unemployed.label");
w.getConfig().addOption("PIH:OTHER NON-CODED", "zl.registration.patient.occupation.other.label");
}
w.getConfig().setExpanded(true);
f.setWidget(toObjectNode(w));
q.addField(f);
return q;
}
Aggregations