use of org.openmrs.module.registrationapp.model.DropdownWidget in project openmrs-module-pihcore by PIH.
the class SectionsMexico method getOccupationQuestion.
@Override
public Question getOccupationQuestion() {
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();
// ordered alphabetically in Spanish, with Unemployed and Other last
// Agricultur
w.getConfig().addOption("PIH:FARMER", "zl.registration.patient.occupation.farmer.label");
// Ama de casa
w.getConfig().addOption("PIH:HOUSEWORK/FIELDWORK", "zl.registration.patient.occupation.houseworkFieldwork.label");
// Carpintero
w.getConfig().addOption("PIH:MANUAL LABORER", "zl.registration.patient.occupation.manualLaborer.label");
// Chofeur
w.getConfig().addOption("PIH:DRIVER", "zl.registration.patient.occupation.driver.label");
// Commercial
w.getConfig().addOption("PIH:COMMERCE", "zl.registration.patient.occupation.commerce.label");
// Estudiante
w.getConfig().addOption("PIH:STUDENT", "zl.registration.patient.occupation.student.label");
// Maestro
w.getConfig().addOption("PIH:Teacher", "zl.registration.patient.occupation.teacher.label");
// Militar
w.getConfig().addOption("PIH:Military", "zl.registration.patient.occupation.military.label");
// Obrero
w.getConfig().addOption("PIH:FACTORY WORKER", "zl.registration.patient.occupation.factoryWorker.label");
// Pescador
w.getConfig().addOption("CIEL:159674", "zl.registration.patient.occupation.fisherman.label");
// Policia
w.getConfig().addOption("PIH:Police", "zl.registration.patient.occupation.police.label");
// Profesional
w.getConfig().addOption("PIH:PROFESSIONAL", "zl.registration.patient.occupation.professional.label");
// Profesional...
w.getConfig().addOption("PIH:HEALTH CARE WORKER", "zl.registration.patient.occupation.healthCareWorker.label");
// Vaquero
w.getConfig().addOption("PIH:Cowherd", "zl.registration.patient.occupation.cowherd.label");
w.getConfig().addOption("PIH:RETIRED", "zl.registration.patient.occupation.retired.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;
}
use of org.openmrs.module.registrationapp.model.DropdownWidget in project openmrs-module-pihcore by PIH.
the class SectionsSierraLeone method getOccupationQuestion.
@Override
public Question getOccupationQuestion() {
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();
// ordered alphabetically with Unemployed and Other last
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:Commercial bike rider", "zl.registration.patient.occupation.motorcycletaxi");
w.getConfig().addOption("PIH:Cowherd", "zl.registration.patient.occupation.cowherd.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:Military", "zl.registration.patient.occupation.military.label");
w.getConfig().addOption("PIH:MINER", "zl.registration.patient.occupation.miner.label");
w.getConfig().addOption("PIH:Police", "zl.registration.patient.occupation.police.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: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;
}
use of org.openmrs.module.registrationapp.model.DropdownWidget in project openmrs-module-pihcore by PIH.
the class SectionsDefault method getYesNoDropdownWidget.
protected ObjectNode getYesNoDropdownWidget(String initialValue) {
DropdownWidget w = new DropdownWidget();
w.getConfig().setExpanded(true);
w.getConfig().setHideEmptyLabel(true);
w.getConfig().setInitialValue(initialValue);
w.getConfig().addOption("PIH:YES", "coreapps.yes");
w.getConfig().addOption("PIH:NO", "coreapps.no");
return toObjectNode(w);
}
use of org.openmrs.module.registrationapp.model.DropdownWidget in project openmrs-module-pihcore by PIH.
the class SectionsDefault method getOccupationQuestion.
public Question getOccupationQuestion() {
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();
// 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;
}
use of org.openmrs.module.registrationapp.model.DropdownWidget in project openmrs-module-pihcore by PIH.
the class SectionsPeru method getOccupationQuestion.
@Override
public Question getOccupationQuestion() {
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();
// ordered alphabetically in Spanish, with Unemployed and Other last
// Abogado
w.getConfig().addOption("PIH:Lawyer", "zl.registration.patient.occupation.lawyer.label");
// Agricultor
w.getConfig().addOption("PIH:FARMER", "zl.registration.patient.occupation.farmer.label");
// Chofer
w.getConfig().addOption("PIH:DRIVER", "zl.registration.patient.occupation.driver.label");
// Commercial
w.getConfig().addOption("PIH:COMMERCE", "Comerciante");
// Contador
w.getConfig().addOption("PIH:Accountant", "zl.registration.patient.occupation.accountant.label");
// Economista
w.getConfig().addOption("PIH:Economist", "Economista");
// Empleado(a)
w.getConfig().addOption("PIH:HOUSEWORK/FIELDWORK", "Empleado(a)");
// Enfermero
w.getConfig().addOption("PIH:NURSE", "zl.registration.patient.occupation.nurse.label");
// Estudiante
w.getConfig().addOption("PIH:STUDENT", "zl.registration.patient.occupation.student.label");
// Ingeniero
w.getConfig().addOption("PIH:Engineer", "Ingeniero");
// Medico
w.getConfig().addOption("PIH:DOCTOR", "Médico");
// Militar
w.getConfig().addOption("PIH:Military", "zl.registration.patient.occupation.military.label");
// Obrero
w.getConfig().addOption("PIH:FACTORY WORKER", "zl.registration.patient.occupation.factoryWorker.label");
// Obstetra
w.getConfig().addOption("PIH:Obstetrician", "Obstetra");
// Odontólogo
w.getConfig().addOption("PIH:Dentist", "Odontólogo");
// Periodista
w.getConfig().addOption("PIH:Journalist", "zl.registration.patient.occupation.journalist.label");
// Policia
w.getConfig().addOption("PIH:Police", "zl.registration.patient.occupation.police.label");
// Maestro
w.getConfig().addOption("PIH:Teacher", "Profesor(a)");
// Taxista
w.getConfig().addOption("PIH:Taxi driver", "Taxista");
// Tecnico de la salud
w.getConfig().addOption("PIH:Health technician", "Técnico de la salud");
w.getConfig().addOption("PIH:RETIRED", "zl.registration.patient.occupation.retired.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);
}
{
Field f = new Field();
f.setFormFieldName("obs.PIH:2452");
f.setLabel("zl.ifOtherSpecify");
f.setType("obs");
f.setWidget(getTextFieldWidget(30));
q.addField(f);
}
return q;
}
Aggregations