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 4 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
1 change: 1 addition & 0 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
31 changes: 31 additions & 0 deletions src/Utils/request/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,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 @@ -846,6 +848,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