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

Rename prescribed_medication to treatment_plan #6029

Merged
merged 4 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/Components/Facility/ConsultationDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,15 @@ export const ConsultationDetails = (props: any) => {
</div>
</div>
)}
{consultationData.prescribed_medication && (
{consultationData.treatment_plan && (
<div className="overflow-hidden rounded-lg bg-white shadow">
<div className="px-4 py-5 sm:p-6">
<h3 className="text-lg font-semibold leading-relaxed text-gray-900">
Treatment Summary
</h3>
<div className="mt-2">
<ReadMore
text={consultationData.prescribed_medication}
text={consultationData.treatment_plan}
minChars={250}
/>
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ type FormDetails = {
kasp_enabled_date: null;
examination_details: string;
history_of_present_illness: string;
prescribed_medication: string;
treatment_plan: string;
consultation_notes: string;
patient_no: string;
procedure: ProcedureType[];
Expand Down Expand Up @@ -129,7 +129,7 @@ const initForm: FormDetails = {
kasp_enabled_date: null,
examination_details: "",
history_of_present_illness: "",
prescribed_medication: "",
treatment_plan: "",
consultation_notes: "",
patient_no: "",
procedure: [],
Expand Down Expand Up @@ -607,7 +607,7 @@ export const ConsultationForm = (props: any) => {
kasp_enabled_date: JSON.parse(state.form.is_kasp) ? new Date() : null,
examination_details: state.form.examination_details,
history_of_present_illness: state.form.history_of_present_illness,
prescribed_medication: state.form.prescribed_medication,
treatment_plan: state.form.treatment_plan,
discharge_date: state.form.discharge_date,
patient_no: state.form.patient_no,
icd11_diagnoses: state.form.icd11_diagnoses_object.map(
Expand Down Expand Up @@ -1182,10 +1182,10 @@ export const ConsultationForm = (props: any) => {
</div>
<div
className="col-span-6"
ref={fieldRef["prescribed_medication"]}
ref={fieldRef["treatment_plan"]}
>
<TextAreaFormField
{...field("prescribed_medication")}
{...field("treatment_plan")}
label="Treatment Plan / Treatment Summary"
placeholder="Optional information"
/>
Expand Down
6 changes: 2 additions & 4 deletions src/Components/Facility/TreatmentSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,8 @@ const TreatmentSummary = (props: any) => {

<div className="border-b-2 border-gray-800 px-5 py-2">
<b>Treatment :</b>
{consultationData.prescribed_medication ? (
<p className="ml-4">
{consultationData.prescribed_medication}
</p>
{consultationData.treatment_plan ? (
<p className="ml-4">{consultationData.treatment_plan}</p>
) : (
<p className="ml-4">---</p>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Facility/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export interface ConsultationModel {
modified_date?: string;
other_symptoms?: string;
patient?: string;
prescribed_medication?: string;
treatment_plan?: string;
referred_to?: number | null;
referred_to_object?: FacilityModel;
referred_to_external?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Patient/PatientRegister.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const initForm: any = {
test_id: "",
srf_id: "",
test_type: testType[0],
prescribed_medication: false,
treatment_plan: false,
ongoing_medication: "",
designation_of_health_care_worker: "",
instituion_of_health_care_worker: "",
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Shifting/ShiftDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ export default function ShiftDetails(props: { id: string }) {
<span className="font-semibold leading-relaxed">
{t("treatment_summary")}:{" "}
</span>
{consultation.prescribed_medication || "-"}
{consultation.treatment_plan || "-"}
</div>
</div>
<div className="mt-6 flex justify-between">
Expand Down