Search in sources :

Example 36 with Field

use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-pihcore by PIH.

the class SectionsHaiti method getNumeroIdentificationFiscal.

private Question getNumeroIdentificationFiscal() {
    String nifUuid = Metadata.getNifIdentifierType().getUuid();
    Question q = new Question();
    q.setId("numero-identification-fiscal");
    q.setLegend("NIF");
    q.setHeader("ui.i18n.PatientIdentifierType.name." + nifUuid);
    Field f = new Field();
    f.setFormFieldName("patientIdentifier" + nifUuid);
    // f.setLabel(HaitiPatientIdentifierTypes.NIF_ID.name());
    f.setUuid(nifUuid);
    f.setType("patientIdentifier");
    f.setWidget(getTextFieldWidget(16));
    q.addField(f);
    return q;
}
Also used : AddressField(org.openmrs.module.addresshierarchy.AddressField) Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question)

Example 37 with Field

use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-pihcore by PIH.

the class SectionsHaiti 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 French, with Unemployed and Other last
    w.getConfig().addOption("PIH:Stockbroker", "zl.registration.patient.occupation.stockbroker.label");
    w.getConfig().addOption("PIH:Guard", "zl.registration.patient.occupation.guard.label");
    w.getConfig().addOption("PIH:Agronomist", "zl.registration.patient.occupation.agronomist.label");
    w.getConfig().addOption("PIH:VILLAGE HEALTH WORKER", "zl.registration.patient.occupation.villageHealthWorker.label");
    w.getConfig().addOption("PIH:Assistant driver", "zl.registration.patient.occupation.assistantDriver.label");
    w.getConfig().addOption("PIH:Archivist", "zl.registration.patient.occupation.archivist.label");
    w.getConfig().addOption("PIH:Surveyor", "zl.registration.patient.occupation.surveyor.label");
    w.getConfig().addOption("PIH:Artisan", "zl.registration.patient.occupation.artisan.label");
    w.getConfig().addOption("PIH:Artist", "zl.registration.patient.occupation.artist.label");
    w.getConfig().addOption("PIH:Secretary", "zl.registration.patient.occupation.secretary.label");
    w.getConfig().addOption("PIH:LPN", "zl.registration.patient.occupation.licensedPracticalNurse.label");
    w.getConfig().addOption("PIH:Lawyer", "zl.registration.patient.occupation.lawyer.label");
    w.getConfig().addOption("PIH:SHEPHERD", "zl.registration.patient.occupation.shepherd.label");
    w.getConfig().addOption("PIH:Librarian", "zl.registration.patient.occupation.librarian.label");
    w.getConfig().addOption("PIH:Lottery worker", "zl.registration.patient.occupation.lotteryWorker.label");
    w.getConfig().addOption("PIH:Welder", "zl.registration.patient.occupation.welder.label");
    w.getConfig().addOption("PIH:Cashier", "zl.registration.patient.occupation.cashier.label");
    w.getConfig().addOption("PIH:Singer", "zl.registration.patient.occupation.singer.label");
    w.getConfig().addOption("PIH:Hunter", "zl.registration.patient.occupation.hunter.label");
    w.getConfig().addOption("PIH:DRIVER", "zl.registration.patient.occupation.driver.label");
    w.getConfig().addOption("PIH:Cook", "zl.registration.patient.occupation.cook.label");
    w.getConfig().addOption("PIH:Shoeshiner", "zl.registration.patient.occupation.shoeshiner.label");
    w.getConfig().addOption("PIH:COMMERCE", "zl.registration.patient.occupation.commerce.label");
    w.getConfig().addOption("PIH:Accountant", "zl.registration.patient.occupation.accountant.label");
    w.getConfig().addOption("PIH:Shoemaker", "zl.registration.patient.occupation.shoemaker.label");
    w.getConfig().addOption("PIH:Fashion designer", "zl.registration.patient.occupation.fashionDesigner.label");
    w.getConfig().addOption("PIH:FARMER", "zl.registration.patient.occupation.farmer.label");
    w.getConfig().addOption("PIH:DOCTOR", "zl.registration.patient.occupation.doctor.label");
    w.getConfig().addOption("PIH:Cabinetmaker", "zl.registration.patient.occupation.cabinetmaker.label");
    w.getConfig().addOption("PIH:Teacher", "zl.registration.patient.occupation.teacher.label");
    w.getConfig().addOption("PIH:Electrician", "zl.registration.patient.occupation.electrician.label");
    w.getConfig().addOption("PIH:Electronics technician", "zl.registration.patient.occupation.electronicsTechnician.label");
    w.getConfig().addOption("PIH:Animal breeder", "zl.registration.patient.occupation.animalBreeder.label");
    w.getConfig().addOption("PIH:STUDENT", "zl.registration.patient.occupation.student.label");
    w.getConfig().addOption("PIH:Beautician", "zl.registration.patient.occupation.beautician.label");
    w.getConfig().addOption("PIH:Florist", "zl.registration.patient.occupation.florist.label");
    w.getConfig().addOption("PIH:Football player", "zl.registration.patient.occupation.footballPlayer.label");
    w.getConfig().addOption("PIH:Foreman", "zl.registration.patient.occupation.foreman.label");
    w.getConfig().addOption("CIEL:162944", "zl.registration.patient.occupation.civilServant.label");
    w.getConfig().addOption("PIH:Bodyguard", "zl.registration.patient.occupation.bodyguard.label");
    w.getConfig().addOption("PIH:Manager", "zl.registration.patient.occupation.manager.label");
    w.getConfig().addOption("PIH:Clerk", "zl.registration.patient.occupation.clerk.label");
    w.getConfig().addOption("PIH:Bailiff", "zl.registration.patient.occupation.bailiff.label");
    w.getConfig().addOption("PIH:NURSE", "zl.registration.patient.occupation.nurse.label");
    w.getConfig().addOption("PIH:Informatician", "zl.registration.patient.occupation.informatician.label");
    w.getConfig().addOption("PIH:Electrical engineer", "zl.registration.patient.occupation.electricalEngineer.label");
    w.getConfig().addOption("PIH:Customs inspector", "zl.registration.patient.occupation.customsInspector.label");
    w.getConfig().addOption("PIH:Journalist", "zl.registration.patient.occupation.journalist.label");
    w.getConfig().addOption("PIH:Judge", "zl.registration.patient.occupation.judge.label");
    w.getConfig().addOption("PIH:Community leader", "zl.registration.patient.occupation.communityLeader.label");
    w.getConfig().addOption("PIH:Laundry worker", "zl.registration.patient.occupation.laundryWorker.label");
    w.getConfig().addOption("PIH:Construction worker", "zl.registration.patient.occupation.constructionWorker.label");
    w.getConfig().addOption("PIH:Butler", "zl.registration.patient.occupation.butler.label");
    w.getConfig().addOption("PIH:FACTORY WORKER", "zl.registration.patient.occupation.factoryWorker.label");
    w.getConfig().addOption("PIH:Warehouse worker", "zl.registration.patient.occupation.materialHandler.label");
    w.getConfig().addOption("PIH:Matron", "zl.registration.patient.occupation.matron.label");
    w.getConfig().addOption("PIH:Mechanic", "zl.registration.patient.occupation.mechanic.label");
    w.getConfig().addOption("PIH:Cleaner", "zl.registration.patient.occupation.cleaner.label");
    w.getConfig().addOption("PIH:HOUSEWORK/FIELDWORK", "zl.registration.patient.occupation.houseworkFieldwork.label");
    w.getConfig().addOption("PIH:Carpenter", "zl.registration.patient.occupation.carpenter.label");
    w.getConfig().addOption("PIH:Messenger", "zl.registration.patient.occupation.messenger.label");
    w.getConfig().addOption("PIH:MINER", "zl.registration.patient.occupation.miner.label");
    w.getConfig().addOption("PIH:Musician", "zl.registration.patient.occupation.musician.label");
    w.getConfig().addOption("PIH:MANUAL LABORER", "zl.registration.patient.occupation.manualLaborer.label");
    w.getConfig().addOption("PIH:Pastry chef", "zl.registration.patient.occupation.pastryChef.label");
    w.getConfig().addOption("PIH:Fisherman", "zl.registration.patient.occupation.fisherman.label");
    w.getConfig().addOption("PIH:Personal assistant", "zl.registration.patient.occupation.personalAssistant.label");
    w.getConfig().addOption("PIH:HEALTH CARE WORKER", "zl.registration.patient.occupation.healthCareWorker.label");
    w.getConfig().addOption("PIH:Photographer", "zl.registration.patient.occupation.photographer.label");
    w.getConfig().addOption("PIH:Plumber", "zl.registration.patient.occupation.plumber.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:SHOP OWNER", "zl.registration.patient.occupation.shopOwner.label");
    w.getConfig().addOption("PIH:Radiologist", "zl.registration.patient.occupation.radiologist.label");
    w.getConfig().addOption("PIH:Refrigeration manager", "zl.registration.patient.occupation.refrigerationManager.label");
    w.getConfig().addOption("PIH:Waiter", "zl.registration.patient.occupation.waiter.label");
    w.getConfig().addOption("PIH:Tailor", "zl.registration.patient.occupation.tailor.label");
    w.getConfig().addOption("PIH:Laboratory technician", "zl.registration.patient.occupation.laboratoryTechnician.label");
    w.getConfig().addOption("PIH:Bookkeeper", "zl.registration.patient.occupation.bookkeeper.label");
    w.getConfig().addOption("PIH:Sex worker", "zl.registration.patient.occupation.sexWorker.label");
    w.getConfig().addOption("PIH:Vendor", "zl.registration.patient.occupation.vendor.label");
    w.getConfig().addOption("PIH:Zanmi Lasante employee", "zl.registration.patient.occupation.zlStaff.label");
    w.getConfig().addOption("PIH:RETIRED", "zl.registration.patient.occupation.retired.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);
    w.getConfig().setAutocomplete(true);
    f.setWidget(toObjectNode(w));
    q.addField(f);
    return q;
}
Also used : AddressField(org.openmrs.module.addresshierarchy.AddressField) Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question) DropdownWidget(org.openmrs.module.registrationapp.model.DropdownWidget)

Example 38 with Field

use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-pihcore by PIH.

the class SectionsHaiti method getReligionQuestion.

private 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;
}
Also used : AddressField(org.openmrs.module.addresshierarchy.AddressField) Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question) DropdownWidget(org.openmrs.module.registrationapp.model.DropdownWidget)

Example 39 with Field

use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-pihcore by PIH.

the class SectionsHaiti method getHivEmrId.

private Question getHivEmrId() {
    Question q = new Question();
    q.setId("hivemr-v1-id");
    q.setLegend("HIVEMR-V1");
    q.setHeader("ui.i18n.PatientIdentifierType.name." + ZlConfigConstants.PATIENTIDENTIFIERTYPE_HIVEMRV1_UUID);
    Field f = new Field();
    f.setFormFieldName("patientIdentifier" + ZlConfigConstants.PATIENTIDENTIFIERTYPE_HIVEMRV1_UUID);
    f.setUuid(ZlConfigConstants.PATIENTIDENTIFIERTYPE_HIVEMRV1_UUID);
    f.setType("patientIdentifier");
    f.setWidget(getTextFieldWidget(16));
    q.addField(f);
    return q;
}
Also used : AddressField(org.openmrs.module.addresshierarchy.AddressField) Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question)

Example 40 with Field

use of org.openmrs.module.registrationapp.model.Field in project openmrs-module-pihcore by PIH.

the class SectionsMexico method getNationalIDNumber.

private Question getNationalIDNumber() {
    Question q = new Question();
    q.setId("national-id");
    q.setLegend("ui.i18n.PatientIdentifierType.name." + CesConfigConstants.PATIENTIDENTIFIERTYPE_CURP_UUID);
    q.setHeader("ui.i18n.PatientIdentifierType.name." + CesConfigConstants.PATIENTIDENTIFIERTYPE_CURP_UUID);
    Field f = new Field();
    f.setFormFieldName("patientIdentifier" + CesConfigConstants.PATIENTIDENTIFIERTYPE_CURP_UUID);
    f.setUuid(CesConfigConstants.PATIENTIDENTIFIERTYPE_CURP_UUID);
    f.setType("patientIdentifier");
    f.setWidget(getTextFieldWidget(18));
    q.addField(f);
    return q;
}
Also used : Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question)

Aggregations

Field (org.openmrs.module.registrationapp.model.Field)60 Question (org.openmrs.module.registrationapp.model.Question)60 AddressField (org.openmrs.module.addresshierarchy.AddressField)27 DropdownWidget (org.openmrs.module.registrationapp.model.DropdownWidget)16 HashMap (java.util.HashMap)9 AddressHierarchyLevel (org.openmrs.module.addresshierarchy.AddressHierarchyLevel)7 AddressHierarchyService (org.openmrs.module.addresshierarchy.service.AddressHierarchyService)7 ContactInfoConfigDescriptor (org.openmrs.module.pihcore.config.registration.ContactInfoConfigDescriptor)2 Section (org.openmrs.module.registrationapp.model.Section)2 ContactPersonConfigDescriptor (org.openmrs.module.pihcore.config.registration.ContactPersonConfigDescriptor)1