Skip to content

Commit

Permalink
all dropdown value moved to constants and i18 applied for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamathar committed Jan 9, 2025
1 parent cdeb762 commit e3c3e78
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 93 deletions.
17 changes: 17 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@
"administered_on": "Administered on",
"administration_dosage_range_error": "Dosage should be between start and target dosage",
"administration_notes": "Administration Notes",
"admit_source": "Admit Source",
"admitted": "Admitted",
"admitted_on": "Admitted On",
"advanced_filters": "Advanced Filters",
Expand Down Expand Up @@ -709,11 +710,13 @@
"diagnosis_at_discharge": "Diagnosis at Discharge",
"diastolic": "Diastolic",
"didnt_receive_a_message": "Didn't receive a message?",
"diet_preference": "Diet Preference",
"differential": "Differential",
"differential_diagnosis": "Differential diagnosis",
"disable_transfer": "Disable Transfer",
"discard": "Discard",
"discharge": "Discharge",
"discharge_disposition": "Discharge Disposition",
"discharge_from_care": "Discharge from CARE",
"discharge_prescription": "Discharge Prescription",
"discharge_summary": "Discharge Summary",
Expand Down Expand Up @@ -803,6 +806,7 @@
"encounter_admit_sources__outp": "From outpatient department",
"encounter_admit_sources__psych": "From psychiatric hospital",
"encounter_admit_sources__rehab": "From rehabilitation facility",
"encounter_class": "Encounter Class",
"encounter_class__amb": "Ambulatory",
"encounter_class__completed": "Completed",
"encounter_class__emer": "Emergency",
Expand Down Expand Up @@ -870,6 +874,7 @@
"encounter_priority__timing_critical": "Timing critical",
"encounter_priority__urgent": "Urgent",
"encounter_priority__use_as_directed": "Use as directed",
"encounter_status": "Encounter Status",
"encounter_status__cancelled": "Cancelled",
"encounter_status__completed": "Completed",
"encounter_status__discharged": "Discharged",
Expand Down Expand Up @@ -1036,6 +1041,8 @@
"home_facility_cleared_success": "Home Facility cleared successfully",
"home_facility_updated_error": "Error while updating Home Facility",
"home_facility_updated_success": "Home Facility updated successfully",
"hospital_identifier": "Hospital Identifier",
"hospitalization_details": "Hospitalization Details",
"hubs": "Hub Facilities",
"i_declare": "I hereby declare that:",
"icd11_as_recommended": "As per ICD-11 recommended by WHO",
Expand Down Expand Up @@ -1093,6 +1100,7 @@
"investigations_suggested": "Investigations Suggested",
"investigations_summary": "Investigations Summary",
"ip_encounter": "IP Encounter",
"ip_op_obs_emr_number": "Ip/op/obs/emr number",
"is": "Is",
"is_antenatal": "Is Antenatal",
"is_atypical_presentation": "Is Atypical presentation",
Expand Down Expand Up @@ -1151,6 +1159,7 @@
"live_patients_total_beds": "Live Patients / Total beds",
"load_more": "Load More",
"loading": "Loading...",
"loading_encounter": "Loading encounter...",
"local_body": "Local body",
"local_ip_address": "Local IP Address",
"local_ip_address_example": "e.g. 192.168.0.123",
Expand Down Expand Up @@ -1495,6 +1504,7 @@
"principal_diagnosis": "Principal diagnosis",
"print": "Print",
"print_referral_letter": "Print Referral Letter",
"priority": "Priority",
"prn_prescription": "PRN Prescription",
"prn_prescriptions": "PRN Prescriptions",
"procedure_suggestions": "Procedure Suggestions",
Expand All @@ -1520,6 +1530,7 @@
"ration_card__BPL": "BPL",
"ration_card__NO_CARD": "Non-card holder",
"ration_card_category": "Ration Card Category",
"readmission": "Re-admission",
"reason": "Reason",
"reason_for_discontinuation": "Reason for discontinuation",
"reason_for_edit": "Reason for edit",
Expand Down Expand Up @@ -1646,10 +1657,14 @@
"searching": "Searching...",
"see_attachments": "See Attachments",
"select": "Select",
"select_admit_source": "Select Admit Source",
"select_all": "Select All",
"select_class": "Select Class",
"select_date": "Select date",
"select_department": "Select Department",
"select_diff_role": "Please select a different role",
"select_diet_preference": "Select diet preference",
"select_discharge_disposition": "Select discharge disposition",
"select_eligible_policy": "Select an Eligible Insurance Policy",
"select_facility": "Select Facility",
"select_facility_for_discharged_patients_warning": "Facility needs to be selected to view discharged patients.",
Expand All @@ -1664,10 +1679,12 @@
"select_policy": "Select an Insurance Policy",
"select_policy_to_add_items": "Select a Policy to Add Items",
"select_practitioner": "Select Practicioner",
"select_priority": "Select Priority",
"select_register_patient": "Select/Register Patient",
"select_role": "Select Role",
"select_seven_day_period": "Select a seven day period",
"select_skills": "Select and add some skills",
"select_status": "Select Status",
"select_time": "Select time",
"select_time_slot": "Select time slot",
"select_wards": "Select wards",
Expand Down
89 changes: 74 additions & 15 deletions src/common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1758,18 +1758,77 @@ export const HEADER_CONTENT_TYPES = {

export const ADMIN_USER_TYPES = ["DistrictAdmin", "StateAdmin"] as const;

/**
* @deprecated use `LocalStorageKeys.patientTokenKey` instead
*/
export const CarePatientTokenKey = LocalStorageKeys.patientTokenKey;

export const DIET_PREFERENCE_OPTIONS = [
{ label: "Vegetarian", value: "vegetarian" },
{ label: "Dairy Free", value: "diary_free" },
{ label: "Nut Free", value: "nut_free" },
{ label: "Gluten Free", value: "gluten_free" },
{ label: "Vegan", value: "vegan" },
{ label: "Halal", value: "halal" },
{ label: "Kosher", value: "kosher" },
{ label: "None", value: "none" },
] as const;
export const ENCOUNTER_DIET_PREFERENCE = {
encounter_diet_preference__vegetarian: "vegetarian",
encounter_diet_preference__diary_free: "diary_free",
encounter_diet_preference__nut_free: "nut_free",
encounter_diet_preference__gluten_free: "gluten_free",
encounter_diet_preference__vegan: "vegan",
encounter_diet_preference__halal: "halal",
encounter_diet_preference__kosher: "kosher",
encounter_diet_preference__none: "none",
} as const;

export const ENCOUNTER_STATUS = {
encounter_status__planned: "planned",
encounter_status__in_progress: "in_progress",
encounter_status__on_hold: "on_hold",
encounter_status__discharged: "discharged",
encounter_status__completed: "completed",
encounter_status__cancelled: "cancelled",
encounter_status__discontinued: "discontinued",
encounter_status__entered_in_error: "entered_in_error",
encounter_status__unknown: "unknown",
} as const;

export const ENCOUNTER_CLASS = {
encounter_class__imp: "imp",
encounter_class__amb: "amb",
encounter_class__obsenc: "obsenc",
encounter_class__emer: "emer",
encounter_class__vr: "vr",
encounter_class__hh: "hh",
} as const;

export const ENCOUNTER_PRIORITY = {
encounter_priority__asap: "ASAP",
encounter_priority__callback_results: "callback_results",
encounter_priority__callback_for_scheduling: "callback_for_scheduling",
encounter_priority__elective: "elective",
encounter_priority__emergency: "emergency",
encounter_priority__preop: "preop",
encounter_priority__as_needed: "as_needed",
encounter_priority__routine: "routine",
encounter_priority__rush_reporting: "rush_reporting",
encounter_priority__stat: "stat",
encounter_priority__timing_critical: "timing_critical",
encounter_priority__use_as_directed: "use_as_directed",
encounter_priority__urgent: "urgent",
} as const;

export const ENCOUNTER_ADMIT_SOURCE = {
encounter_admit_sources__hosp_trans: "hosp_trans",
encounter_admit_sources__emd: "emd",
encounter_admit_sources__outp: "outp",
encounter_admit_sources__born: "born",
encounter_admit_sources__gp: "gp",
encounter_admit_sources__mp: "mp",
encounter_admit_sources__nursing: "nursing",
encounter_admit_sources__psych: "psych",
encounter_admit_sources__rehab: "rehab",
encounter_admit_sources__other: "other",
} as const;

export const ENCOUNTER_DISCHARGE_DISPOSITION = {
encounter_discharge_disposition__home: "home",
encounter_discharge_disposition__alt_home: "alt_home",
encounter_discharge_disposition__other_hcf: "other_hcf",
encounter_discharge_disposition__hosp: "hosp",
encounter_discharge_disposition__long: "long",
encounter_discharge_disposition__aadvice: "aadvice",
encounter_discharge_disposition__exp: "exp",
encounter_discharge_disposition__psy: "psy",
encounter_discharge_disposition__rehab: "rehab",
encounter_discharge_disposition__snf: "snf",
encounter_discharge_disposition__oth: "oth",
} as const;
Loading

0 comments on commit e3c3e78

Please sign in to comment.