use of org.openmrs.module.registrationapp.model.Field 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.Field in project openmrs-module-pihcore by PIH.
the class SectionsMexico method getRelationshipsSection.
private Section getRelationshipsSection() {
Section s = new Section();
s.setId("relationshipsInfo");
s.setLabel("registrationapp.person.relationship");
Question q = new Question();
q.setId("relationshipsInfoQuestion");
q.setLegend("registrationapp.person.relationship.label");
q.setHeader("registrationapp.person.relationship.question");
Field f = new Field();
f.setType("personRelationships");
Map<String, String> m = new HashMap<String, String>();
m.put("providerName", "registrationapp");
m.put("fragmentId", "field/personRelationship");
f.setWidget(toObjectNode(m));
q.addField(f);
s.addQuestion(q);
return s;
}
use of org.openmrs.module.registrationapp.model.Field 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.Field in project openmrs-module-pihcore by PIH.
the class SectionsDefault method getBiometricsFingerprintsQuestion.
public Question getBiometricsFingerprintsQuestion() {
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(Metadata.getBiometricsReferenceNumberIdentifierType().getUuid());
f.setWidget(getFingerprintWidget());
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-pihcore by PIH.
the class SectionsDefault method getActiveCasefindingQuestion.
public Question getActiveCasefindingQuestion() {
Question q = new Question();
q.setId("activeCasefindingLabel");
q.setLegend("zl.registration.patient.activeCasefinding.label");
q.setHeader("zl.registration.patient.activeCasefinding.question");
Field f = new Field();
f.setFormFieldName("obs.PIH:Found through active casefinding");
f.setType("obs");
f.setWidget(getYesNoDropdownWidget());
if (config.getRegistrationConfig().getSocial().getActiveCasefinding().getRequired()) {
f.setCssClasses(Arrays.asList("required"));
}
q.addField(f);
return q;
}
Aggregations