feat: Implement item management module and add encounter initialization handler.
This commit is contained in:
No files matched your search
@@ -41,6 +41,8 @@ const { defineField, errors, meta } = useForm({
|
|||||||
uom_code: '',
|
uom_code: '',
|
||||||
infra_code: '',
|
infra_code: '',
|
||||||
stock: 0,
|
stock: 0,
|
||||||
|
buyingPrice: 0,
|
||||||
|
sellingPrice: 0,
|
||||||
} as Partial<ItemFormData>,
|
} as Partial<ItemFormData>,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -50,6 +52,8 @@ const [itemGroup_code, itemGroup_codeAttrs] = defineField('itemGroup_code')
|
|||||||
const [uom, uomAttrs] = defineField('uom_code')
|
const [uom, uomAttrs] = defineField('uom_code')
|
||||||
const [infra_code, infra_codeAttrs] = defineField('infra_code')
|
const [infra_code, infra_codeAttrs] = defineField('infra_code')
|
||||||
const [stock, stockAttrs] = defineField('stock')
|
const [stock, stockAttrs] = defineField('stock')
|
||||||
|
const [buyingPrice, buyingPriceAttrs] = defineField('buyingPrice')
|
||||||
|
const [sellingPrice, sellingPriceAttrs] = defineField('sellingPrice')
|
||||||
|
|
||||||
if (props.values) {
|
if (props.values) {
|
||||||
if (props.values.code !== undefined) code.value = props.values.code
|
if (props.values.code !== undefined) code.value = props.values.code
|
||||||
@@ -58,6 +62,8 @@ if (props.values) {
|
|||||||
if (props.values.uom_code !== undefined) uom.value = props.values.uom_code
|
if (props.values.uom_code !== undefined) uom.value = props.values.uom_code
|
||||||
if (props.values.infra_code !== undefined) infra_code.value = props.values.infra_code
|
if (props.values.infra_code !== undefined) infra_code.value = props.values.infra_code
|
||||||
if (props.values.stock !== undefined) stock.value = props.values.stock
|
if (props.values.stock !== undefined) stock.value = props.values.stock
|
||||||
|
if (props.values.buyingPrice !== undefined) buyingPrice.value = props.values.buyingPrice
|
||||||
|
if (props.values.sellingPrice !== undefined) sellingPrice.value = props.values.sellingPrice
|
||||||
}
|
}
|
||||||
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
@@ -67,6 +73,8 @@ const resetForm = () => {
|
|||||||
uom.value = ''
|
uom.value = ''
|
||||||
infra_code.value = ''
|
infra_code.value = ''
|
||||||
stock.value = 0
|
stock.value = 0
|
||||||
|
buyingPrice.value = 0
|
||||||
|
sellingPrice.value = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmitForm() {
|
function onSubmitForm() {
|
||||||
@@ -77,6 +85,8 @@ function onSubmitForm() {
|
|||||||
uom_code: uom.value || '',
|
uom_code: uom.value || '',
|
||||||
infra_code: infra_code.value || '',
|
infra_code: infra_code.value || '',
|
||||||
stock: Number(stock.value) || 0,
|
stock: Number(stock.value) || 0,
|
||||||
|
buyingPrice: Number(buyingPrice.value) || 0,
|
||||||
|
sellingPrice: Number(sellingPrice.value) || 0,
|
||||||
}
|
}
|
||||||
emit('submit', formData, resetForm)
|
emit('submit', formData, resetForm)
|
||||||
}
|
}
|
||||||
@@ -169,6 +179,30 @@ function onCancelForm() {
|
|||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
</Cell>
|
</Cell>
|
||||||
|
<Cell>
|
||||||
|
<Label height="compact">Harga Beli</Label>
|
||||||
|
<Field :errMessage="errors.buyingPrice">
|
||||||
|
<Input
|
||||||
|
id="buyingPrice"
|
||||||
|
type="number"
|
||||||
|
v-model="buyingPrice"
|
||||||
|
v-bind="buyingPriceAttrs"
|
||||||
|
:disabled="isLoading || isReadonly"
|
||||||
|
/>
|
||||||
|
</Field>
|
||||||
|
</Cell>
|
||||||
|
<Cell>
|
||||||
|
<Label height="compact">Harga Jual</Label>
|
||||||
|
<Field :errMessage="errors.sellingPrice">
|
||||||
|
<Input
|
||||||
|
id="sellingPrice"
|
||||||
|
type="number"
|
||||||
|
v-model="sellingPrice"
|
||||||
|
v-bind="sellingPriceAttrs"
|
||||||
|
:disabled="isLoading || isReadonly"
|
||||||
|
/>
|
||||||
|
</Field>
|
||||||
|
</Cell>
|
||||||
</Block>
|
</Block>
|
||||||
<div class="my-2 flex justify-end gap-2 py-2">
|
<div class="my-2 flex justify-end gap-2 py-2">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -4,7 +4,17 @@ import { defineAsyncComponent } from 'vue'
|
|||||||
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
|
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
|
||||||
|
|
||||||
export const config: Config = {
|
export const config: Config = {
|
||||||
cols: [{}, {}, {}, {}, {}, {}, { width: 50 }],
|
cols: [
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 100 },
|
||||||
|
{ width: 50 },
|
||||||
|
],
|
||||||
|
|
||||||
headers: [
|
headers: [
|
||||||
[
|
[
|
||||||
@@ -14,11 +24,13 @@ export const config: Config = {
|
|||||||
{ label: 'UOM' },
|
{ label: 'UOM' },
|
||||||
{ label: 'Infra' },
|
{ label: 'Infra' },
|
||||||
{ label: 'Stok' },
|
{ label: 'Stok' },
|
||||||
|
{ label: 'Harga Beli' },
|
||||||
|
{ label: 'Harga Jual' },
|
||||||
{ label: 'Aksi' },
|
{ label: 'Aksi' },
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
keys: ['code', 'name', 'itemGroup_code', 'uom_code', 'infra_code', 'stock', 'action'],
|
keys: ['code', 'name', 'itemGroup_code', 'uom_code', 'infra_code', 'stock', 'buyingPrice', 'sellingPrice', 'action'],
|
||||||
|
|
||||||
delKeyNames: [
|
delKeyNames: [
|
||||||
{ key: 'code', label: 'Kode' },
|
{ key: 'code', label: 'Kode' },
|
||||||
@@ -40,7 +52,27 @@ export const config: Config = {
|
|||||||
},
|
},
|
||||||
stock: (rec: unknown): unknown => {
|
stock: (rec: unknown): unknown => {
|
||||||
const recX = rec as any
|
const recX = rec as any
|
||||||
return recX.stock || '-'
|
const value = recX.stock
|
||||||
|
if (value === null || value === undefined) {
|
||||||
|
return '-'
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
buyingPrice: (rec: unknown): unknown => {
|
||||||
|
const recX = rec as any
|
||||||
|
const value = recX.buyingPrice
|
||||||
|
if (value === null || value === undefined) {
|
||||||
|
return '-'
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
sellingPrice: (rec: unknown): unknown => {
|
||||||
|
const recX = rec as any
|
||||||
|
const value = recX.sellingPrice
|
||||||
|
if (value === null || value === undefined) {
|
||||||
|
return '-'
|
||||||
|
}
|
||||||
|
return value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import AppItemEntryForm from '~/components/app/item/entry-form.vue'
|
|||||||
import RecordConfirmation from '~/components/pub/my-ui/confirmation/record-confirmation.vue'
|
import RecordConfirmation from '~/components/pub/my-ui/confirmation/record-confirmation.vue'
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import { infraGroupCodesKeys } from '~/lib/constants'
|
import { itemGroupCodes } from '~/lib/constants'
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
import { usePaginatedList } from '~/composables/usePaginatedList'
|
import { usePaginatedList } from '~/composables/usePaginatedList'
|
||||||
@@ -33,9 +33,6 @@ import {
|
|||||||
handleCancelForm,
|
handleCancelForm,
|
||||||
} from '~/handlers/item.handler'
|
} from '~/handlers/item.handler'
|
||||||
|
|
||||||
// Constants
|
|
||||||
import { itemGroupCodes } from '~/lib/constants'
|
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
import { getList, getDetail } from '~/services/item.service'
|
import { getList, getDetail } from '~/services/item.service'
|
||||||
import { getValueLabelList as getUomList } from '~/services/uom.service'
|
import { getValueLabelList as getUomList } from '~/services/uom.service'
|
||||||
@@ -171,7 +168,7 @@ onMounted(async () => {
|
|||||||
@submit="
|
@submit="
|
||||||
(values: ItemFormData | Record<string, any>, resetForm: () => void) => {
|
(values: ItemFormData | Record<string, any>, resetForm: () => void) => {
|
||||||
if (recId > 0) {
|
if (recId > 0) {
|
||||||
handleActionEdit(recId, values, getItemList, resetForm, toast)
|
handleActionEdit(recItem?.code ? recItem.code : recId, values, getItemList, resetForm, toast)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
handleActionSave(values, getItemList, resetForm, toast)
|
handleActionSave(values, getItemList, resetForm, toast)
|
||||||
|
|||||||
@@ -56,211 +56,248 @@ const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/con
|
|||||||
const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
|
const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
|
||||||
|
|
||||||
const defaultKeys: Record<string, any> = {
|
const defaultKeys: Record<string, any> = {
|
||||||
|
status: 'status',
|
||||||
|
earlyNurseryAssessment: 'early-nursery-assessment',
|
||||||
|
earlyMedicalAssessment: 'early-medical-assessment',
|
||||||
|
earlyMedicalRehabAssessment: 'early-medical-rehab-assessment',
|
||||||
|
functionAssessment: 'function-assessment',
|
||||||
|
therapyProtocol: 'therapy-protocol',
|
||||||
|
chemotherapyProtocol: 'chemotherapy-protocol',
|
||||||
|
chemotherapyMedicine: 'chemotherapy-medicine',
|
||||||
|
educationAssessment: 'education-assessment',
|
||||||
|
generalConsent: 'general-consent',
|
||||||
|
patientAmbNote: 'patient-amb-note',
|
||||||
|
patientDevNote: 'patient-dev-note',
|
||||||
|
prescription: 'prescription',
|
||||||
|
deviceOrder: 'device-order',
|
||||||
|
radiologyOrder: 'radiology-order',
|
||||||
|
cpLabOrder: 'cp-lab-order',
|
||||||
|
microLabOrder: 'micro-lab-order',
|
||||||
|
paLabOrder: 'pa-lab-order',
|
||||||
|
procedureRoomOrder: 'procedure-room-order',
|
||||||
|
mcuResult: 'mcu-result',
|
||||||
|
actionReport: 'action-report',
|
||||||
|
surgeryReport: 'surgery-report',
|
||||||
|
vaccineData: 'vaccine-data',
|
||||||
|
consultation: 'consultation',
|
||||||
|
controlLetter: 'control-letter',
|
||||||
|
inpatientLetter: 'inpatient-letter',
|
||||||
|
kfr: 'kfr',
|
||||||
|
refBack: 'reference-back',
|
||||||
|
screening: 'screening',
|
||||||
|
supportingDocument: 'supporting-document',
|
||||||
|
resume: 'resume',
|
||||||
|
ambResume: 'amb-resume',
|
||||||
|
priceList: 'price-list',
|
||||||
|
initialNursingStudy: 'initial-nursing-study',
|
||||||
|
}
|
||||||
|
|
||||||
|
const defaultMenus: Record<string, any> = {
|
||||||
status: {
|
status: {
|
||||||
id: 'status',
|
id: defaultKeys.status,
|
||||||
title: 'Status Masuk/Keluar',
|
title: 'Status Masuk/Keluar',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
earlyNurseryAssessment: {
|
earlyNurseryAssessment: {
|
||||||
id: 'early-nursery-assessment',
|
id: defaultKeys.earlyNurseryAssessment,
|
||||||
title: 'Pengkajian Awal Keperawatan',
|
title: 'Pengkajian Awal Keperawatan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
earlyMedicalAssessment: {
|
earlyMedicalAssessment: {
|
||||||
id: 'early-medical-assessment',
|
id: defaultKeys.earlyMedicalAssessment,
|
||||||
title: 'Pengkajian Awal Medis',
|
title: 'Pengkajian Awal Medis',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
earlyMedicalRehabAssessment: {
|
earlyMedicalRehabAssessment: {
|
||||||
id: 'rehab-medical-assessment',
|
id: defaultKeys.earlyMedicalRehabAssessment,
|
||||||
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
title: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'rehab',
|
unit: 'rehab',
|
||||||
afterId: 'early-medical-assessment',
|
afterId: defaultKeys.earlyMedicalAssessment,
|
||||||
},
|
},
|
||||||
functionAssessment: {
|
functionAssessment: {
|
||||||
id: 'function-assessment',
|
id: defaultKeys.functionAssessment,
|
||||||
title: 'Asesmen Fungsi',
|
title: 'Asesmen Fungsi',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'rehab',
|
unit: 'rehab',
|
||||||
afterId: 'rehab-medical-assessment',
|
afterId: defaultKeys.rehabMedicalAssessment,
|
||||||
},
|
},
|
||||||
therapyProtocol: {
|
therapyProtocol: {
|
||||||
id: 'therapy-protocol',
|
id: defaultKeys.therapyProtocol,
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
title: 'Protokol Terapi',
|
title: 'Protokol Terapi',
|
||||||
unit: 'rehab',
|
unit: 'rehab',
|
||||||
afterId: 'function-assessment',
|
afterId: defaultKeys.functionAssessment,
|
||||||
},
|
},
|
||||||
chemotherapyProtocol: {
|
chemotherapyProtocol: {
|
||||||
id: 'chemotherapy-protocol',
|
id: defaultKeys.chemotherapyProtocol,
|
||||||
title: 'Protokol Kemoterapi',
|
title: 'Protokol Kemoterapi',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'chemo',
|
unit: 'chemo',
|
||||||
afterId: 'early-medical-assessment',
|
afterId: defaultKeys.earlyMedicalAssessment,
|
||||||
},
|
},
|
||||||
chemotherapyMedicine: {
|
chemotherapyMedicine: {
|
||||||
id: 'chemotherapy-medicine',
|
id: 'chemotherapy-medicine',
|
||||||
title: 'Protokol Obat Kemoterapi',
|
title: 'Protokol Obat Kemoterapi',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'chemo',
|
unit: 'chemo',
|
||||||
afterId: 'chemotherapy-protocol',
|
afterId: defaultKeys.chemotherapyProtocol,
|
||||||
},
|
},
|
||||||
educationAssessment: {
|
educationAssessment: {
|
||||||
id: 'education-assessment',
|
id: defaultKeys.educationAssessment,
|
||||||
title: 'Asesmen Kebutuhan Edukasi',
|
title: 'Asesmen Kebutuhan Edukasi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
generalConsent: {
|
generalConsent: {
|
||||||
id: 'general-consent',
|
id: defaultKeys.generalConsent,
|
||||||
title: 'General Consent',
|
title: 'General Consent',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
patientAmbNote: {
|
patientAmbNote: {
|
||||||
id: 'patient-amb-note',
|
id: defaultKeys.patientAmbNote,
|
||||||
title: 'CPRJ',
|
title: 'CPRJ',
|
||||||
classCode: ['ambulatory', 'emergency'],
|
classCode: ['ambulatory', 'emergency'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
patientDevNote: {
|
patientDevNote: {
|
||||||
id: 'patient-dev-note',
|
id: defaultKeys.patientDevNote,
|
||||||
title: 'CPP',
|
title: 'CPP',
|
||||||
classCode: ['inpatient'],
|
classCode: ['inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
prescription: {
|
prescription: {
|
||||||
id: 'prescription',
|
id: defaultKeys.prescription,
|
||||||
title: 'Order Obat',
|
title: 'Order Obat',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
deviceOrder: {
|
deviceOrder: {
|
||||||
id: 'device-order',
|
id: defaultKeys.deviceOrder,
|
||||||
title: 'Order Alkes',
|
title: 'Order Alkes',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
radiologyOrder: {
|
radiologyOrder: {
|
||||||
id: 'radiology-order',
|
id: defaultKeys.radiologyOrder,
|
||||||
title: 'Order Radiologi',
|
title: 'Order Radiologi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
cpLabOrder: {
|
cpLabOrder: {
|
||||||
id: 'cp-lab-order',
|
id: defaultKeys.cpLabOrder,
|
||||||
title: 'Order Lab PK',
|
title: 'Order Lab PK',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
microLabOrder: {
|
microLabOrder: {
|
||||||
id: 'micro-lab-order',
|
id: defaultKeys.microLabOrder,
|
||||||
title: 'Order Lab Mikro',
|
title: 'Order Lab Mikro',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
paLabOrder: {
|
paLabOrder: {
|
||||||
id: 'pa-lab-order',
|
id: defaultKeys.paLabOrder,
|
||||||
title: 'Order Lab PA',
|
title: 'Order Lab PA',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
procedureRoomOrder: {
|
procedureRoomOrder: {
|
||||||
id: 'procedure-room-order',
|
id: defaultKeys.procedureRoomOrder,
|
||||||
title: 'Order Ruang Tindakan',
|
title: 'Order Ruang Tindakan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
mcuResult: {
|
mcuResult: {
|
||||||
id: 'mcu-result',
|
id: defaultKeys.mcuResult,
|
||||||
title: 'Hasil Penunjang',
|
title: 'Hasil Penunjang',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
actionReport: {
|
actionReport: {
|
||||||
id: 'action-report',
|
id: defaultKeys.actionReport,
|
||||||
title: 'Laporan Tindakan',
|
title: 'Laporan Tindakan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
surgeryReport: {
|
surgeryReport: {
|
||||||
id: 'surgery-report',
|
id: defaultKeys.surgeryReport,
|
||||||
title: 'Laporan Operasi',
|
title: 'Laporan Operasi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
vaccineData: {
|
vaccineData: {
|
||||||
id: 'vaccine-data',
|
id: defaultKeys.vaccineData,
|
||||||
title: 'Data Vaksin',
|
title: 'Data Vaksin',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
consultation: {
|
consultation: {
|
||||||
id: 'consultation',
|
id: defaultKeys.consultation,
|
||||||
title: 'Konsultasi',
|
title: 'Konsultasi',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
controlLetter: {
|
controlLetter: {
|
||||||
id: 'control-letter',
|
id: defaultKeys.controlLetter,
|
||||||
title: 'Surat Kontrol',
|
title: 'Surat Kontrol',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
inpatientLetter: {
|
inpatientLetter: {
|
||||||
id: 'inpatient-letter',
|
id: defaultKeys.inpatientLetter,
|
||||||
title: 'SPRI',
|
title: 'SPRI',
|
||||||
classCode: ['ambulatory', 'emergency'],
|
classCode: ['ambulatory', 'emergency'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
kfr: {
|
kfr: {
|
||||||
id: 'kfr',
|
id: defaultKeys.kfr,
|
||||||
title: 'KFR',
|
title: 'KFR',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
refBack: {
|
refBack: {
|
||||||
id: 'reference-back',
|
id: defaultKeys.refBack,
|
||||||
title: 'PRB',
|
title: 'PRB',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
screening: {
|
screening: {
|
||||||
id: 'screening',
|
id: defaultKeys.screening,
|
||||||
title: 'Skrinning MPP',
|
title: 'Skrinning MPP',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
supportingDocument: {
|
supportingDocument: {
|
||||||
id: 'supporting-document',
|
id: defaultKeys.supportingDocument,
|
||||||
title: 'Upload Dokumen Pendukung',
|
title: 'Upload Dokumen Pendukung',
|
||||||
classCode: ['ambulatory'],
|
classCode: ['ambulatory'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
resume: {
|
resume: {
|
||||||
id: 'resume',
|
id: defaultKeys.resume,
|
||||||
title: 'Resume',
|
title: 'Resume',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
ambResume: {
|
ambResume: {
|
||||||
id: 'amb-resume',
|
id: defaultKeys.ambResume,
|
||||||
title: 'Resume Medis Rawat Jalan',
|
title: 'Resume Medis Rawat Jalan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
priceList: {
|
priceList: {
|
||||||
id: 'price-list',
|
id: defaultKeys.priceList,
|
||||||
title: 'Tarif Tindakan',
|
title: 'Tarif Tindakan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
},
|
},
|
||||||
initialNursingStudy: {
|
initialNursingStudy: {
|
||||||
id: 'initial-nursing-study',
|
id: defaultKeys.initialNursingStudy,
|
||||||
title: 'Kajian Awal Keperawatan',
|
title: 'Kajian Awal Keperawatan',
|
||||||
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
classCode: ['ambulatory', 'emergency', 'inpatient'],
|
||||||
unit: 'all',
|
unit: 'all',
|
||||||
@@ -298,7 +335,7 @@ export function insertItemByAfterId(id: string, items: EncounterItem[], newItem:
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function injectComponents(id: string | number, data: EncounterListData, meta: EncounterListData) {
|
export function injectComponents(id: string | number, data: EncounterListData, meta: EncounterListData) {
|
||||||
const currentKeys = { ...defaultKeys }
|
const currentKeys = { ...defaultMenus }
|
||||||
if (currentKeys?.status) {
|
if (currentKeys?.status) {
|
||||||
currentKeys.status['component'] = StatusAsync
|
currentKeys.status['component'] = StatusAsync
|
||||||
currentKeys.status['props'] = { encounter: data?.encounter }
|
currentKeys.status['props'] = { encounter: data?.encounter }
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ const ItemSchema = z.object({
|
|||||||
uom_code: z.string({ required_error: 'UOM harus diisi' }).min(1, 'UOM harus diisi'),
|
uom_code: z.string({ required_error: 'UOM harus diisi' }).min(1, 'UOM harus diisi'),
|
||||||
infra_code: z.string({ required_error: 'Infra harus diisi' }).optional(),
|
infra_code: z.string({ required_error: 'Infra harus diisi' }).optional(),
|
||||||
stock: z.number({ required_error: 'Stok harus diisi' }).min(0, 'Stok tidak boleh kurang dari 0').optional(),
|
stock: z.number({ required_error: 'Stok harus diisi' }).min(0, 'Stok tidak boleh kurang dari 0').optional(),
|
||||||
|
buyingPrice: z.number({ required_error: 'Harga Beli harus diisi' }).min(0, 'Harga Beli tidak boleh kurang dari 0').optional(),
|
||||||
|
sellingPrice: z.number({ required_error: 'Harga Jual harus diisi' }).min(0, 'Harga Jual tidak boleh kurang dari 0').optional(),
|
||||||
})
|
})
|
||||||
|
|
||||||
type ItemFormData = z.infer<typeof ItemSchema>
|
type ItemFormData = z.infer<typeof ItemSchema>
|
||||||
|
|||||||
Reference in New Issue
Block a user