use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-pihcore by PIH.
the class SectionsDefault method getIsImmigrantQuestion.
public Question getIsImmigrantQuestion() {
Question q = new Question();
q.setId("isImmigrantLabel");
q.setLegend("zl.registration.patient.isImmigrant.label");
q.setHeader("zl.registration.patient.isImmigrant.question");
Field f = new Field();
f.setFormFieldName("obs.PIH:Immigrant");
f.setType("obs");
f.setWidget(getYesNoDropdownWidget());
if (config.getRegistrationConfig().getSocial().getIsImmigrant().getRequired()) {
f.setCssClasses(Arrays.asList("required"));
}
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-pihcore by PIH.
the class SectionsDefault 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-pihcore by PIH.
the class SectionsDefault method getIsDisabledQuestion.
public Question getIsDisabledQuestion() {
Question q = new Question();
q.setId("isDisabledLabel");
q.setLegend("zl.registration.patient.isDisabled.label");
q.setHeader("zl.registration.patient.isDisabled.question");
Field f = new Field();
f.setFormFieldName("obs.CIEL:162558");
f.setType("obs");
f.setWidget(getYesNoDropdownWidget());
if (config.getRegistrationConfig().getSocial().getIsDisabled().getRequired()) {
f.setCssClasses(Arrays.asList("required"));
}
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-pihcore by PIH.
the class SectionsDefault method getContactNameAndRelationship.
public Question getContactNameAndRelationship() {
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 (config.getRegistrationConfig().getContactPerson() != null && config.getRegistrationConfig().getContactPerson().getRequired() == true) {
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 (config.getRegistrationConfig().getContactPerson() != null && config.getRegistrationConfig().getContactPerson().getRequired() == true) {
f.setCssClasses(Arrays.asList("required"));
}
f.setWidget(getTextFieldWidget(30));
q.addField(f);
}
return q;
}
use of org.openmrs.module.registrationapp.model.Question in project openmrs-module-pihcore by PIH.
the class SectionsDefault method getContactAddress.
public Question getContactAddress() {
Question q = new Question();
q.setId("contactQuestionLabel");
q.setHeader("zl.registration.patient.contactPerson.address.question");
q.setLegend("zl.registration.patient.contactPerson.address.label");
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 (config.getRegistrationConfig().getContactPerson() != null && config.getRegistrationConfig().getContactPerson().getRequired() == true) {
f.setCssClasses(Arrays.asList("required"));
}
q.addField(f);
return q;
}
Aggregations