diff --git a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx
index ba7ed3fa7cb..ce7c579ee22 100644
--- a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx
+++ b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx
@@ -89,7 +89,7 @@ export default function InvestigationBuilder(
const setItem = (object: InvestigationType, i: number) => {
setInvestigations(
- investigations.map((investigation, index) =>
+ investigations?.map((investigation, index) =>
index === i ? object : investigation,
),
);
@@ -102,7 +102,7 @@ export default function InvestigationBuilder(
return (
- {investigations.map((investigation, i) => {
+ {investigations?.map((investigation, i) => {
const setFrequency = (frequency: string) => {
setItem(
{
diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx
index 21604d12933..a75729e0355 100644
--- a/src/Components/Patient/DailyRounds.tsx
+++ b/src/Components/Patient/DailyRounds.tsx
@@ -481,6 +481,7 @@ export const DailyRounds = (props: any) => {
form={SCRIBE_FORMS.daily_round}
onFormUpdate={async (fields) => {
// Symptoms
+ let rounds_type = state.form.rounds_type;
if (fields.additional_symptoms) {
for (const symptom of fields.additional_symptoms) {
const { res, error } = await request(SymptomsApi.add, {
@@ -492,6 +493,7 @@ export const DailyRounds = (props: any) => {
if (res?.ok) setSymptomsSeed((s) => s + 1);
if (error) Notification.Error({ msg: error });
}
+ rounds_type = "NORMAL";
}
// ICD11 Diagnosis
@@ -512,11 +514,12 @@ export const DailyRounds = (props: any) => {
]);
if (error) Notification.Error({ msg: error });
}
+ rounds_type = "NORMAL";
}
dispatch({
type: "set_form",
- form: { ...state.form, ...fields },
+ form: { ...state.form, ...fields, rounds_type },
});
fields.action !== undefined && setPreviousAction(fields.action);
fields.review_interval !== undefined &&
diff --git a/src/Components/Scribe/formDetails.ts b/src/Components/Scribe/formDetails.ts
index a7e3f4db9ff..7c5d8440718 100644
--- a/src/Components/Scribe/formDetails.ts
+++ b/src/Components/Scribe/formDetails.ts
@@ -203,6 +203,16 @@ const DAILY_ROUND_FORM_SCRIBE_DATA: Field[] = [
description:
"A list of objects to store the patient's investigations. The type field should be an array of strings corresponding to the names of the investigations provided in the options. The repetitive field should be a boolean value. The time field should be a string and only be filled if repetitive field is false. The frequency field should be a string with one of the following values: '15 min', '30 min', '1 hr', '6 hrs', '12 hrs', '24 hrs', or '48 hrs' and should be only filled if this is a repititive investigation . The notes field should be a string. If the type is not available in options, DO NOT MAKE IT.",
},
+ {
+ friendlyName: "Prescriptions",
+ id: "prescriptions",
+ type: `{
+
+ }[]`,
+ default: "[]",
+ example: "",
+ description: "Leave blank.",
+ },
];
export const SCRIBE_FORMS: { [key: string]: ScribeForm } = {