diff --git a/src/Components/Medicine/CreatePrescriptionForm.tsx b/src/Components/Medicine/CreatePrescriptionForm.tsx
index fcc9443eaa3..b918d5781fe 100644
--- a/src/Components/Medicine/CreatePrescriptionForm.tsx
+++ b/src/Components/Medicine/CreatePrescriptionForm.tsx
@@ -92,7 +92,7 @@ export default function CreatePrescriptionForm(props: {
optionValue={(key) => key}
/>
{field("dosage_type").value === "TITRATED" ? (
-
+
key}
/>
{field("dosage_type").value === "TITRATED" ? (
-
+
{t("edit_caution_note")}
}
- className="w-full max-w-3xl lg:min-w-[600px]"
+ className="w-full max-w-4xl lg:min-w-[768px]"
>
{t("modification_caution_note")}
}
- className="w-full max-w-3xl lg:min-w-[600px]"
+ className="w-full max-w-4xl lg:min-w-[768px]"
>
targetDosage)
- )
- return "Dosage should be between start and target dosage";
+ if (baseDosage && targetDosage) {
+ const [min, max] = [baseDosage, targetDosage].sort((a, b) => a - b);
+
+ if (!(min <= valueDosage && valueDosage <= max)) {
+ return "Dosage should be between start and target dosage";
+ }
+ }
};
};