feat(sep): adjust entry in encounter
This commit is contained in:
@@ -56,6 +56,7 @@ const [sepNumber, sepNumberAttrs] = defineField('sepNumber')
|
||||
const [patientName, patientNameAttrs] = defineField('patientName')
|
||||
const [nationalIdentity, nationalIdentityAttrs] = defineField('nationalIdentity')
|
||||
const [medicalRecordNumber, medicalRecordNumberAttrs] = defineField('medicalRecordNumber')
|
||||
const patientId = ref('')
|
||||
|
||||
const mode = props.isLoading !== undefined ? props.isLoading : false
|
||||
const isReadonly = props.isReadonly !== undefined ? props.isReadonly : false
|
||||
@@ -105,6 +106,7 @@ watch(props, (value) => {
|
||||
}
|
||||
|
||||
if (Object.keys(patient).length > 0) {
|
||||
patientId.value = patient?.id ? String(patient.id) : ''
|
||||
patientName.value = patient?.person?.name || ''
|
||||
nationalIdentity.value = patient?.person?.residentIdentityNumber || ''
|
||||
medicalRecordNumber.value = patient?.number || ''
|
||||
@@ -113,15 +115,12 @@ watch(props, (value) => {
|
||||
|
||||
function onAddSep() {
|
||||
const formValues = {
|
||||
patientName: patientName.value,
|
||||
nationalIdentity: nationalIdentity.value,
|
||||
medicalRecordNumber: medicalRecordNumber.value,
|
||||
doctorId: doctorId.value,
|
||||
doctorCode: doctorId.value,
|
||||
subSpecialistCode: subSpecialistId.value,
|
||||
registerDate: registerDate.value,
|
||||
paymentType: paymentType.value,
|
||||
bpjsNumber: bpjsNumber.value,
|
||||
sepType: sepType.value,
|
||||
sepNumber: sepNumber.value,
|
||||
cardNumber: bpjsNumber.value,
|
||||
sepType: sepType.value
|
||||
}
|
||||
emit('event', 'add-sep', formValues)
|
||||
}
|
||||
@@ -226,22 +225,6 @@ const onSubmit = handleSubmit((values) => {
|
||||
:colCount="3"
|
||||
:cellFlex="false"
|
||||
>
|
||||
<Cell>
|
||||
<Label height="compact">
|
||||
Spesialis / Subspesialis
|
||||
<span class="text-red-500">*</span>
|
||||
</Label>
|
||||
<Field :errMessage="errors.subSpecialistId">
|
||||
<TreeSelect
|
||||
id="subSpecialistId"
|
||||
v-model="subSpecialistId"
|
||||
v-bind="subSpecialistIdAttrs"
|
||||
:data="specialists || []"
|
||||
:on-fetch-children="onFetchChildren"
|
||||
/>
|
||||
</Field>
|
||||
</Cell>
|
||||
|
||||
<Cell>
|
||||
<Label height="compact">
|
||||
Dokter
|
||||
@@ -260,6 +243,22 @@ const onSubmit = handleSubmit((values) => {
|
||||
/>
|
||||
</Field>
|
||||
</Cell>
|
||||
|
||||
<Cell>
|
||||
<Label height="compact">
|
||||
Spesialis / Subspesialis
|
||||
<span class="text-red-500">*</span>
|
||||
</Label>
|
||||
<Field :errMessage="errors.subSpecialistId">
|
||||
<TreeSelect
|
||||
id="subSpecialistId"
|
||||
v-model="subSpecialistId"
|
||||
v-bind="subSpecialistIdAttrs"
|
||||
:data="specialists || []"
|
||||
:on-fetch-children="onFetchChildren"
|
||||
/>
|
||||
</Field>
|
||||
</Cell>
|
||||
</Block>
|
||||
|
||||
<Block
|
||||
@@ -401,7 +400,7 @@ const onSubmit = handleSubmit((values) => {
|
||||
:accept="['pdf', 'jpg', 'png']"
|
||||
:max-size-mb="1"
|
||||
/>
|
||||
|
||||
|
||||
<FileUpload
|
||||
field-name="sippFile"
|
||||
label="Dokumen SIPP"
|
||||
|
||||
@@ -33,6 +33,7 @@ const props = defineProps<{
|
||||
formType: string
|
||||
}>()
|
||||
|
||||
const route = useRoute()
|
||||
const openPatient = ref(false)
|
||||
const isLoading = reactive<DataTableLoader>({
|
||||
isTableLoading: false,
|
||||
@@ -56,11 +57,20 @@ function toKebabCase(str: string): string {
|
||||
|
||||
function toNavigateSep(values: any) {
|
||||
const queryParams = new URLSearchParams()
|
||||
if (values['subSpecialistCode']) {
|
||||
const isSub = isSubspecialist(values['subSpecialistCode'], specialistsTree.value)
|
||||
if (!isSub) {
|
||||
values['specialistCode'] = values['subSpecialistCode']
|
||||
delete values['subSpecialistCode']
|
||||
}
|
||||
}
|
||||
|
||||
Object.keys(values).forEach((field) => {
|
||||
if (values[field]) {
|
||||
queryParams.append(toKebabCase(field), values[field])
|
||||
}
|
||||
})
|
||||
|
||||
navigateTo('/integration/bpjs/sep/add' + `?${queryParams.toString()}`)
|
||||
}
|
||||
|
||||
@@ -72,8 +82,7 @@ function handleEvent(menu: string, value?: any) {
|
||||
} else if (menu === 'add') {
|
||||
navigateTo('/client/patient/add')
|
||||
} else if (menu === 'add-sep') {
|
||||
console.log('formValues', value)
|
||||
toNavigateSep({ resource: 'encounter', isService: 'false', ...value })
|
||||
toNavigateSep({ sourcePath: route.path, resource: 'encounter', isService: 'false', ...value })
|
||||
} else if (menu === 'save') {
|
||||
console.log('Save encounter:', value)
|
||||
} else if (menu === 'cancel') {
|
||||
@@ -116,13 +125,19 @@ function isSubspecialist(value: string, items: TreeItem[]): boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
async function handleFetchDoctors(subSpecialistId: string) {
|
||||
async function handleFetchDoctors(subSpecialistId: string | null = null) {
|
||||
try {
|
||||
// Check if the selected value is a subspecialist or specialist
|
||||
const isSub = isSubspecialist(subSpecialistId, specialistsTree.value)
|
||||
|
||||
// Build filter based on selection type
|
||||
const filterParams: any = { 'page-size': 100, includes: 'employee-Person' }
|
||||
|
||||
if (!subSpecialistId) {
|
||||
const doctors = await getDoctorValueLabelList(filterParams)
|
||||
doctorsList.value = doctors
|
||||
return
|
||||
}
|
||||
|
||||
// Check if the selectd value is a subspecialist or specialist
|
||||
const isSub = isSubspecialist(subSpecialistId, specialistsTree.value)
|
||||
|
||||
if (isSub) {
|
||||
// If selected is subspecialist, filter by subspecialist-id
|
||||
@@ -142,7 +157,7 @@ async function handleFetchDoctors(subSpecialistId: string) {
|
||||
|
||||
function handleFetch(value?: any) {
|
||||
if (value?.subSpecialistId) {
|
||||
handleFetchDoctors(value.subSpecialistId)
|
||||
// handleFetchDoctors(value.subSpecialistId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +175,7 @@ async function handleInit() {
|
||||
label: participantGroups[item],
|
||||
})) as any
|
||||
// Fetch tree data
|
||||
await handleFetchDoctors()
|
||||
await handleFetchSpecialists()
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ const classLevelUpgradesList = ref<Array<{ value: string; label: string }>>([])
|
||||
const classPaySourcesList = ref<Array<{ value: string; label: string }>>([])
|
||||
const isServiceHidden = ref(false)
|
||||
const isSaveLoading = ref(false)
|
||||
const isLetterReadonly = ref(false)
|
||||
const resourceType = ref('')
|
||||
|
||||
async function getMonitoringHistoryMappers() {
|
||||
@@ -158,6 +159,38 @@ async function getLetterMappers(admissionType: string, search: string) {
|
||||
},
|
||||
]
|
||||
} else {
|
||||
// lettersRaw.asalFaskes
|
||||
// lettersRaw.peserta.hakKelas?.kode
|
||||
// lettersRaw.peserta.mr?.noMR
|
||||
// lettersRaw.peserta.mr?.noTelepon
|
||||
// lettersRaw.peserta?.nama
|
||||
// lettersRaw.peserta?.noKartu
|
||||
// lettersRaw.poliRujukan?.kode
|
||||
// lettersRaw.rujukan?.pelayanan?.kode
|
||||
// lettersRaw.rujukan?.poliRujukan?.kode
|
||||
// lettersRaw.diagAwal
|
||||
|
||||
// integrate ke sep ---
|
||||
|
||||
// "rujukan": {
|
||||
// "noRujukan": "0212R0300625B000006", // rujukan?.noKunjungan
|
||||
// "ppkRujukan": "0212R030",
|
||||
// "tglRujukan": "2025-06-26",
|
||||
// "asalRujukan": "2" // asalFaskes
|
||||
// },
|
||||
// "jnsPelayanan": "2",
|
||||
// "ppkPelayanan": "1323R001",
|
||||
// "poli": {
|
||||
// "tujuan": "URO", // rujukan?.poliRujukan?.kode
|
||||
// },
|
||||
// "klsRawat": {
|
||||
// "pembiayaan": "",
|
||||
// "klsRawatHak": "2", // peserta.hakKelas?.kode
|
||||
// "klsRawatNaik": "",
|
||||
// "penanggungJawab": ""
|
||||
// },
|
||||
|
||||
|
||||
letters.value = [
|
||||
{
|
||||
letterNumber: lettersRaw.rujukan.noKunjungan || '',
|
||||
@@ -167,6 +200,9 @@ async function getLetterMappers(admissionType: string, search: string) {
|
||||
bpjsCardNo: lettersRaw.rujukan.peserta.noKartu || '',
|
||||
clinic: lettersRaw.rujukan.poliRujukan.nama || '',
|
||||
doctor: '',
|
||||
information: {
|
||||
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -208,11 +244,13 @@ async function handleEvent(menu: string, value: any) {
|
||||
return
|
||||
}
|
||||
if (menu === 'search-letter') {
|
||||
isLetterReadonly.value = false
|
||||
getLetterMappers(value.admissionType, value.search).then(() => {
|
||||
if (letters.value.length > 0) {
|
||||
const copyObjects = { ...selectedObjects.value }
|
||||
selectedObjects.value = {}
|
||||
selectedLetter.value = letters.value[0].letterNumber
|
||||
isLetterReadonly.value = true
|
||||
setTimeout(() => {
|
||||
selectedObjects.value = copyObjects
|
||||
selectedObjects.value['letterDate'] = letters.value[0].plannedDate
|
||||
|
||||
@@ -46,31 +46,6 @@ function handlePageChange(page: number) {
|
||||
|
||||
const data = ref<VclaimSepData[]>([])
|
||||
|
||||
const dataBpjs = {
|
||||
noSEP: '1323R0010825V027605',
|
||||
tglSEP: '2025-08-28',
|
||||
noKartu: '0001966915168 (MR. 11274212)',
|
||||
nama: 'Kenzie',
|
||||
tglLahir: '2010-01-25',
|
||||
kelamin: 'Laki-laki',
|
||||
telepon: '085854487311',
|
||||
spesialis: 'HEMODIALISA',
|
||||
dokter: 'dr. Nursam, SpPD-KGH',
|
||||
faskes: 'RS Saiful Anwar',
|
||||
diagnosa: 'Penyakit ginjal kronis, stadium 5',
|
||||
catatan: 'Riwayat HEMODIALISA di RSUD DR. SAIFUL ANWAR',
|
||||
peserta: { jenisPeserta: 'PEKERJA MANDIRI' },
|
||||
jenisRawat: 'R. Jalan',
|
||||
jenisKunjungan: 'Kunjungan Kontrol (ulangan)',
|
||||
poliPerujuk: '-',
|
||||
kelasHak: '-',
|
||||
kelasRawat: 'Kelas 3',
|
||||
penjamin: '-',
|
||||
qrCodeUrl: '/dummy-qr.png',
|
||||
cetakanKe: 1,
|
||||
tglCetak: '28-08-2025 07:10:30 WIB',
|
||||
}
|
||||
|
||||
const refSearchNav: RefSearchNav = {
|
||||
onClick: () => {
|
||||
// open filter modal
|
||||
@@ -154,7 +129,7 @@ async function getSepList() {
|
||||
await getMonitoringVisitMappers()
|
||||
}
|
||||
|
||||
function exportCsv() {
|
||||
function exportCsv() {
|
||||
console.log('Ekspor CSV dipilih')
|
||||
// tambahkan logic untuk generate CSV
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user