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