Skip to content

Commit

Permalink
Patient encounter notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodhisha Thomas authored and Bodhisha Thomas committed Dec 31, 2024
1 parent c2ce66e commit 2765b11
Show file tree
Hide file tree
Showing 6 changed files with 435 additions and 4 deletions.
9 changes: 5 additions & 4 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"ENCOUNTER_TAB__files": "Files",
"ENCOUNTER_TAB__medicines": "Medicines",
"ENCOUNTER_TAB__neurological_monitoring": "Neuro",
"ENCOUNTER_TAB__notes": "Notes",
"ENCOUNTER_TAB__nursing": "Nursing",
"ENCOUNTER_TAB__plots": "Plots",
"ENCOUNTER_TAB__pressure_sore": "Pressure Sore",
Expand Down Expand Up @@ -1444,8 +1445,8 @@
"qualification": "Qualification",
"qualification_required": "Qualification is required",
"quantity_approved": "Quantity Approved",
"quantity_required": "Quantity Required",
"quantity_requested": "Quantity Requested",
"quantity_required": "Quantity Required",
"raise_consent_request": "Raise a consent request to fetch patient records over ABDM",
"ration_card__APL": "APL",
"ration_card__BPL": "BPL",
Expand Down Expand Up @@ -1676,10 +1677,10 @@
"test_type": "Type of test done",
"tested_on": "Tested on",
"thank_you_for_choosing": "Thank you for choosing our care service",
"time": "Time",
"time_slot": "Time Slot",
"the_request_for_resources_placed_by_yourself_is": "The request for resource (details below) placed by yourself is",
"third_party_software_licenses": "Third Party Software Licenses",
"time": "Time",
"time_slot": "Time Slot",
"title_of_request": "Title of Request",
"titrate_dosage": "Titrate Dosage",
"to": "to",
Expand Down Expand Up @@ -1871,4 +1872,4 @@
"you_need_at_least_a_location_to_create_an_assest": "You need at least a location to create an assest.",
"zoom_in": "Zoom In",
"zoom_out": "Zoom Out"
}
}
31 changes: 31 additions & 0 deletions src/Utils/request/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ import {
FacilityOrganizationCreate,
FacilityOrganizationResponse,
} from "@/types/facilityOrganization/facilityOrganization";
import { Message } from "@/types/notes/messages";
import { Thread } from "@/types/notes/threads";
import {
Organization,
OrganizationResponse,
Expand Down Expand Up @@ -1640,6 +1642,35 @@ const routes = {
},
},

// Notes Routes
notes: {
patient: {
listThreads: {
path: "/api/v1/patient/{patientId}/thread/",
method: "GET",
TRes: Type<PaginatedResponse<Thread>>(),
TQuery: Type<{ encounter: string }>(),
},
createThread: {
path: "/api/v1/patient/{patientId}/thread/",
method: "POST",
TRes: Type<Thread>(),
TBody: Type<{ title: string; encounter: string }>(),
},
getMessages: {
path: "/api/v1/patient/{patientId}/thread/{threadId}/note/",
method: "GET",
TRes: Type<PaginatedResponse<Message>>(),
},
postMessage: {
path: "/api/v1/patient/{patientId}/thread/{threadId}/note/",
method: "POST",
TRes: Type<Message>(),
TBody: Type<{ message: string }>(),
},
},
},

// Encounter Routes
encounter: {
list: {
Expand Down
3 changes: 3 additions & 0 deletions src/pages/Encounters/EncounterShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { EncounterUpdatesTab } from "@/pages/Encounters/tabs/EncounterUpdatesTab
import { Encounter } from "@/types/emr/encounter";
import { Patient } from "@/types/emr/newPatient";

import { EncounterNotesTab } from "./tabs/EncounterNotesTab";

export interface EncounterTabProps {
facilityId: string;
encounter: Encounter;
Expand All @@ -34,6 +36,7 @@ const defaultTabs = {
plots: EncounterPlotsTab,
medicines: EncounterMedicinesTab,
files: EncounterFilesTab,
notes: EncounterNotesTab,
// nursing: EncounterNursingTab,
// neurological_monitoring: EncounterNeurologicalMonitoringTab,
// pressure_sore: EncounterPressureSoreTab,
Expand Down
Loading

0 comments on commit 2765b11

Please sign in to comment.