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

Patient encounter notes #9617

Merged
merged 6 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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 }>(),
},
},
},
bodhish marked this conversation as resolved.
Show resolved Hide resolved

// 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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch to absolute imports


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
Loading