improvement: all clinic side ui components related to treatment types updated based on the new real world data.
This commit is contained in:
@@ -138,12 +138,16 @@ async function main() {
|
||||
|
||||
for (const type of [...TREATMENT_TYPES, ...LEGACY_TREATMENT_TYPES]) {
|
||||
const isActive = TREATMENT_TYPES.some((t) => t.code === type.code);
|
||||
const availableInAppointments = type.availableInAppointments ?? true;
|
||||
const availableInTreatment = type.availableInTreatment ?? true;
|
||||
await prisma.treatmentType.upsert({
|
||||
where: { code: type.code },
|
||||
update: {
|
||||
labDependent: type.labDependent,
|
||||
sortOrder: type.sortOrder,
|
||||
isActive,
|
||||
availableInAppointments,
|
||||
availableInTreatment,
|
||||
},
|
||||
create: {
|
||||
id: randomUUID(),
|
||||
@@ -151,6 +155,8 @@ async function main() {
|
||||
labDependent: type.labDependent,
|
||||
sortOrder: type.sortOrder,
|
||||
isActive,
|
||||
availableInAppointments,
|
||||
availableInTreatment,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user