Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medication Request Enhancements #9962

Merged
merged 7 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@
"encounter_suggestion_edit_disallowed": "Not allowed to switch to this option in edit consultation",
"encounters": "Encounters",
"end_datetime": "End Date/Time",
"end_dose": "End Dose",
"end_time": "End Time",
"enter_aadhaar_number": "Enter a 12-digit Aadhaar ID",
"enter_aadhaar_otp": "Enter OTP sent to the registered mobile with Aadhaar",
Expand Down Expand Up @@ -1932,6 +1933,7 @@
"start_date": "Start Date",
"start_datetime": "Start Date/Time",
"start_dosage": "Start Dosage",
"start_dose": "Start Dose",
"start_new_clinical_encounter": "Start a new clinical encounter",
"start_review": "Start Review",
"start_time": "Start Time",
Expand Down Expand Up @@ -1964,6 +1966,7 @@
"tachycardia": "Tachycardia",
"tag_name": "Tag Name",
"tag_slug": "Tag Slug",
"taper_titrate_dosage": "Taper & Titrate Dosage",
"target_dosage": "Target Dosage",
"template_deleted": "Template has been deleted",
"test_type": "Type of test done",
Expand Down Expand Up @@ -2030,6 +2033,8 @@
"unit_mo": "Months",
"unit_ms": "Milliseconds",
"unit_s": "Seconds",
"unit_taper": "Taper",
"unit_titrate": "Titrate",
"unit_tsp": "Tsp",
"unit_unit(s)": "Unit(s)",
"unit_wk": "Weeks",
Expand Down
198 changes: 198 additions & 0 deletions src/common/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { IconName } from "@/CAREUI/icons/CareIcon";

import { MedicationRequest } from "@/types/emr/medicationRequest";

export const RESULTS_PER_PAGE_LIMIT = 14;

/**
Expand Down Expand Up @@ -909,3 +911,199 @@ export const HEADER_CONTENT_TYPES = {
} as const;

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

export const MEDICATION_REQUEST_TIMING_OPTIONS = {
BID: {
display: "BID (1-0-1)",
timing: {
repeat: { frequency: 2, period: 1, period_unit: "d" },
code: {
code: "BID",
display: "Two times a day",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
TID: {
display: "TID (1-1-1)",
timing: {
repeat: { frequency: 3, period: 1, period_unit: "d" },
code: {
code: "TID",
display: "Three times a day",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
QID: {
display: "QID (1-1-1-1)",
timing: {
repeat: { frequency: 4, period: 1, period_unit: "d" },
code: {
code: "QID",
display: "Four times a day",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
AM: {
display: "AM (1-0-0)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "d" },
code: {
code: "AM",
display: "Every morning",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
PM: {
display: "PM (0-0-1)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "d" },
code: {
code: "PM",
display: "Every afternoon",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
QD: {
display: "QD (Once a day)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "d" },
code: {
code: "QD",
display: "Once a day",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
QOD: {
display: "QOD (Alternate days)",
timing: {
repeat: { frequency: 1, period: 2, period_unit: "d" },
code: {
code: "QOD",
display: "Alternate days",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
Q1H: {
display: "Q1H (Every 1 hour)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "h" },
code: {
code: "Q1H",
display: "Every 1 hour",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
Q2H: {
display: "Q2H (Every 2 hours)",
timing: {
repeat: { frequency: 1, period: 2, period_unit: "h" },
code: {
code: "Q2H",
display: "Every 2 hours",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
Q3H: {
display: "Q3H (Every 3 hours)",
timing: {
repeat: { frequency: 1, period: 3, period_unit: "h" },
code: {
code: "Q3H",
display: "Every 3 hours",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
Q4H: {
display: "Q4H (Every 4 hours)",
timing: {
repeat: { frequency: 1, period: 4, period_unit: "h" },
code: {
code: "Q4H",
display: "Every 4 hours",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
Q6H: {
display: "Q6H (Every 6 hours)",
timing: {
repeat: { frequency: 1, period: 6, period_unit: "h" },
code: {
code: "Q6H",
display: "Every 6 hours",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
Q8H: {
display: "Q8H (Every 8 hours)",
timing: {
repeat: { frequency: 1, period: 8, period_unit: "h" },
code: {
code: "Q8H",
display: "Every 8 hours",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
BED: {
display: "BED (0-0-1)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "d" },
code: {
code: "BED",
display: "Bedtime",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
WK: {
display: "WK (Weekly)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "wk" },
code: {
code: "WK",
display: "Weekly",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
MO: {
display: "MO (Monthly)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "mo" },
code: {
code: "MO",
display: "Monthly",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
STAT: {
display: "STAT (Immediately)",
timing: {
repeat: { frequency: 1, period: 1, period_unit: "s" },
code: {
code: "STAT",
display: "Immediately",
system: "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
},
},
},
} as const satisfies Record<
string,
{
display: string;
timing: MedicationRequest["dosage_instruction"][0]["timing"];
}
>;
Loading
Loading