Skip to content

Commit

Permalink
Patient encounter notes (#9617)
Browse files Browse the repository at this point in the history
Co-authored-by: Bodhisha Thomas <[email protected]>
Co-authored-by: Bodhish Thomas <[email protected]>
  • Loading branch information
3 people authored and khavinshankar committed Jan 8, 2025
1 parent b8f2d23 commit a9477b1
Show file tree
Hide file tree
Showing 6 changed files with 746 additions and 2 deletions.
22 changes: 20 additions & 2 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 @@ -125,8 +126,8 @@
"NURSING_CARE_PROCEDURE__positioning": "Positioning",
"NURSING_CARE_PROCEDURE__pre_enema": "P.R.E. Enema",
"NURSING_CARE_PROCEDURE__restrain": "Restrain",
"NURSING_CARE_PROCEDURE__ryles_tube_care": "Ryles Tube Care",
"NURSING_CARE_PROCEDURE__ryles_tube_change": "Ryles Tube Change",
"NURSING_CARE_PROCEDURE__ryles_tube_care": "Ryle's Tube Care",
"NURSING_CARE_PROCEDURE__ryles_tube_change": "Ryle's Tube Change",
"NURSING_CARE_PROCEDURE__skin_care": "Skin Care",
"NURSING_CARE_PROCEDURE__stoma_care": "Stoma Care",
"NURSING_CARE_PROCEDURE__suctioning": "Suctioning",
Expand Down Expand Up @@ -826,6 +827,23 @@
"encounter_discharge_disposition__snf": "Skilled nursing facility",
"encounter_duration_confirmation": "The duration of this encounter would be",
"encounter_id": "Encounter ID",
"encounter_notes__all_discussions": "All Discussions",
"encounter_notes__be_first_to_send": "Be the first to send a message",
"encounter_notes__choose_template": "Choose a template or enter a custom title",
"encounter_notes__create_discussion": "Create a new discussion thread to organize your conversation topics.",
"encounter_notes__discussions": "Discussions",
"encounter_notes__enter_discussion_title": "Enter discussion title...",
"encounter_notes__failed_create_thread": "Failed to create thread",
"encounter_notes__failed_send_message": "Failed to send message",
"encounter_notes__new": "New",
"encounter_notes__no_discussions": "No discussions yet",
"encounter_notes__select_create_thread": "Select or create a thread to start messaging",
"encounter_notes__start_conversation": "Start the Conversation",
"encounter_notes__start_new_discussion": "Start New Discussion",
"encounter_notes__thread_created": "Thread created successfully",
"encounter_notes__type_message": "Type your message...",
"encounter_notes__welcome": "Welcome to Discussions",
"encounter_notes__welcome_description": "Start a new discussion or select an existing thread to begin messaging",
"encounter_priority__ASAP": "ASAP",
"encounter_priority__as_needed": "As needed",
"encounter_priority__asap": "ASAP",
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 @@ -42,6 +42,8 @@ import {
FacilityOrganizationCreate,
FacilityOrganizationResponse,
} from "@/types/facilityOrganization/facilityOrganization";
import { Message } from "@/types/notes/messages";
import { Thread } from "@/types/notes/threads";
import {
OrganizationUserRole,
RoleResponse,
Expand Down Expand Up @@ -648,6 +650,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 @@ -21,6 +21,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 @@ -33,6 +35,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 a9477b1

Please sign in to comment.