use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getCarteDIdentificationNationale.
public Question getCarteDIdentificationNationale() {
Question q = new Question();
q.setId("carte-d-identification-nationale");
q.setLegend("CIN");
q.setHeader("ui.i18n.PatientIdentifierType.name." + HaitiPatientIdentifierTypes.CIN_ID.uuid());
Field f = new Field();
f.setFormFieldName("patientIdentifier" + HaitiPatientIdentifierTypes.CIN_ID.uuid());
// f.setLabel(HaitiPatientIdentifierTypes.CIN_ID.name());
f.setUuid(HaitiPatientIdentifierTypes.CIN_ID.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 getAddressQuestion.
public Question getAddressQuestion(Config config) {
Question q = new Question();
q.setId("personAddressQuestion");
q.setLegend("registrationapp.patient.address");
q.setHeader("registrationapp.patient.address.question");
Field f = new Field();
f.setType("personAddress");
// If there are address hierarchy levels configured, use the address hierarchy widget, otherwise use the standard address widget
List<AddressHierarchyLevel> levels = Context.getService(AddressHierarchyService.class).getAddressHierarchyLevels();
if (levels != null && levels.size() > 0) {
q.setDisplayTemplate(getAddressHierarchyDisplayTemplate(levels));
f.setWidget(getAddressHierarchyWidget(levels, null, true));
} else {
Map<String, String> m = new HashMap<String, String>();
m.put("providerName", "uicommons");
m.put("fragmentId", "field/personAddress");
f.setWidget(toObjectNode(m));
}
q.addField(f);
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getInsuranceNameAndNumber.
private Question getInsuranceNameAndNumber(Config config) {
Question q = new Question();
q.setId("insuranceNameLabel");
q.setLegend("zl.registration.patient.insurance.insuranceName.question");
q.setHeader("zl.registration.patient.insurance.insuranceName.label");
{
Field f = new Field();
f.setFormFieldName("obsgroup.PIH:Insurance CONSTRUCT.obs.PIH:Haiti insurance company name");
f.setLabel("zl.registration.patient.insurance.insuranceName.question");
f.setType("obsgroup");
f.setWidget(getTextFieldWidget(30));
DropdownWidget w = new DropdownWidget();
w.getConfig().setExpanded(true);
w.getConfig().addOption("PIH:NONE", "zl.registration.patient.insurance.none.label");
w.getConfig().addOption("PIH:AIC", "zl.registration.patient.insurance.aic.label");
w.getConfig().addOption("PIH:INASSA", "zl.registration.patient.insurance.inassa.label");
w.getConfig().addOption("PIH:CAH", "zl.registration.patient.insurance.cah.label");
w.getConfig().addOption("PIH:CONAM", "zl.registration.patient.insurance.conam.label");
w.getConfig().addOption("PIH:Sogebank Assurance", "zl.registration.patient.insurance.sogebank.label");
w.getConfig().addOption("PIH:UniAssurances", "zl.registration.patient.insurance.uniAssurances.label");
w.getConfig().addOption("PIH:GMC Henner", "zl.registration.patient.insurance.gmcHenner.label");
w.getConfig().addOption("PIH:CIGNA (Vanbreda)", "zl.registration.patient.insurance.cigna.label");
w.getConfig().addOption("PIH:UNKNOWN", "zl.registration.patient.insurance.unknown.label");
w.getConfig().addOption("PIH:OTHER", "zl.registration.patient.insurance.other.label");
f.setWidget(toObjectNode(w));
q.addField(f);
}
{
Field f = new Field();
f.setFormFieldName("obsgroup.PIH:Insurance CONSTRUCT.obs.PIH:Insurance policy number");
f.setLabel("zl.registration.patient.insurance.insuranceNumber.label");
f.setType("obsgroup");
f.setWidget(getTextFieldWidget(30));
q.addField(f);
}
{
Field f = new Field();
f.setFormFieldName("obsgroup.PIH:Insurance CONSTRUCT.obs.PIH:Insurance company name (text)");
f.setLabel("zl.registration.patient.insurance.insuranceNameOther.label");
f.setType("obsgroup");
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 getBirthplaceQuestion.
public Question getBirthplaceQuestion(Config config) {
Question q = new Question();
q.setId("birthplaceLabel");
q.setHeader("zl.registration.patient.birthplace.question");
q.setLegend("zl.registration.patient.birthplace.label");
if (config.getCountry().equals(ConfigDescriptor.Country.HAITI)) {
Field f = new Field();
// f.setFormFieldName("obsgroup.PIH:PATIENT CONTACTS CONSTRUCT.obs.PIH:ADDRESS OF PATIENT CONTACT");
f.setLabel("zl.registration.patient.birthplace.label");
f.setType("personAddress");
// If there are address hierarchy levels configured, use the address hierarchy widget, otherwise use the standard address widget
List<AddressHierarchyLevel> levels = Context.getService(AddressHierarchyService.class).getAddressHierarchyLevels();
if (levels != null && levels.size() > 0) {
// q.setDisplayTemplate(getAddressHierarchyDisplayTemplate(levels));
f.setWidget(getAddressHierarchyWidget(levels, getPlaceOfBirthAddressFieldMappings(config), true));
} else {
Map<String, String> m = new HashMap<String, String>();
m.put("providerName", "uicommons");
m.put("fragmentId", "field/personAddress");
f.setWidget(toObjectNode(m));
}
q.addField(f);
} else {
Field f = new Field();
f.setFormFieldName("obs.PIH:PLACE OF BIRTH");
f.setType("obs");
f.setWidget(getTextFieldWidget(50));
q.addField(f);
}
return q;
}
use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-mirebalais by PIH.
the class PatientRegistrationApp method getRelationshipsSection.
public 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;
}
Aggregations