Search in sources :

Example 16 with Field

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

the class SectionsMexico method getMexicoInsurance.

private Question getMexicoInsurance() {
    Question q = new Question();
    q.setId("insuranceLabel");
    q.setLegend("zl.registration.patient.insurance.insuranceName.label");
    {
        Field f = new Field();
        f.setFormFieldName("obsgroup.PIH:Insurance CONSTRUCT.obs.PIH:Mexico Insurance Coded");
        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:Seguro Popular", "zl.registration.patient.insurance.seguro_popular.label");
        w.getConfig().addOption("PIH:Mexican Social Security Institute", "zl.registration.patient.insurance.imss.label");
        w.getConfig().addOption("PIH:Institute of Social Security of Workers of the State of Chiapas", "zl.registration.patient.insurance.isstech.label");
        w.getConfig().addOption("PIH:OTHER", "zl.registration.patient.insurance.other.label");
        w.getConfig().addOption("PIH:NONE", "zl.registration.patient.insurance.none.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;
}
Also used : Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question) DropdownWidget(org.openmrs.module.registrationapp.model.DropdownWidget)

Example 17 with Field

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

the class SectionsSierraLeone method geWellbodyEmrId.

private Question geWellbodyEmrId() {
    Question q = new Question();
    q.setId("wellbody-emr-id");
    q.setLegend("Wellbody EMR ID");
    q.setHeader("ui.i18n.PatientIdentifierType.name." + SierraLeoneConfigConstants.PATIENTIDENTIFIERTYPE_WELLBODYEMRID_UUID);
    Field f = new Field();
    f.setFormFieldName("patientIdentifier" + SierraLeoneConfigConstants.PATIENTIDENTIFIERTYPE_WELLBODYEMRID_UUID);
    f.setUuid(SierraLeoneConfigConstants.PATIENTIDENTIFIERTYPE_WELLBODYEMRID_UUID);
    f.setType("patientIdentifier");
    f.setWidget(getTextFieldWidget(16));
    q.addField(f);
    return q;
}
Also used : Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question)

Example 18 with Field

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

the class SectionsSierraLeone method geKghEmrId.

private Question geKghEmrId() {
    Question q = new Question();
    q.setId("kgh-emr-id");
    q.setLegend("KGH EMR ID");
    q.setHeader("ui.i18n.PatientIdentifierType.name." + SierraLeoneConfigConstants.PATIENTIDENTIFIERTYPE_KGHEMRID_UUID);
    Field f = new Field();
    f.setFormFieldName("patientIdentifier" + SierraLeoneConfigConstants.PATIENTIDENTIFIERTYPE_KGHEMRID_UUID);
    f.setUuid(SierraLeoneConfigConstants.PATIENTIDENTIFIERTYPE_KGHEMRID_UUID);
    f.setType("patientIdentifier");
    f.setWidget(getTextFieldWidget(16));
    q.addField(f);
    return q;
}
Also used : Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question)

Example 19 with Field

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

the class SectionsDefault method getCanReadQuestion.

public Question getCanReadQuestion() {
    Question q = new Question();
    q.setId("canReadLabel");
    q.setLegend("zl.registration.patient.canRead.label");
    q.setHeader("zl.registration.patient.canRead.question");
    Field f = new Field();
    f.setFormFieldName("obs.CIEL:159400");
    f.setType("obs");
    f.setWidget(getYesNoDropdownWidget());
    if (config.getRegistrationConfig().getSocial().getCanRead().getRequired()) {
        f.setCssClasses(Arrays.asList("required"));
    }
    q.addField(f);
    return q;
}
Also used : Field(org.openmrs.module.registrationapp.model.Field) Question(org.openmrs.module.registrationapp.model.Question)

Example 20 with Field

use of org.openmrs.module.registrationapp.model.Field 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;
}
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