Skip to content
Open
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
370c57d
adds support for drawing applications via plug
rithviknishad Jun 22, 2026
63fbfc1
add patient drawings back
rithviknishad Jun 22, 2026
8ab7fb9
fix loading suspense
rithviknishad Jun 22, 2026
108d52c
import types only
rithviknishad Jun 22, 2026
cdc23eb
remove unintended class
rithviknishad Jun 22, 2026
7462c6c
guard value change on query refetch
rithviknishad Jun 22, 2026
ee143a1
fix error boundary
rithviknishad Jun 22, 2026
45f6c46
fix error boundary
rithviknishad Jun 22, 2026
6b64ac7
sort locales
rithviknishad Jun 22, 2026
74c579e
fix errors
rithviknishad Jun 22, 2026
ccbb4b8
allow opening via keyboard
rithviknishad Jun 22, 2026
cfd5d6a
fix search
rithviknishad Jun 22, 2026
d033ecb
minor fixes
rithviknishad Jun 22, 2026
ed518c4
revert loading
rithviknishad Jun 22, 2026
eb9f1fa
add exit
rithviknishad Jun 22, 2026
db6cd26
fix permission
rithviknishad Jun 22, 2026
e8f67bc
Merge branch 'develop' into ENG-570-move-out-excalidraw-to-be-a-plugg…
nihal467 Jun 23, 2026
8ef6fed
update permission
rithviknishad Jun 23, 2026
50fddac
Merge branch 'ENG-570-move-out-excalidraw-to-be-a-pluggable-module-me…
rithviknishad Jun 23, 2026
bac3fc3
show view button only if application is supported
rithviknishad Jun 24, 2026
ff64721
improve how no applications state is shown
rithviknishad Jun 24, 2026
b9b6d92
center align the text
rithviknishad Jun 24, 2026
7c0615f
save and exit
rithviknishad Jun 24, 2026
2b99c95
fix save and exit
rithviknishad Jun 24, 2026
1eef40e
switch to encounter files tab approach
rithviknishad Jun 25, 2026
5563eda
translations
rithviknishad Jun 25, 2026
6bf5c28
optimizations
rithviknishad Jun 25, 2026
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
3,507 changes: 799 additions & 2,708 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
},
"dependencies": {
"@dmitryrechkin/json-schema-to-zod": "^1.0.1",
"@excalidraw/excalidraw": "^0.18.0-a18b139",
"@fontsource/figtree": "^5.1.1",
"@fontsource/libre-barcode-128-text": "^5.2.5",
"@hookform/resolvers": "^5.0.1",
Expand Down
7 changes: 2 additions & 5 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"ENCOUNTER_TAB__consents": "Consents",
"ENCOUNTER_TAB__devices": "Devices",
"ENCOUNTER_TAB__diagnostic_reports": "Diagnostic Reports",
"ENCOUNTER_TAB__drawings": "Drawings",
"ENCOUNTER_TAB__feed": "Feed",
"ENCOUNTER_TAB__files": "Files",
"ENCOUNTER_TAB__medicines": "Medicines",
Expand Down Expand Up @@ -433,7 +432,6 @@
"add_diagnosis_other": "Add another Diagnosis",
"add_discount": "Add Discount",
"add_dosage_step": "Add Dosage Step",
"add_drawings": "Add Drawings",
"add_edit_interpretation": "Add/Edit Interpretation",
"add_element": "Add element",
"add_encounter": "Add Encounter",
Expand Down Expand Up @@ -1582,7 +1580,6 @@
"create_new_config": "Create New Config",
"create_new_consent": "Create New Consent",
"create_new_consent_description": "Create a new consent record for this encounter",
"create_new_drawing_message": "Click on 'New Drawing' to create your first drawing",
"create_new_encounter": "Create a new encounter to get started",
"create_new_facility": "Create a new facility and add it to the organization.",
"create_new_lot_expiry": "Create new lot/expiry",
Expand Down Expand Up @@ -3690,7 +3687,7 @@
"no_dispenses_found_description": "No medication dispenses has been made in this location! You'll see them here once dispensed.",
"no_doctors_found": "No Doctors Found",
"no_dosage_instrctions_available": "No dosage instructions available",
"no_drawings_so_far": "No drawings so far",
"no_drawing_applications_available": "No drawing applications available",
"no_duplicate_facility": "You should not create duplicate facilities",
"no_duration_found": "Type a number for suggestions",
"no_encounter_associated": "No encounter associated",
Expand Down Expand Up @@ -5146,6 +5143,7 @@
"save_results": "Save Results",
"save_template": "Save Template",
"save_valueset": "Save ValueSet",
"saved": "Saved",
"saved_on": "Saved on",
"saved_successfully": "Saved successfully",
"saved_templates": "Saved Templates",
Expand Down Expand Up @@ -5237,7 +5235,6 @@
"search_departments_and_practitioners": "Search departments and practitioners",
"search_departments_placeholder": "Search departments...",
"search_devices": "Search devices...",
"search_drawings": "Search drawings...",
"search_encounter_command": "Type a command or search",
"search_encounters": "Search Encounters",
"search_existing_consent": "Search existing consent",
Expand Down
11 changes: 1 addition & 10 deletions public/locale/ml.json
Original file line number Diff line number Diff line change
Expand Up @@ -2688,11 +2688,9 @@
"yesterday": "ഇന്നലെ/കഴിഞ്ഞ ദിവസം",
"2FA_backup_code": "2FA ബാക്കപ്പ് കോഡ്",
"ENCOUNTER_TAB__devices": "ഉപകരണങ്ങൾ",
"ENCOUNTER_TAB__drawings": "രേഖാചിത്രങ്ങൾ",
"SYSTEM__govt_org_type__district_panchayat": "ജില്ലാ പഞ്ചായത്ത്",
"add_another": "മറ്റൊന്ന് ചേർക്കുക",
"add_condition": "കണ്ടീഷനനുസരിച് ചേർക്കുക",
Comment thread
rithviknishad marked this conversation as resolved.
"add_drawings": "രേഖാചിത്രങ്ങൾ ചേർക്കുക",
"add_option": "ഓപ്ഷൻ ചേർക്കുക",
Comment thread
rithviknishad marked this conversation as resolved.
Comment thread
rithviknishad marked this conversation as resolved.
Comment thread
rithviknishad marked this conversation as resolved.
"add_question": "ചോദ്യം ചേർക്കുക",
"add_sub_question": "ഉപചോദ്യം ചേർക്കുക",
Expand Down Expand Up @@ -2747,19 +2745,16 @@
"device_location_history": "ഉപകരണ സ്ഥാനം ചരിത്രം",
"disable_2fa_confirmation": "2FA അപ്രാപ്തമാക്കുന്നത് നിങ്ങളുടെ അക്കൗണ്ടിലേക്ക് അനധികൃതമായ പ്രവേശനം തടയാൻ സഹായിക്കുന്ന അധിക സുരക്ഷാ പാളി നീക്കം ചെയ്യും.",
"disable_two_factor_authentication": "രണ്ടാം ഘട്ട ഓതന്റിക്കേഷൻ അപ്രാപ്തമാക്കുക",
"discard_changes": "മാറ്റങ്ങൾ ഉപേക്ഷിക്കുക",
"dont_share_code": "ഈ സ്ഥിരീകരണ കോഡ് മറ്റാർക്കും പങ്കുവെക്കരുത്!",
"draw": "ചിത്രീകരിക്കുക",
"drawing_saved_successfully": "ചിത്രം വിജയകരമായി സംരക്ഷിച്ചു",
"drawings": "ചിത്രങ്ങൾ",
"duplicate_contact_values_not_allowed": "വ്യത്യസ്ത കോൺടാക്റ്റ് തരം കൂടിയുള്ള ഡുപ്ലിക്കേറ്റ് കോൺടാക്റ്റ് മൂല്യങ്ങൾ അനുവദിക്കില്ല",
Comment thread
rithviknishad marked this conversation as resolved.
Outdated
Comment thread
rithviknishad marked this conversation as resolved.
Outdated
"edit_bed_names": "{{count}} കിടക്ക പേരു തിരുത്തുക",
"edit_form": "ഫോം തിരുത്തുക",
"empty_drawing": "ശൂന്യമായ ചിത്രം",
"encounter_locations": "എൻകൗണ്ടർ സ്ഥലങ്ങൾ",
"enter_2fa_code": "നിങ്ങളുടെ 2FA ആപ്പ് ജനറേറ്റ് ചെയ്ത കോഡ് നൽകുക",
"enter_address": "സമ്പൂർണ്ണ വിലാസം നൽകുക",
Comment thread
rithviknishad marked this conversation as resolved.
"enter_drawing_name": "ചിത്രത്തിന് പേരു നൽകുക",
"enter_facility_name": "സൗകര്യത്തിന്റെ പേര് നൽകുക",
Comment thread
rithviknishad marked this conversation as resolved.
Comment thread
rithviknishad marked this conversation as resolved.
"enter_latitude": "അക്ഷാംശം നൽകുക",
Comment thread
rithviknishad marked this conversation as resolved.
"enter_longitude": "രേഖാംശം നൽകുക",
Expand Down Expand Up @@ -2788,7 +2783,6 @@
"no_child_locations": "ചിലിടങ്ങൾ ഇല്ല",
"no_contact_points_added": "കോൺടാക്റ്റ് പോയിന്റുകൾ ചേർത്തിട്ടില്ല",
"no_description": "വിവരണം ഇല്ല",
"no_drawings_so_far": "ഇതുവരെ ചിത്രങ്ങൾ ഇല്ല",
"no_locations": "സ്ഥലങ്ങൾ ഇല്ല",
Comment thread
rithviknishad marked this conversation as resolved.
Comment thread
rithviknishad marked this conversation as resolved.
Comment thread
rithviknishad marked this conversation as resolved.
"no_requested_questionnaires_found": "അഭ്യർഥിച്ച പ്രശ്നാവലി കണ്ടെത്താനായില്ല.",
"no_valuesets_found": "വാല്യൂസെറ്റുകൾ കണ്ടെത്താനായില്ല",
Expand Down Expand Up @@ -2821,10 +2815,8 @@
"repeatable": "പുനരാവൃതമായത്",
"resend_otp_timer": "{{time}} സെക്കൻഡിനുള്ളിൽ OTP വീണ്ടും അയയ്ക്കുക",
"reset_to_default": "ഡീഫാൾട്ടിലേക്ക് റീസെറ്റ് ചെയ്യുക",
"save_and_go_back": "സേവ് ചെയ്ത് തിരികെ പോവുക",
"scan_qr": "QR കോഡ് സ്കാൻ ചെയ്യുക",
"scroll_to_question": "ചോദ്യത്തിലേക്ക് സ്ക്രോൾ ചെയ്യുക",
"search_drawings": "ചിത്രങ്ങൾ തിരയുക...",
"search_for_location": "ഒരു സ്ഥലത്തിനായി തിരയുക",
"search_locations": "സ്ഥലങ്ങൾ തിരയുക",
"search_valuesets": "വാല്യൂസെറ്റുകൾ തിരയുക",
Expand Down Expand Up @@ -2864,6 +2856,5 @@
"verify_code": "കോഡ് സ്ഥിരീകരിക്കുക",
"verifying": "സ്ഥിരീകരിക്കുന്നു",
"view_associated_encounter": "ബന്ധിച്ച എൻകൗണ്ടർ കാണുക",
"view_facility_details": "സൗകര്യ വിശദാംശങ്ങൾ കാണുക",
"you_have_unsaved_changes_what_would_you_like_to_do": "നിങ്ങൾ സംരക്ഷിക്കാത്ത മാറ്റങ്ങൾ ഉണ്ട്. എന്ത് ചെയ്യാൻ ആഗ്രഹിക്കുന്നു?"
"view_facility_details": "സൗകര്യ വിശദാംശങ്ങൾ കാണുക"
Comment thread
rithviknishad marked this conversation as resolved.
}
Comment thread
rithviknishad marked this conversation as resolved.
27 changes: 0 additions & 27 deletions src/Routers/routes/ConsultationRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { Suspense, lazy } from "react";

import Loading from "@/components/Common/Loading";
import { PrintAllQuestionnaireResponses } from "@/components/Facility/ConsultationDetails/PrintAllQuestionnaireResponses";
import { PrintQuestionnaireResponse } from "@/components/Facility/ConsultationDetails/PrintQuestionnaireResponse";
import QuestionnaireResponseView from "@/components/Facility/ConsultationDetails/QuestionnaireResponseView";
Expand All @@ -13,10 +10,6 @@ import { PrintPrescription } from "@/pages/Encounters/PrintPrescription";
import ReportViewer from "@/pages/Encounters/ReportViewer";
import { EncounterProvider } from "@/pages/Encounters/utils/EncounterProvider";

const ExcalidrawEditor = lazy(
() => import("@/components/Common/Drawings/ExcalidrawEditor"),
);

const consultationRoutes: AppRoutes = {
"/facility/:facilityId/patient/:patientId/prescription/:prescriptionId/print":
({ facilityId, patientId, prescriptionId }) => (
Expand Down Expand Up @@ -106,26 +99,6 @@ const consultationRoutes: AppRoutes = {
subjectType="encounter"
/>
),
"/facility/:facilityId/patient/:patientId/encounter/:encounterId/drawings/new":
({ encounterId }) => (
<Suspense fallback={<Loading />}>
<ExcalidrawEditor
associatingId={encounterId}
associating_type="encounter"
/>
</Suspense>
),

"/facility/:facilityId/patient/:patientId/encounter/:encounterId/drawings/:drawingId":
({ encounterId, drawingId }) => (
<Suspense fallback={<Loading />}>
<ExcalidrawEditor
associatingId={encounterId}
associating_type="encounter"
drawingId={drawingId}
/>
</Suspense>
),

"/facility/:facilityId/patient/:patientId/encounter/:encounterId/questionnaire/:slug":
({ facilityId, encounterId, slug, patientId }) => (
Expand Down
48 changes: 0 additions & 48 deletions src/Routers/routes/PatientRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Redirect } from "raviger";
import { Suspense, lazy } from "react";

import Loading from "@/components/Common/Loading";
import { patientTabs } from "@/components/Patient/PatientDetailsTab";
import PatientIndex from "@/components/Patient/PatientIndex";
import { PatientProfile } from "@/components/Patient/PatientProfile";
Expand All @@ -15,10 +13,6 @@ import ClinicalHistoryPage from "@/pages/Patient/History";
import PatientHome from "@/pages/Patient/PatientHome";
import careConfig from "@careConfig";

const ExcalidrawEditor = lazy(
() => import("@/components/Common/Drawings/ExcalidrawEditor"),
);

const PatientRoutes: AppRoutes = {
"/facility/:facilityId/patients": ({ facilityId }) => (
<PatientIndex facilityId={facilityId} />
Expand Down Expand Up @@ -103,48 +97,6 @@ const PatientRoutes: AppRoutes = {
"/facility/:facilityId/patient/:id/update": ({ id }) => (
<PatientRegistration patientId={id} />
),
"/facility/:facilityId/patient/:patientId/drawings/new": ({ patientId }) => {
return (
<Suspense fallback={<Loading />}>
<ExcalidrawEditor
associatingId={patientId}
associating_type="patient"
/>
</Suspense>
);
},
"/facility/:facilityId/patient/:patientId/drawings/:drawingId": ({
patientId,
drawingId,
}) => (
<Suspense fallback={<Loading />}>
<ExcalidrawEditor
associatingId={patientId}
associating_type="patient"
drawingId={drawingId}
/>
</Suspense>
),

"/patient/:patientId/drawings/new": ({ patientId }) => {
return (
<Suspense fallback={<Loading />}>
<ExcalidrawEditor
associatingId={patientId}
associating_type="patient"
/>
</Suspense>
);
},
"/patient/:patientId/drawings/:drawingId": ({ patientId, drawingId }) => (
<Suspense fallback={<Loading />}>
<ExcalidrawEditor
associatingId={patientId}
associating_type="patient"
drawingId={drawingId}
/>
</Suspense>
),
"/facility/:facilityId/patient/:patientId/history/:tab": ({
Comment thread
rithviknishad marked this conversation as resolved.
facilityId,
patientId,
Expand Down
8 changes: 8 additions & 0 deletions src/common/Permissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const PERMISSION_WRITE_ENCOUNTER = "can_write_encounter";
export const PERMISSION_READ_ENCOUNTER = "can_read_encounter";
export const PERMISSION_READ_ENCOUNTER_CLINICAL_DATA =
"can_read_encounter_clinical_data";
export const PERMISSION_WRITE_ENCOUNTER_CLINICAL_DATA =
"can_write_encounter_clinical_data";
export const PERMISSION_SUBMIT_ENCOUNTER_QUESTIONNAIRE =
"can_submit_encounter_questionnaire";

Expand Down Expand Up @@ -144,6 +146,8 @@ export interface Permissions {
canReadEncounter: boolean;
/** Permission slug: "can_read_encounter_clinical_data" */
canReadEncounterClinicalData: boolean;
/** Permission slug: "can_write_encounter_clinical_data" */
canWriteEncounterClinicalData: boolean;
/** Permission slug: "can_submit_encounter_questionnaire" */
canSubmitEncounterQuestionnaire: boolean;

Expand Down Expand Up @@ -317,6 +321,10 @@ export function getPermissions(
PERMISSION_READ_ENCOUNTER_CLINICAL_DATA,
permissions,
),
canWriteEncounterClinicalData: hasPermission(
PERMISSION_WRITE_ENCOUNTER_CLINICAL_DATA,
permissions,
),
canSubmitEncounterQuestionnaire: hasPermission(
PERMISSION_SUBMIT_ENCOUNTER_QUESTIONNAIRE,
permissions,
Expand Down
Loading
Loading