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

Medicine administration UI #10289

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
53550c4
Initial commit for UI
amjithtitus09 Jan 22, 2025
4e94a07
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 23, 2025
e6d433e
Changes
amjithtitus09 Jan 23, 2025
bc24400
UI changes
amjithtitus09 Jan 24, 2025
8dc20ce
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 24, 2025
6720ddc
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 24, 2025
67ca9f6
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 27, 2025
be7228d
Administer UI
amjithtitus09 Jan 27, 2025
0fa73b8
UI changes
amjithtitus09 Jan 27, 2025
13cabd9
Fix error
amjithtitus09 Jan 27, 2025
a7df464
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 27, 2025
db7a0f1
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 28, 2025
b52f35f
Desktop UI
amjithtitus09 Jan 28, 2025
53eac2a
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 28, 2025
7eb1744
Mobile UI
amjithtitus09 Jan 29, 2025
01e3f56
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 29, 2025
5b662e0
Administration UI final, Patient Updates Tab fix, Encounter filter fo…
amjithtitus09 Jan 30, 2025
866b730
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 30, 2025
94a85d2
Import fix
amjithtitus09 Jan 30, 2025
73a28f5
code removed from MAR Dosage
amjithtitus09 Jan 30, 2025
bd6edc4
Minor fixes
amjithtitus09 Jan 30, 2025
37a29f5
Merge branch 'develop' of https://github.com/ohcnetwork/care_fe into …
amjithtitus09 Jan 30, 2025
a1773bf
Merge branch 'develop' into medicine-administration-ui
nihal467 Jan 30, 2025
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
12 changes: 12 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -750,12 +750,14 @@
"downloading": "Downloading",
"downloading_abha_card": "Generating ABHA Card, Please hold on",
"downloads": "Downloads",
"draft": "Draft",
"drag_drop_image_to_upload": "Drag & drop image to upload",
"duplicate_patient_record_birth_unknown": "Please contact your district care coordinator, the shifting facility or the patient themselves if you are not sure about the patient's year of birth.",
"duplicate_patient_record_confirmation": "Admit the patient record to your facility by adding the year of birth",
"duplicate_patient_record_rejection": "I confirm that the suspect / patient I want to create is not on the list.",
"duration": "Duration",
"edit": "Edit",
"edit_administration": "Edit Administration",
"edit_avatar": "Edit Avatar",
"edit_avatar_note": "Change the avatar of the user",
"edit_avatar_note_self": "Change your avatar",
Expand Down Expand Up @@ -898,6 +900,7 @@
"end_datetime": "End Date/Time",
"end_dose": "End Dose",
"end_time": "End Time",
"ended": "Ended",
"enter_dosage_instructions": "Enter Dosage Instructions",
"enter_file_name": "Enter File Name",
"enter_message": "Start typing...",
Expand Down Expand Up @@ -1067,6 +1070,7 @@
"icmr_specimen_referral_form": "ICMR Specimen Referral Form",
"immunisation-records": "Immunisation",
"in_consultation": "In-Consultation",
"in_progress": "In Progress",
"inactive": "Inactive",
"incomplete_patient_details_warning": "Patient details are incomplete. Please update the details before proceeding.",
"inconsistent_dosage_units_error": "Dosage units must be same",
Expand Down Expand Up @@ -1132,6 +1136,7 @@
"is_it_upshift": "is it upshift",
"is_phone_a_whatsapp_number": "Is the phone number a WhatsApp number?",
"is_pregnant": "Is pregnant",
"is_this_administration_for_a_past_time": "Is this administration for a past time",
"is_this_an_emergency": "Is this an Emergency?",
"is_this_an_emergency_request": "Is this an emergency request?",
"is_this_an_upshift": "Is this an upshift?",
Expand Down Expand Up @@ -1318,6 +1323,7 @@
"no_country_found": "No country found",
"no_data_found": "No data found",
"no_departments_teams_found": "No Departments or Teams found",
"no_diagnoses_recorded": "No diagnoses recorded",
"no_doctors_found": "No Doctors Found",
"no_duplicate_facility": "You should not create duplicate facilities",
"no_encounters_found": "No encounters found",
Expand Down Expand Up @@ -1368,6 +1374,7 @@
"no_social_profile_details_available": "No Social Profile Details Available",
"no_staff": "No staff found",
"no_sub_organizations_found": "No sub-organizations found",
"no_symptoms_recorded": "No symptoms recorded",
"no_tags_found": "No tags found",
"no_tags_selected": "No tags selected",
"no_tests_taken": "No tests taken",
Expand All @@ -1380,6 +1387,7 @@
"none": "None",
"normal": "Normal",
"noshow": "No-show",
"not_done": "Not Done",
"not_eligible": "Not Eligible",
"not_found": "Not Found",
"not_specified": "Not Specified",
Expand Down Expand Up @@ -1578,6 +1586,7 @@
"practitioner_information": "Practitioner Information",
"preferred_facility_type": "Preferred Facility Type",
"preferred_vehicle": "Preferred Vehicle",
"prescribed": "Prescribed",
"prescription": "Prescription",
"prescription_details": "Prescription Details",
"prescription_discontinued": "Prescription discontinued",
Expand Down Expand Up @@ -1802,6 +1811,7 @@
"search_investigation_placeholder": "Search Investigation & Groups",
"search_medication": "Search Medication",
"search_medications": "Search for medications to add",
"search_medicine": "Search Medicine",
"search_patient_page_text": "Search for existing patients using their phone number or create a new patient record",
"search_patients": "Search Patients",
"search_resource": "Search Resource",
Expand Down Expand Up @@ -1901,6 +1911,7 @@
"shifting_details": "Shifting details",
"shifting_history": "Shifting History",
"shifting_status": "Shifting status",
"show": "Show",
"show_abha_profile": "Show ABHA Profile",
"show_all": "Show all",
"show_all_notifications": "Show All",
Expand Down Expand Up @@ -1976,6 +1987,7 @@
"tachycardia": "Tachycardia",
"tag_name": "Tag Name",
"tag_slug": "Tag Slug",
"taken": "Taken",
"taper_titrate_dosage": "Taper & Titrate Dosage",
"target_dosage": "Target Dosage",
"template_deleted": "Template has been deleted",
Expand Down
9 changes: 9 additions & 0 deletions src/Utils/request/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
AppointmentPatientRegister,
} from "@/pages/Patient/Utils";
import { Encounter, EncounterEditRequest } from "@/types/emr/encounter";
import { MedicationAdministration } from "@/types/emr/medicationAdministration/medicationAdministration";
import { MedicationStatement } from "@/types/emr/medicationStatement";
import { PartialPatientModel, Patient } from "@/types/emr/newPatient";
import {
Expand Down Expand Up @@ -652,6 +653,14 @@ const routes = {
TRes: Type<PaginatedResponse<MedicationStatement>>(),
},
},

medicationAdministration: {
list: {
path: "/api/v1/patient/{patientId}/medication/administration/",
method: "GET",
TRes: Type<PaginatedResponse<MedicationAdministration>>(),
},
},
} as const;

export default routes;
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { Question } from "@/types/questionnaire/question";
import { QuestionnaireResponse } from "@/types/questionnaire/questionnaireResponse";

interface Props {
encounter: Encounter;
encounter?: Encounter;
patientId: string;
}

function formatValue(value: string, type: string): string {
Expand Down Expand Up @@ -124,17 +125,20 @@ function QuestionGroup({
);
}

export default function QuestionnaireResponsesList({ encounter }: Props) {
export default function QuestionnaireResponsesList({
encounter,
patientId,
}: Props) {
const { t } = useTranslation();

return (
<PaginatedList
route={routes.getQuestionnaireResponses}
pathParams={{
patientId: encounter.patient.id,
patientId: patientId,
}}
query={{
encounter: encounter.id,
...(encounter && { encounter: encounter.id }),
}}
>
{() => (
Expand Down
Loading
Loading