Skip to content

Commit

Permalink
values moved from constants to types folder
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamathar committed Jan 12, 2025
1 parent d89e462 commit 2bc071d
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 139 deletions.
75 changes: 0 additions & 75 deletions src/common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1757,78 +1757,3 @@ export const HEADER_CONTENT_TYPES = {
} as const;

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

export const ENCOUNTER_DIET_PREFERENCE = [
"vegetarian",
"diary_free",
"nut_free",
"gluten_free",
"vegan",
"halal",
"kosher",
"none",
] as const;

export const ENCOUNTER_STATUS = [
"planned",
"in_progress",
"on_hold",
"discharged",
"completed",
"cancelled",
"discontinued",
"entered_in_error",
"unknown",
] as const;

export const ENCOUNTER_CLASS = [
"imp",
"amb",
"obsenc",
"emer",
"vr",
"hh",
] as const;

export const ENCOUNTER_PRIORITY = [
"ASAP",
"callback_results",
"callback_for_scheduling",
"elective",
"emergency",
"preop",
"as_needed",
"routine",
"rush_reporting",
"stat",
"timing_critical",
"use_as_directed",
"urgent",
] as const;

export const ENCOUNTER_ADMIT_SOURCE = [
"hosp_trans",
"emd",
"outp",
"born",
"gp",
"mp",
"nursing",
"psych",
"rehab",
"other",
] as const;

export const ENCOUNTER_DISCHARGE_DISPOSITION = [
"home",
"alt_home",
"other_hcf",
"hosp",
"long",
"aadvice",
"exp",
"psy",
"rehab",
"snf",
"oth",
] as const;
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@ import {
SelectValue,
} from "@/components/ui/select";

import routes from "@/Utils/request/api";
import query from "@/Utils/request/query";
import {
ENCOUNTER_ADMIT_SOURCE,
ENCOUNTER_CLASS,
ENCOUNTER_DIET_PREFERENCE,
ENCOUNTER_DISCHARGE_DISPOSITION,
ENCOUNTER_PRIORITY,
ENCOUNTER_STATUS,
} from "@/common/constants";

import routes from "@/Utils/request/api";
import query from "@/Utils/request/query";
import {
type EncounterAdmitSources,
type EncounterClass,
type EncounterDietPreference,
Expand Down
144 changes: 85 additions & 59 deletions src/types/emr/encounter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,94 @@ import { UserBase } from "@/types/user/user";

import { FacilityOrganization } from "../facilityOrganization/facilityOrganization";

export type EncounterStatus =
| "planned"
| "in_progress"
| "on_hold"
| "discharged"
| "completed"
| "cancelled"
| "discontinued"
| "entered_in_error"
| "unknown";

export type EncounterClass = "imp" | "amb" | "obsenc" | "emer" | "vr" | "hh";

export type EncounterAdmitSources =
| "hosp_trans"
| "emd"
| "outp"
| "born"
| "gp"
| "mp"
| "nursing"
| "psych"
| "rehab"
| "other";
export const ENCOUNTER_ADMIT_SOURCE = [
"hosp_trans",
"emd",
"outp",
"born",
"gp",
"mp",
"nursing",
"psych",
"rehab",
"other",
] as const;

export const ENCOUNTER_CLASS = [
"imp",
"amb",
"obsenc",
"emer",
"vr",
"hh",
] as const;

export const ENCOUNTER_DIET_PREFERENCE = [
"vegetarian",
"diary_free",
"nut_free",
"gluten_free",
"vegan",
"halal",
"kosher",
"none",
] as const;

export const ENCOUNTER_DISCHARGE_DISPOSITION = [
"home",
"alt_home",
"other_hcf",
"hosp",
"long",
"aadvice",
"exp",
"psy",
"rehab",
"snf",
"oth",
] as const;

export const ENCOUNTER_PRIORITY = [
"ASAP",
"callback_results",
"callback_for_scheduling",
"elective",
"emergency",
"preop",
"as_needed",
"routine",
"rush_reporting",
"stat",
"timing_critical",
"use_as_directed",
"urgent",
] as const;

export const ENCOUNTER_STATUS = [
"planned",
"in_progress",
"on_hold",
"discharged",
"completed",
"cancelled",
"discontinued",
"entered_in_error",
"unknown",
] as const;

export type EncounterAdmitSources = (typeof ENCOUNTER_ADMIT_SOURCE)[number];

export type EncounterClass = (typeof ENCOUNTER_CLASS)[number];

export type EncounterDietPreference =
(typeof ENCOUNTER_DIET_PREFERENCE)[number];

export type EncounterDischargeDisposition =
| "home"
| "alt_home"
| "other_hcf"
| "hosp"
| "long"
| "aadvice"
| "exp"
| "psy"
| "rehab"
| "snf"
| "oth";
(typeof ENCOUNTER_DISCHARGE_DISPOSITION)[number];

export type EncounterDietPreference =
| "vegetarian"
| "diary_free"
| "nut_free"
| "gluten_free"
| "vegan"
| "halal"
| "kosher"
| "none";

export type EncounterPriority =
| "ASAP"
| "callback_results"
| "callback_for_scheduling"
| "elective"
| "emergency"
| "preop"
| "as_needed"
| "routine"
| "rush_reporting"
| "stat"
| "timing_critical"
| "use_as_directed"
| "urgent";
export type EncounterPriority = (typeof ENCOUNTER_PRIORITY)[number];

export type EncounterStatus = (typeof ENCOUNTER_STATUS)[number];

export type Period = {
start?: string;
Expand Down

0 comments on commit 2bc071d

Please sign in to comment.