diff --git a/app/components/app/antibiotic-in-use/entry.vue b/app/components/app/antibiotic-in-use/entry.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/antibiotic-in-use/list.cfg.ts b/app/components/app/antibiotic-in-use/list.cfg.ts new file mode 100644 index 00000000..429e2dd8 --- /dev/null +++ b/app/components/app/antibiotic-in-use/list.cfg.ts @@ -0,0 +1,28 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const config: Config = { + cols: [{}, {}], + + headers: [[{ label: 'Kode' }, { label: 'Nama' }]], + + keys: ['code', 'name'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + }, + + components: { + }, + + htmls: { + }, +} diff --git a/app/components/app/antibiotic-in-use/list.vue b/app/components/app/antibiotic-in-use/list.vue new file mode 100644 index 00000000..fac15e5c --- /dev/null +++ b/app/components/app/antibiotic-in-use/list.vue @@ -0,0 +1,17 @@ + + + diff --git a/app/handlers/antibiotic-in-use.ts b/app/handlers/antibiotic-in-use.ts new file mode 100644 index 00000000..d10f3b1c --- /dev/null +++ b/app/handlers/antibiotic-in-use.ts @@ -0,0 +1,24 @@ +// Handlers +import { genCrudHandler } from '~/handlers/_handler' + +// Services +import { create, update, remove } from '~/services/antibiotic-in-use' + +export const { + recId, + recAction, + recItem, + isReadonly, + isProcessing, + isFormEntryDialogOpen, + isRecordConfirmationOpen, + onResetState, + handleActionSave, + handleActionEdit, + handleActionRemove, + handleCancelForm, +} = genCrudHandler({ + create, + update, + remove, +}) diff --git a/app/handlers/antibiotic-src-category.ts b/app/handlers/antibiotic-src-category.ts new file mode 100644 index 00000000..e68380b0 --- /dev/null +++ b/app/handlers/antibiotic-src-category.ts @@ -0,0 +1,24 @@ +// Handlers +import { genCrudHandler } from '~/handlers/_handler' + +// Services +import { create, update, remove } from '~/services/antibiotic-src-category' + +export const { + recId, + recAction, + recItem, + isReadonly, + isProcessing, + isFormEntryDialogOpen, + isRecordConfirmationOpen, + onResetState, + handleActionSave, + handleActionEdit, + handleActionRemove, + handleCancelForm, +} = genCrudHandler({ + create, + update, + remove, +}) diff --git a/app/handlers/antibiotic-src.ts b/app/handlers/antibiotic-src.ts new file mode 100644 index 00000000..1671471b --- /dev/null +++ b/app/handlers/antibiotic-src.ts @@ -0,0 +1,24 @@ +// Handlers +import { genCrudHandler } from '~/handlers/_handler' + +// Services +import { create, update, remove } from '~/services/antibiotic-src' + +export const { + recId, + recAction, + recItem, + isReadonly, + isProcessing, + isFormEntryDialogOpen, + isRecordConfirmationOpen, + onResetState, + handleActionSave, + handleActionEdit, + handleActionRemove, + handleCancelForm, +} = genCrudHandler({ + create, + update, + remove, +}) diff --git a/app/models/antibiotic-in-use.ts b/app/models/antibiotic-in-use.ts new file mode 100644 index 00000000..e793fc12 --- /dev/null +++ b/app/models/antibiotic-in-use.ts @@ -0,0 +1,16 @@ +import { type Base, genBase } from "./_base" +import type { AntibioticSrc } from "./antibiotic-src" + +export interface AntibioticInUse extends Base { + mcuOrder_id: number + antibioticSrc_code: string + antibioticSrc: AntibioticSrc +} + +export function genDevice(): Pick { + return { + ...genBase(), + mcuOrder_id: 0, + antibioticSrc_code: '' + } +} diff --git a/app/models/antibiotic-src-category.ts b/app/models/antibiotic-src-category.ts new file mode 100644 index 00000000..6001b4e8 --- /dev/null +++ b/app/models/antibiotic-src-category.ts @@ -0,0 +1,14 @@ +import { type Base, genBase } from "./_base" + +export interface AntibioticSrcCategory extends Base { + code: string + name: string +} + +export function genDevice(): AntibioticSrcCategory { + return { + ...genBase(), + code: '', + name: '', + } +} diff --git a/app/models/antibiotic-src.ts b/app/models/antibiotic-src.ts new file mode 100644 index 00000000..ee272f54 --- /dev/null +++ b/app/models/antibiotic-src.ts @@ -0,0 +1,16 @@ +import { type Base, genBase } from "./_base" + +export interface AntibioticSrc extends Base { + code: string + name: string + antibioticSrcCategory_code: string +} + +export function genDevice(): AntibioticSrc { + return { + ...genBase(), + code: '', + name: '', + antibioticSrcCategory_code: '' + } +} diff --git a/app/models/mcu-order.ts b/app/models/mcu-order.ts index 35e4018c..859c0548 100644 --- a/app/models/mcu-order.ts +++ b/app/models/mcu-order.ts @@ -1,4 +1,5 @@ import { type Base, genBase } from "./_base" +import type { AntibioticInUse } from "./antibiotic-in-use" import { type Doctor, genDoctor } from "./doctor" import type { McuOrderItem } from "./mcu-order-item" @@ -13,6 +14,7 @@ export interface McuOrder extends Base { temperature?: number mcuUrgencyLevel_code?: string items: McuOrderItem[] + antibioticInUseItems: AntibioticInUse[] } export function genMcuOrder(): McuOrder { @@ -23,7 +25,8 @@ export function genMcuOrder(): McuOrder { doctor: genDoctor(), specimenPickTime: '', examinationDate: '', - items: [] + items: [], + antibioticInUseItems: [], } } diff --git a/app/services/antibiotic-in-use.ts b/app/services/antibiotic-in-use.ts new file mode 100644 index 00000000..41038eb5 --- /dev/null +++ b/app/services/antibiotic-in-use.ts @@ -0,0 +1,25 @@ +// Base +import * as base from './_crud-base' + +const name = 'antibiotic-in-use' +const path = '/api/v1/' + name + +export function create(data: any) { + return base.create(path, data, name) +} + +export function getList(params: any = null) { + return base.getList(path, params, name) +} + +export function getDetail(id: number | string) { + return base.getDetail(path, id, name) +} + +export function update(id: number | string, data: any) { + return base.update(path, id, data, name) +} + +export function remove(id: number | string) { + return base.remove(path, id, name) +} diff --git a/app/services/antibiotic-src-category.ts b/app/services/antibiotic-src-category.ts new file mode 100644 index 00000000..eac38f0e --- /dev/null +++ b/app/services/antibiotic-src-category.ts @@ -0,0 +1,25 @@ +// Base +import * as base from './_crud-base' + +const name = 'antibiotic-src-category' +const path = '/api/v1/' + name + +export function create(data: any) { + return base.create(path, data, name) +} + +export function getList(params: any = null) { + return base.getList(path, params, name) +} + +export function getDetail(id: number | string) { + return base.getDetail(path, id, name) +} + +export function update(id: number | string, data: any) { + return base.update(path, id, data, name) +} + +export function remove(id: number | string) { + return base.remove(path, id, name) +} diff --git a/app/services/antibiotic-src.ts b/app/services/antibiotic-src.ts new file mode 100644 index 00000000..4c2623bf --- /dev/null +++ b/app/services/antibiotic-src.ts @@ -0,0 +1,25 @@ +// Base +import * as base from './_crud-base' + +const name = 'antibiotic-src' +const path = '/api/v1/' + name + +export function create(data: any) { + return base.create(path, data, name) +} + +export function getList(params: any = null) { + return base.getList(path, params, name) +} + +export function getDetail(id: number | string) { + return base.getDetail(path, id, name) +} + +export function update(id: number | string, data: any) { + return base.update(path, id, data, name) +} + +export function remove(id: number | string) { + return base.remove(path, id, name) +}