feat: Add encounter list with filtering, VClaim SEP/SIPP document management, and a new file field component.
This commit is contained in:
@@ -27,8 +27,8 @@ function handleReset() {
|
||||
|
||||
function handleSearch() {
|
||||
emit('search', {
|
||||
paymentMethodCode: paymentItem.value,
|
||||
unit: unitItem.value,
|
||||
'paymentMethod-code': paymentItem.value,
|
||||
'unit-code': unitItem.value,
|
||||
visit: visitItem.value,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ const sippFileReview = ref<any>({})
|
||||
|
||||
const getEncounterDocument = () => {
|
||||
const encounter = props.rec
|
||||
sippFileReview.value = {}
|
||||
sepFileReview.value = {}
|
||||
if (encounter.encounterDocuments && Array.isArray(encounter.encounterDocuments)) {
|
||||
for (const doc of encounter.encounterDocuments) {
|
||||
if (doc.type_code === 'vclaim-sep') {
|
||||
@@ -39,7 +41,7 @@ onMounted(() => {
|
||||
variant="outline"
|
||||
type="button"
|
||||
class="h-[40px] rounded-md border-orange-400 text-orange-400 hover:bg-green-50"
|
||||
@click="handleSepView('sipp', sippFileReview.id ? 'edit' : 'view')"
|
||||
@click="handleSepView('sipp', sippFileReview.id ? 'view' : 'edit')"
|
||||
>
|
||||
<Icon
|
||||
v-if="sippFileReview.id"
|
||||
@@ -57,7 +59,7 @@ onMounted(() => {
|
||||
variant="outline"
|
||||
type="button"
|
||||
class="h-[40px] rounded-md border-orange-400 text-orange-400 hover:bg-green-50"
|
||||
@click="handleSepView('sep', sepFileReview.id ? 'edit' : 'view')"
|
||||
@click="handleSepView('sep', sepFileReview.id ? 'view' : 'edit')"
|
||||
>
|
||||
<Icon
|
||||
v-if="sepFileReview.id"
|
||||
|
||||
@@ -129,6 +129,7 @@ watch([recSepId, recSepMenu, recSepSubMenu], (value) => {
|
||||
const id = value[0]
|
||||
const menu = value[1]
|
||||
const subMenu = value[2]
|
||||
console.log(id, menu, subMenu)
|
||||
if (!id) return
|
||||
if (subMenu === 'view') {
|
||||
handleViewFile(id, menu, subMenu)
|
||||
@@ -189,6 +190,7 @@ async function getPatientList() {
|
||||
function handleUploadFile(id: number, menu: string) {
|
||||
uploadFile.value = null
|
||||
document.getElementById('uploadFile')?.click()
|
||||
console.log(id)
|
||||
}
|
||||
|
||||
async function handleUploadFileSubmit() {
|
||||
@@ -216,7 +218,8 @@ async function handleUploadFileSubmit() {
|
||||
}
|
||||
|
||||
function handleViewFile(id: number, menu: string, subMenu: string) {
|
||||
const currentData: any = data.value.find((item: any) => item.id === id)
|
||||
const currentData: any = data.value.find((item: any) => Number(item.id) === Number(id))
|
||||
console.log(currentData)
|
||||
if (!currentData) return
|
||||
let fileReviewSep: any = null
|
||||
let fileReviewSipp: any = null
|
||||
@@ -440,7 +443,6 @@ function handleRemoveConfirmation() {
|
||||
</Dialog>
|
||||
|
||||
<FileUpload
|
||||
id="uploadFile"
|
||||
class="hidden"
|
||||
field-name="uploadFile"
|
||||
label="Dokumen"
|
||||
|
||||
@@ -72,7 +72,7 @@ async function onFileChange(event: Event, handleChange: (value: any) => void) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DE.Cell>
|
||||
<DE.Cell :class="class">
|
||||
<DE.Label
|
||||
v-if="label !== ''"
|
||||
:label-for="fieldName"
|
||||
@@ -91,12 +91,13 @@ async function onFileChange(event: Event, handleChange: (value: any) => void) {
|
||||
<FormItem>
|
||||
<FormControl class="flex flex-col">
|
||||
<Input
|
||||
@change="onFileChange($event, handleChange)"
|
||||
:id="fieldName"
|
||||
type="file"
|
||||
:disabled="isDisabled"
|
||||
v-bind="{ onBlur: componentField.onBlur }"
|
||||
:placeholder="placeholder"
|
||||
:class="cn('focus:border-primary focus:ring-2 focus:ring-primary focus:ring-offset-0')"
|
||||
@change="onFileChange($event, handleChange)"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
||||
Reference in New Issue
Block a user