Search in sources :

Example 1 with Section

use of org.openmrs.module.registrationapp.model.Section in project openmrs-module-mirebalais by PIH.

the class PatientRegistrationApp method getSocialSection.

public Section getSocialSection(Config config) {
    Section s = new Section();
    s.setId("social");
    s.setLabel("zl.registration.patient.social.label");
    s.addQuestion(getBirthplaceQuestion(config));
    s.addQuestion(getCivilStatusQuestion());
    s.addQuestion(getOccupationQuestion(config));
    if (config.getCountry() == ConfigDescriptor.Country.HAITI) {
        // TODO: Replace this with property in RegistrationConfig
        s.addQuestion(getReligionQuestion());
    }
    return s;
}
Also used : Section(org.openmrs.module.registrationapp.model.Section)

Example 2 with Section

use of org.openmrs.module.registrationapp.model.Section 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;
}
Also used : AddressField(org.openmrs.module.addresshierarchy.AddressField) Field(org.openmrs.module.registrationapp.model.Field) HashMap(java.util.HashMap) Question(org.openmrs.module.registrationapp.model.Question) Section(org.openmrs.module.registrationapp.model.Section)

Example 3 with Section

use of org.openmrs.module.registrationapp.model.Section in project openmrs-module-mirebalais by PIH.

the class PatientRegistrationApp method getIdentifierSection.

public Section getIdentifierSection(Config config) {
    Section s = new Section();
    s.setId("patient-identification-section");
    s.setLabel("registrationapp.patient.identifiers.label");
    if (featureToggles.isFeatureEnabled("additionalHaitiIdentifiers")) {
        if (config.getCountry().equals(ConfigDescriptor.Country.HAITI) && !ConfigDescriptor.Specialty.MENTAL_HEALTH.equals(config.getSpecialty())) {
            // reversed to make this null safe
            s.addQuestion(getHivEmrId());
            s.addQuestion(getHivDossierNumber());
            s.addQuestion(getNumeroIdentificationFiscal());
            s.addQuestion(getCarteDIdentificationNationale());
        }
    }
    return s;
}
Also used : Section(org.openmrs.module.registrationapp.model.Section)

Example 4 with Section

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

the class SectionsMexico method getSocialSection.

@Override
public Section getSocialSection() {
    Section s = new Section();
    s.setId("social");
    s.setLabel("zl.registration.patient.social.label");
    SocialConfigDescriptor socConfig = config.getRegistrationConfig().getSocial();
    if (socConfig != null) {
        if (socConfig.getIsImmigrant() != null) {
            s.addQuestion(getIsImmigrantQuestion());
        }
        if (socConfig.getIsIndigenous() != null) {
            s.addQuestion(getIsIndigenousQuestion());
        }
        if (socConfig.getIsDisabled() != null) {
            s.addQuestion(getIsDisabledQuestion());
        }
        if (socConfig.getCanRead() != null) {
            s.addQuestion(getCanReadQuestion());
        }
        if (socConfig.getActiveCasefinding() != null) {
            s.addQuestion(getActiveCasefindingQuestion());
        }
    }
    s.addQuestion(getCivilStatusQuestion());
    s.addQuestion(getOccupationQuestion());
    return s;
}
Also used : SocialConfigDescriptor(org.openmrs.module.pihcore.config.registration.SocialConfigDescriptor) Section(org.openmrs.module.registrationapp.model.Section)

Example 5 with Section

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

the class SectionsMexico method getInsuranceSection.

private Section getInsuranceSection() {
    Section s = new Section();
    s.setId("insurance");
    s.setLabel("zl.registration.patient.insurance.label");
    s.addQuestion(getMexicoInsurance());
    return s;
}
Also used : Section(org.openmrs.module.registrationapp.model.Section)

Aggregations

Section (org.openmrs.module.registrationapp.model.Section)29 HashMap (java.util.HashMap)2 SocialConfigDescriptor (org.openmrs.module.pihcore.config.registration.SocialConfigDescriptor)2 Field (org.openmrs.module.registrationapp.model.Field)2 Question (org.openmrs.module.registrationapp.model.Question)2 AddressField (org.openmrs.module.addresshierarchy.AddressField)1 DemographicsConfigDescriptor (org.openmrs.module.pihcore.config.registration.DemographicsConfigDescriptor)1