✨ feat (initial-nursing): add initial nursing entry form and preview
This commit is contained in:
No files matched your search
@@ -23,6 +23,7 @@ const payload = ref({
|
||||
typeCode: 'early-nursery',
|
||||
value: '',
|
||||
})
|
||||
const listProblem = ref([])
|
||||
|
||||
const model = ref({
|
||||
'pri-complain': '',
|
||||
@@ -54,9 +55,11 @@ const isLoading = reactive<DataTableLoader>({
|
||||
isTableLoading: false,
|
||||
})
|
||||
|
||||
function handleOpen(type: string) {
|
||||
if (type === 'fungsional') {
|
||||
isOpenDiagnose.value = true
|
||||
function handleOpen(event: any) {
|
||||
console.log('handleOpen', event.type)
|
||||
const type = event.type
|
||||
if (type === 'add-problem') {
|
||||
listProblem.value = event.data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +71,8 @@ async function actionHandler(type: string) {
|
||||
}
|
||||
const result = await entryRehabRef.value?.validate()
|
||||
if (result?.valid) {
|
||||
if (selectedDiagnose.value?.length > 0) {
|
||||
result.data.diagnose = selectedDiagnose.value || []
|
||||
if (listProblem.value?.length > 0) {
|
||||
result.data.listProblem = listProblem.value || []
|
||||
}
|
||||
console.log('data', result.data)
|
||||
handleActionSave(
|
||||
@@ -79,7 +82,8 @@ async function actionHandler(type: string) {
|
||||
encounter_id: +route.params.id,
|
||||
time: new Date().toISOString(),
|
||||
},
|
||||
{},
|
||||
() => {},
|
||||
() => {},
|
||||
toast,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user