feat (encounter): add patient search and add functionality to entry form

This commit is contained in:
Abizrh
2025-09-27 23:15:01 +07:00
parent dcfadcf4a0
commit a5b7b15910
3 changed files with 72 additions and 1 deletions
@@ -39,6 +39,7 @@ const props = defineProps<{
const emit = defineEmits<{
submit: [values: DivisionFormData, resetForm: () => void]
cancel: [resetForm: () => void]
click: (e: Event) => void
}>()
const relationshipOpts = mapToComboboxOptList(relationshipCodes)
@@ -112,6 +113,20 @@ function onAddSep() {
<div class="p-2">
<h2 class="text-md font-semibold">Data Pasien</h2>
</div>
<div class="my-2 flex gap-6 p-2 text-sm">
<span>
Sudah pernah terdaftar sebagai pasien?
<Button class="bg-primary" size="sm" @click.prevent="emit('click', 'search')">
<Icon name="i-lucide-search" class="mr-1" /> Cari Pasien
</Button>
</span>
<span>
Belum pernah terdaftar sebagai pasien?
<Button class="bg-primary" size="sm" @click.prevent="emit('click', 'add')">
<Icon name="i-lucide-plus" class="mr-1" /> Tambah Pasien Baru
</Button>
</span>
</div>
<Block>
<FieldGroup :column="3">
<Label label-for="patient_name">Nama Pasien</Label>
+20
View File
@@ -0,0 +1,20 @@
<script setup lang="ts">
import { cols, funcComponent, funcHtml, funcParsed, header, keys } from './list-cfg'
defineProps<{ data: any[] }>()
const modelValue = defineModel<any | null>()
</script>
<template>
<PubBaseDataTable
v-model="modelValue"
select-mode="single"
:rows="data"
:cols="cols"
:header="header"
:keys="keys"
:func-parsed="funcParsed"
:func-html="funcHtml"
:func-component="funcComponent"
/>
</template>