"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get ALREADY_SEARCHABLE_PATIENT_FIELDS () {
        return ALREADY_SEARCHABLE_PATIENT_FIELDS;
    },
    get PAD_REFERENCE_DATA_FIELDS () {
        return PAD_REFERENCE_DATA_FIELDS;
    },
    get PAD_TEXT_FIELDS () {
        return PAD_TEXT_FIELDS;
    },
    get PATIENT_MODEL_SEARCH_FIELDS () {
        return PATIENT_MODEL_SEARCH_FIELDS;
    },
    get isPatientModelSearchField () {
        return isPatientModelSearchField;
    },
    get isReferenceDataSearchField () {
        return isReferenceDataSearchField;
    },
    get isValidAdditionalSearchField () {
        return isValidAdditionalSearchField;
    }
});
const PATIENT_MODEL_SEARCH_FIELDS = [
    'displayId',
    'firstName',
    'middleName',
    'lastName',
    'culturalName',
    'dateOfBirth',
    'dateOfDeath',
    'sex',
    'email',
    'villageId',
    'visibilityStatus',
    'mergedIntoId'
];
const ALREADY_SEARCHABLE_PATIENT_FIELDS = [
    'displayId',
    'firstName',
    'lastName',
    'culturalName',
    'dateOfBirthExact',
    'dateOfBirthFrom',
    'dateOfBirthTo',
    'sex',
    'villageId',
    'deceased'
];
const PAD_REFERENCE_DATA_FIELDS = [
    'nationalityId',
    'countryId',
    'divisionId',
    'subdivisionId',
    'medicalAreaId',
    'nursingZoneId',
    'settlementId',
    'ethnicityId',
    'occupationId',
    'religionId',
    'patientBillingTypeId',
    'countryOfBirthId',
    'insurerId',
    'secondaryVillageId'
];
const PAD_TEXT_FIELDS = [
    'placeOfBirth',
    'bloodType',
    'primaryContactNumber',
    'secondaryContactNumber',
    'maritalStatus',
    'cityTown',
    'streetVillage',
    'educationalLevel',
    'socialMedia',
    'title',
    'birthCertificate',
    'drivingLicense',
    'passport',
    'emergencyContactName',
    'emergencyContactNumber',
    'insurerPolicyNumber'
];
const patientModelFieldSet = new Set(PATIENT_MODEL_SEARCH_FIELDS);
const alreadySearchableFieldSet = new Set(ALREADY_SEARCHABLE_PATIENT_FIELDS);
const padReferenceDataFieldSet = new Set(PAD_REFERENCE_DATA_FIELDS);
const padTextFieldSet = new Set(PAD_TEXT_FIELDS);
const isValidAdditionalSearchField = (fieldName)=>{
    if (alreadySearchableFieldSet.has(fieldName)) return false;
    if (patientModelFieldSet.has(fieldName)) return true;
    if (padTextFieldSet.has(fieldName)) return true;
    if (padReferenceDataFieldSet.has(fieldName)) return true;
    return false;
};
const isPatientModelSearchField = (fieldName)=>patientModelFieldSet.has(fieldName);
const isReferenceDataSearchField = (fieldName)=>padReferenceDataFieldSet.has(fieldName);

//# sourceMappingURL=patientSearch.js.map