diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..6e16f543 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,30 @@ +# top-most EditorConfig file +root = true + +# Default settings for all files +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# For Markdown files, don't trim trailing whitespace (karena kadang dipakai untuk line break) +[*.md] +trim_trailing_whitespace = false + +# For JSON, YAML, and config files +[*.{json,yml,yaml}] +indent_style = space +indent_size = 2 + +# For JS, TS, Vue files +[*.{js,ts,vue}] +indent_style = space +indent_size = 2 + +# For CSS, SCSS, PostCSS +[*.{css,scss,pcss}] +indent_style = space +indent_size = 2 diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..b6721291 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +API_ORIGIN= diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..bff36007 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,11 @@ +{ + "useTabs": false, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "all", + "printWidth": 120, + "semi": false, + "plugins": ["prettier-plugin-tailwindcss"], + "htmlWhitespaceSensitivity": "ignore", + "singleAttributePerLine": true +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..4b1147d4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}" + } + ] +} diff --git a/README-nuxt.md b/README-nuxt.md new file mode 100644 index 00000000..25b58212 --- /dev/null +++ b/README-nuxt.md @@ -0,0 +1,75 @@ +# Nuxt Minimal Starter + +Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. + +## Setup + +Make sure to install dependencies: + +```bash +# npm +npm install + +# pnpm +pnpm install + +# yarn +yarn install + +# bun +bun install +``` + +## Development Server + +Start the development server on `http://localhost:3000`: + +```bash +# npm +npm run dev + +# pnpm +pnpm dev + +# yarn +yarn dev + +# bun +bun run dev +``` + +## Production + +Build the application for production: + +```bash +# npm +npm run build + +# pnpm +pnpm build + +# yarn +yarn build + +# bun +bun run build +``` + +Locally preview production build: + +```bash +# npm +npm run preview + +# pnpm +pnpm preview + +# yarn +yarn preview + +# bun +bun run preview +``` + +Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. diff --git a/README.md b/README.md index 078e8c9a..45e4a4e5 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,111 @@ RSSA - Front End -If you see this, the development is still not merged yet. Please check another branch. +> [!IMPORTANT] +> Read this following instructions before doing your job + +## Framework Guide + +- [Vue Style Guide](https://vuejs.org/style-guide) +- [Nuxt Style Guide](https://nuxt.com/docs/4.x/guide) +- [Shadcn Vue @radix-ui](https://radix.shadcn-vue.com/) + +## Configuration + +- `nuxt.config.ts`
Nuxt configuration file +- `.env`
Some environment variables + +## Directory Structure for `app/` + +- `app.vue`: Main layout +- `components` : Contains all reusable UI components. +- `components/content` : Entry point for business logic and workflows. Pages or routes call these content components to handle API requests and process application logic +- `components/app` : View-layer components that manage and present data. These are used within `content/` to render or handle specific parts of the UI, and return results back to the content +- `components/pub` : Public/shared components used across different parts of the app. +- `composables` : Contains reusable logic and utility functions (e.g. composables, hooks).. +- `layouts` : Reusable UI layout patterns used across pages. +- `models` : Contains data definitions or interfaces. +- `schemas` : Contains JSON schemas used for validation. +- `services` : Contains reusable API calls and business logic. + + +## Directory Structure for `app/pages` + +- `pages/auth` : Authentication related pages. +- `pages/(features)` : Grouped feature modules that reflect specific business content or domains. + +## Directory Structure for `server/` + +- `server/api` : API or proxy requests + +## Workflows + +The basic development workflow follows these steps: + +### Define Your Data in `models/` + +- Create data definitions or interfaces. +- These should represent the structure of the data used across your app. + +### Build UI Components in `components/app` + +- Create reusable UI and app specific components. +- Keep components pure, avoid making HTTP requests directly within them. +- They receive data via props and emit events upward. + +### Business Logic in `components/content` + +- This layer connects the UI with the logic (API calls, validations, navigation). +- It composes components from `components/app/`, `components/pub/`, and other content. +- Also responsible for managing state, side effects, and interactions. + +### Create Pages in `pages/` + +- Define permissions and guards for each page. +- Pages load the appropriate content from `components/content/`. +- They do not contain UI or logic directly, just route level layout or guards. + +### Validation + +- UI level validation in `components/app`. help users avoid mistakes before submitting. + - Lightweight/instant validation related to UX. + - Basic formatting (email regex, numeric-only, password length). + - Showing error messages directly under the field. + +- Business level validation in `components/flow`. cannot rely only on the UI, since it often requires server-side checks or rules that may change. + - More complex validation rules tied to business logic. + +## Code Conventions + +- Under the script setup block, putting things in group with the following order: + - Imports → all dependencies, sorted by external, alias (~), and relative imports. + - Props & Emits → clearly define component inputs & outputs. + - State & Computed → all ref, reactive, and computed variables grouped together. + - Lifecycle Hooks → grouped by mounting → updating → unmounting order. + - Functions → async first (fetching, API calls), then utility & event handlers. + - Watchers → if needed, put them at the bottom. + - Template → keep clean and minimal logic, use methods/computed instead of inline JS. +- Declaration Naming + - Uses PascalCase for `type` naming + - Uses camelCase for `variable` and `const` naming + - Underscore can be used to indicates that a variable has derived from an attribute of an object
+ for example: `person_name` indicates it is an attribute `name` from object `person` +- Looping + - Uses `i`, `j`, `k` as variable for `for` looping index + - Uses `item` as object instantition for `forEach` loop callback + - Uses `item` as object instantition for `v-for` loop callback in the template + +## Git Workflows + +The basic git workflow follows these steps: + +1. Create a new branch on `dev` + - branch name should be `feat/` or `fix/` +2. Make your changes +3. Commit your changes + - commit msg format: `[type]: [description]` + - `type` can be `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert` + - `description` should be a brief description of the changes + - Example: `feat: add new feature` +4. Push your changes to `dev` +5. Create a pull request from `dev` to `main` diff --git a/app/app.vue b/app/app.vue new file mode 100644 index 00000000..46d6ca88 --- /dev/null +++ b/app/app.vue @@ -0,0 +1,25 @@ + + + diff --git a/app/assets/css/main.css b/app/assets/css/main.css new file mode 100644 index 00000000..b5064af7 --- /dev/null +++ b/app/assets/css/main.css @@ -0,0 +1,378 @@ +/* SIMRS RSSA Design System - Pure CSS (No Tailwind) */ + +/* CSS Variables */ +:root { + /* Medical Theme Colors */ + --background: 230 20% 98%; + --foreground: 210 20% 15%; + --card: 0 0% 100%; + --card-foreground: 210 20% 15%; + --popover: 0 0% 100%; + --popover-foreground: 210 20% 15%; + + /* Primary - Medical Green */ + --primary: 26 89% 57%; + --primary-foreground: 0 0% 100%; + --primary-hover: 26, 92%, 65%; + + /* Secondary - Clean Blue */ + --secondary: 210 50% 96%; + --secondary-foreground: 210 20% 20%; + --muted: 210 25% 95%; + --muted-foreground: 210 15% 50%; + + /* Accent - Neutral Gray */ + --accent: 210 40% 96%; + --accent-foreground: 222.2 84% 4.9%; + --destructive: 0 75% 55%; + --destructive-foreground: 0 0% 100%; + --border: 210 20% 88%; + --input: 210 20% 95%; + --ring: 150 75% 35%; + + /* Medical Status Colors */ + --success: 150 75% 40%; + --success-foreground: 0 0% 100%; + --warning: 45 95% 60%; + --warning-foreground: 210 20% 15%; + --info: 210 100% 50%; + --info-foreground: 0 0% 100%; + + /* Gradients */ + --gradient-primary: linear-gradient(135deg, hsl(150 75% 35%), hsl(150 75% 45%)); + --gradient-medical: linear-gradient(135deg, hsl(150 75% 35%), hsl(210 100% 50%)); + --gradient-subtle: linear-gradient(180deg, hsl(210 20% 98%), hsl(210 25% 95%)); + + /* Shadows */ + --shadow-medical: 0 4px 20px -4px hsl(150 75% 35% / 0.15); + --shadow-card: 0 2px 10px -2px hsl(210 20% 15% / 0.1); + --shadow-glow: 0 0 30px hsl(150 75% 35% / 0.2); + + /* Transitions */ + --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + --transition-fast: all 0.15s ease-out; + + /* Border Radius */ + --radius: 0.5rem; + --radius-lg: var(--radius); + --radius-md: calc(var(--radius) - 2px); + --radius-sm: calc(var(--radius) - 4px); + + /* Sidebar */ + --sidebar-background: 0 0% 98%; + --sidebar-foreground: 240 5.3% 26.1%; + --sidebar-primary: 240 5.9% 10%; + --sidebar-primary-foreground: 0 0% 98%; + --sidebar-accent: 240 4.8% 95.9%; + --sidebar-accent-foreground: 240 5.9% 10%; + --sidebar-border: 220 13% 91%; + --sidebar-ring: 217.2 91.2% 59.8%; +} + +.dark { + --background: 210 25% 8%; + --foreground: 210 20% 95%; + --card: 210 25% 10%; + --card-foreground: 210 20% 95%; + --popover: 210 25% 10%; + --popover-foreground: 210 20% 95%; + --primary: 26 89% 57%; + --primary-foreground: 0 0% 100%; + --primary-hover: 26, 92%, 65%; + --secondary: 210 25% 15%; + --secondary-foreground: 210 20% 90%; + --muted: 210 25% 15%; + --muted-foreground: 210 15% 65%; + --accent: 210 100% 55%; + --accent-foreground: 0 0% 100%; + --destructive: 0 75% 60%; + --destructive-foreground: 0 0% 100%; + --border: 210 25% 20%; + --input: 210 25% 15%; + --ring: 150 75% 45%; + --success: 150 75% 50%; + --warning: 45 95% 65%; + --info: 210 100% 60%; + --gradient-primary: linear-gradient(135deg, hsl(150 75% 45%), hsl(150 75% 55%)); + --gradient-medical: linear-gradient(135deg, hsl(150 75% 45%), hsl(210 100% 55%)); + --gradient-subtle: linear-gradient(180deg, hsl(210 25% 8%), hsl(210 25% 12%)); + --sidebar-background: 240 5.9% 10%; + --sidebar-foreground: 240 4.8% 95.9%; + --sidebar-primary: 224.3 76.3% 48%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 240 3.7% 15.9%; + --sidebar-accent-foreground: 240 4.8% 95.9%; + --sidebar-border: 240 3.7% 15.9%; + --sidebar-ring: 217.2 91.2% 59.8%; +} + +/* Keyframes for Animations */ +@keyframes accordion-down { + from { + height: 0; + } + to { + height: var(--radix-accordion-content-height); + } +} + +@keyframes accordion-up { + from { + height: var(--radix-accordion-content-height); + } + to { + height: 0; + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + transform: translateY(10px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes slideUp { + 0% { + transform: translateY(100%); + } + 100% { + transform: translateY(0); + } +} + +@keyframes pulseMedical { + 0%, + 100% { + box-shadow: 0 0 0 0 hsl(var(--primary) / 0.4); + } + 50% { + box-shadow: 0 0 0 10px hsl(var(--primary) / 0); + } +} + +/* Base Styles */ +* { + border-color: hsl(var(--border)); + box-sizing: border-box; +} + +body { + /* background-color: hsl(var(--background)); */ + /* background-color: hsl(var(--background), 0.5); */ + color: hsl(var(--foreground)); + line-height: 1.5; + margin: 0; +} + +body { + @apply bg-slate-100 dark:bg-slate-800 ; +} + +body, table, label { + @apply md:!text-xs xl:!text-sm 2xl:!text-sm; +} + +/* Container */ +.container { + width: 100%; + margin: 0 auto; + padding: 0 2rem; +} + +@media (min-width: 1400px) { + .container { + max-width: 1400px; + } +} + +/* Color Classes */ +.bg-background { + background-color: hsl(var(--background)); +} +.bg-foreground { + background-color: hsl(var(--foreground)); +} +.bg-card { + background-color: hsl(var(--card)); +} +.bg-primary { + background-color: hsl(var(--primary)); +} +.bg-secondary { + background-color: hsl(var(--secondary)); +} +.bg-accent { + background-color: hsl(var(--accent)); +} +.bg-destructive { + background-color: hsl(var(--destructive)); +} +.bg-muted { + background-color: hsl(var(--muted)); +} +.bg-success { + background-color: hsl(var(--success)); +} +.bg-warning { + background-color: hsl(var(--warning)); +} +.bg-info { + background-color: hsl(var(--info)); +} + +.text-background { + color: hsl(var(--background)); +} +.text-foreground { + color: hsl(var(--foreground)); +} +.text-card { + color: hsl(var(--card)); +} +.text-primary { + color: hsl(var(--primary)); +} +.text-secondary { + color: hsl(var(--secondary)); +} +.text-accent { + color: hsl(var(--accent)); +} +.text-destructive { + color: hsl(var(--destructive)); +} +.text-muted { + color: hsl(var(--muted)); +} +.text-success { + color: hsl(var(--success)); +} +.text-warning { + color: hsl(var(--warning)); +} +.text-info { + color: hsl(var(--info)); +} + +.text-primary-foreground { + color: hsl(var(--primary-foreground)); +} +.text-secondary-foreground { + color: hsl(var(--secondary-foreground)); +} +.text-accent-foreground { + color: hsl(var(--accent-foreground)); +} +.text-destructive-foreground { + color: hsl(var(--destructive-foreground)); +} +.text-muted-foreground { + color: hsl(var(--muted-foreground)); +} +.text-success-foreground { + color: hsl(var(--success-foreground)); +} +.text-warning-foreground { + color: hsl(var(--warning-foreground)); +} +.text-info-foreground { + color: hsl(var(--info-foreground)); +} + +.border-primary { + border-color: hsl(var(--primary)); +} +.border-secondary { + border-color: hsl(var(--secondary)); +} +.border-accent { + border-color: hsl(var(--accent)); +} +.border-destructive { + border-color: hsl(var(--destructive)); +} +.border-input { + border-color: hsl(var(--input)); +} + +/* Sidebar Colors */ +.bg-sidebar { + background-color: hsl(var(--sidebar-background)); +} +.text-sidebar { + color: hsl(var(--sidebar-foreground)); +} +.bg-sidebar-primary { + background-color: hsl(var(--sidebar-primary)); +} +.text-sidebar-primary { + color: hsl(var(--sidebar-primary)); +} +.bg-sidebar-accent { + background-color: hsl(var(--sidebar-accent)); +} +.text-sidebar-accent { + color: hsl(var(--sidebar-accent)); +} +.border-sidebar { + border-color: hsl(var(--sidebar-border)); +} + +/* Background Images */ +.bg-gradient-medical { + background-image: var(--gradient-medical); +} +.bg-gradient-primary { + background-image: var(--gradient-primary); +} +.bg-gradient-subtle { + background-image: var(--gradient-subtle); +} + +/* Border Radius */ +.rounded-sm { + border-radius: var(--radius-sm); +} + +/* Form Error Styling */ +.field-error-info { + font-size: 0.75rem; + margin-left: 0.25rem; + color: hsl(var(--destructive)); + /* font-size: 0.875rem; */ + margin-top: 0.25rem; + min-height: 1rem; /* Reserve space to prevent CLS */ + line-height: 1.25; +} + +/* .rounded-md { border-radius: var */ + +/* Dashboard grid utility */ +.dashboard-grid { + display: grid; + gap: 1rem; +} + +@media (min-width: 768px) { + .dashboard-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 1024px) { + .dashboard-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} + +@media (min-width: 1280px) { + .dashboard-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 1.25rem; + } +} diff --git a/app/components/app/assesment-function/entry-form.vue b/app/components/app/assesment-function/entry-form.vue new file mode 100644 index 00000000..5768c6a0 --- /dev/null +++ b/app/components/app/assesment-function/entry-form.vue @@ -0,0 +1,47 @@ + + + diff --git a/app/components/app/assesment-function/list-cfg.ts b/app/components/app/assesment-function/list-cfg.ts new file mode 100644 index 00000000..460cacd9 --- /dev/null +++ b/app/components/app/assesment-function/list-cfg.ts @@ -0,0 +1,119 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [ + {}, + {}, + {}, + { width: 100 }, + { width: 120 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + {}, + { width: 50 }, +] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'Rekam Medis' }, + { label: 'KTP' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'JK' }, + { label: 'Pendidikan' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'name', + 'medicalRecord_number', + 'identity_number', + 'birth_date', + 'patient_age', + 'gender', + 'education', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + birth_date: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.birth_date == 'object' && recX.birth_date) { + return (recX.birth_date as Date).toLocaleDateString() + } else if (typeof recX.birth_date == 'string') { + return (recX.birth_date as string).substring(0, 10) + } + return recX.birth_date + }, + patient_age: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.birth_date?.split('T')[0] + }, + gender: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { + return 'Tidak Diketahui' + } + return recX.gender_code + }, + education: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.education_code == 'number' && recX.education_code >= 0) { + return recX.education_code + } else if (typeof recX.education_code) { + return recX.education_code + } + return '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/assesment-function/list.vue b/app/components/app/assesment-function/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/assesment-function/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/assesment-function/picker.vue b/app/components/app/assesment-function/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/assesment-function/search.vue b/app/components/app/assesment-function/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/auth/login.vue b/app/components/app/auth/login.vue new file mode 100644 index 00000000..29fb60b4 --- /dev/null +++ b/app/components/app/auth/login.vue @@ -0,0 +1,74 @@ + + + diff --git a/app/components/app/bed/entry-form.vue b/app/components/app/bed/entry-form.vue new file mode 100644 index 00000000..fb851aa4 --- /dev/null +++ b/app/components/app/bed/entry-form.vue @@ -0,0 +1,105 @@ + + + diff --git a/app/components/app/bed/list-cfg.ts b/app/components/app/bed/list-cfg.ts new file mode 100644 index 00000000..5174e69a --- /dev/null +++ b/app/components/app/bed/list-cfg.ts @@ -0,0 +1,47 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{ width: 100 }, {}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Counter Induk' }, { label: '' }]] + +export const keys = ['code', 'name', 'parent', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/bed/list.vue b/app/components/app/bed/list.vue new file mode 100644 index 00000000..af63d76e --- /dev/null +++ b/app/components/app/bed/list.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/building/entry-form.vue b/app/components/app/building/entry-form.vue new file mode 100644 index 00000000..c2851e2d --- /dev/null +++ b/app/components/app/building/entry-form.vue @@ -0,0 +1,108 @@ + + + diff --git a/app/components/app/building/list-cfg.ts b/app/components/app/building/list-cfg.ts new file mode 100644 index 00000000..905ec837 --- /dev/null +++ b/app/components/app/building/list-cfg.ts @@ -0,0 +1,37 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: '' }]] + +export const keys = ['code', 'name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = {} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/building/list.vue b/app/components/app/building/list.vue new file mode 100644 index 00000000..e1b056ce --- /dev/null +++ b/app/components/app/building/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/app/chamber/entry-form.vue b/app/components/app/chamber/entry-form.vue new file mode 100644 index 00000000..fb851aa4 --- /dev/null +++ b/app/components/app/chamber/entry-form.vue @@ -0,0 +1,105 @@ + + + diff --git a/app/components/app/chamber/list-cfg.ts b/app/components/app/chamber/list-cfg.ts new file mode 100644 index 00000000..5174e69a --- /dev/null +++ b/app/components/app/chamber/list-cfg.ts @@ -0,0 +1,47 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{ width: 100 }, {}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Counter Induk' }, { label: '' }]] + +export const keys = ['code', 'name', 'parent', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/chamber/list.vue b/app/components/app/chamber/list.vue new file mode 100644 index 00000000..af63d76e --- /dev/null +++ b/app/components/app/chamber/list.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/counter/entry-form.vue b/app/components/app/counter/entry-form.vue new file mode 100644 index 00000000..c2851e2d --- /dev/null +++ b/app/components/app/counter/entry-form.vue @@ -0,0 +1,108 @@ + + + diff --git a/app/components/app/counter/list-cfg.ts b/app/components/app/counter/list-cfg.ts new file mode 100644 index 00000000..905ec837 --- /dev/null +++ b/app/components/app/counter/list-cfg.ts @@ -0,0 +1,37 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: '' }]] + +export const keys = ['code', 'name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = {} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/counter/list.vue b/app/components/app/counter/list.vue new file mode 100644 index 00000000..e1b056ce --- /dev/null +++ b/app/components/app/counter/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/app/division/entry-form.vue b/app/components/app/division/entry-form.vue new file mode 100644 index 00000000..c58d83ac --- /dev/null +++ b/app/components/app/division/entry-form.vue @@ -0,0 +1,125 @@ + + + diff --git a/app/components/app/division/list-cfg.ts b/app/components/app/division/list-cfg.ts new file mode 100644 index 00000000..d5479579 --- /dev/null +++ b/app/components/app/division/list-cfg.ts @@ -0,0 +1,47 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue')) + +export const cols: Col[] = [{}, {}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Divisi Induk' }, { label: '' }]] + +export const keys = ['code', 'name', 'parent', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/division/list.vue b/app/components/app/division/list.vue new file mode 100644 index 00000000..e1b056ce --- /dev/null +++ b/app/components/app/division/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/app/doctor/entry-form.vue b/app/components/app/doctor/entry-form.vue new file mode 100644 index 00000000..24584074 --- /dev/null +++ b/app/components/app/doctor/entry-form.vue @@ -0,0 +1,48 @@ + + + diff --git a/app/components/app/doctor/list-cfg.ts b/app/components/app/doctor/list-cfg.ts new file mode 100644 index 00000000..14c9cf0d --- /dev/null +++ b/app/components/app/doctor/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/doctor/list.vue b/app/components/app/doctor/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/doctor/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/doctor/picker.vue b/app/components/app/doctor/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/doctor/search.vue b/app/components/app/doctor/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/doctor/status-badge.vue b/app/components/app/doctor/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/doctor/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/employee/entry-form.vue b/app/components/app/employee/entry-form.vue new file mode 100644 index 00000000..8ccf0916 --- /dev/null +++ b/app/components/app/employee/entry-form.vue @@ -0,0 +1,49 @@ + + + diff --git a/app/components/app/employee/list-cfg.ts b/app/components/app/employee/list-cfg.ts new file mode 100644 index 00000000..69ee9962 --- /dev/null +++ b/app/components/app/employee/list-cfg.ts @@ -0,0 +1,109 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +const doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + { width: 100 }, + { width: 50 }, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + console.log(rec) + const recX = rec as SmallDetailDto + return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, + status: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return doctorStatus[recX.status_code as keyof typeof doctorStatus] + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/employee/list.vue b/app/components/app/employee/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/employee/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/employee/picker.vue b/app/components/app/employee/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/employee/search.vue b/app/components/app/employee/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/encounter/entry-form.vue b/app/components/app/encounter/entry-form.vue new file mode 100644 index 00000000..6f2ad074 --- /dev/null +++ b/app/components/app/encounter/entry-form.vue @@ -0,0 +1,356 @@ + + + diff --git a/app/components/app/encounter/filter.vue b/app/components/app/encounter/filter.vue new file mode 100644 index 00000000..31ec4476 --- /dev/null +++ b/app/components/app/encounter/filter.vue @@ -0,0 +1,114 @@ + + + diff --git a/app/components/app/encounter/list-cfg.ts b/app/components/app/encounter/list-cfg.ts new file mode 100644 index 00000000..0ca6a92c --- /dev/null +++ b/app/components/app/encounter/list-cfg.ts @@ -0,0 +1,131 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-pdud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +export const cols: Col[] = [ + {}, + {}, + {}, + { width: 100 }, + { width: 120 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + {}, + { width: 50 }, +] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'Rekam Medis' }, + { label: 'KTP' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'JK' }, + { label: 'Pendidikan' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'name', + 'medicalRecord_number', + 'identity_number', + 'birth_date', + 'patient_age', + 'gender', + 'education', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + birth_date: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.birth_date == 'object' && recX.birth_date) { + return (recX.birth_date as Date).toLocaleDateString() + } else if (typeof recX.birth_date == 'string') { + return (recX.birth_date as string).substring(0, 10) + } + return recX.birth_date + }, + patient_age: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.birth_date?.split('T')[0] + }, + gender: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { + return 'Tidak Diketahui' + } + return recX.gender_code + }, + education: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.education_code == 'number' && recX.education_code >= 0) { + return recX.education_code + } else if (typeof recX.education_code) { + return recX.education_code + } + return '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + if (rec.status === null) { + rec.status_code = 0 + } + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/encounter/list.vue b/app/components/app/encounter/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/encounter/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/encounter/picker.vue b/app/components/app/encounter/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/encounter/quick-info.vue b/app/components/app/encounter/quick-info.vue new file mode 100644 index 00000000..56f40e79 --- /dev/null +++ b/app/components/app/encounter/quick-info.vue @@ -0,0 +1,83 @@ + + + diff --git a/app/components/app/encounter/search.vue b/app/components/app/encounter/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/encounter/status-badge.vue b/app/components/app/encounter/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/encounter/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/encounter/status.vue b/app/components/app/encounter/status.vue new file mode 100644 index 00000000..e45c0a78 --- /dev/null +++ b/app/components/app/encounter/status.vue @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/app/components/app/equipment/entry-form.vue b/app/components/app/equipment/entry-form.vue new file mode 100644 index 00000000..5ff92ad2 --- /dev/null +++ b/app/components/app/equipment/entry-form.vue @@ -0,0 +1,126 @@ + + + diff --git a/app/components/app/equipment/list-cfg.ts b/app/components/app/equipment/list-cfg.ts new file mode 100644 index 00000000..8f3ff7e5 --- /dev/null +++ b/app/components/app/equipment/list-cfg.ts @@ -0,0 +1,43 @@ +import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, Th } from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{ width: 100 }, { width: 250 }, { width: 100 }, { width: 100 }, { width: 50 }] + +export const header: Th[][] = [ + [{ label: 'Kode' }, { label: 'Nama' }, { label: 'Stok' }, { label: 'Satuan' }, { label: '' }], +] + +export const keys = ['code', 'name', 'stock', 'uom_code', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: Record any> = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.name}`.trim() + }, + uom_code: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.uom_code + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: Record any> = {} diff --git a/app/components/app/equipment/list.vue b/app/components/app/equipment/list.vue new file mode 100644 index 00000000..3af2b398 --- /dev/null +++ b/app/components/app/equipment/list.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/components/app/floor/entry-form.vue b/app/components/app/floor/entry-form.vue new file mode 100644 index 00000000..19468df5 --- /dev/null +++ b/app/components/app/floor/entry-form.vue @@ -0,0 +1,125 @@ + + + diff --git a/app/components/app/floor/list-cfg.ts b/app/components/app/floor/list-cfg.ts new file mode 100644 index 00000000..33b1a8af --- /dev/null +++ b/app/components/app/floor/list-cfg.ts @@ -0,0 +1,44 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Gedung' }, { label: '' }]] + +export const keys = ['code', 'name', 'parent', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + parent: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.parent?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/floor/list.vue b/app/components/app/floor/list.vue new file mode 100644 index 00000000..e1b056ce --- /dev/null +++ b/app/components/app/floor/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/app/icd/entry-form.vue b/app/components/app/icd/entry-form.vue new file mode 100644 index 00000000..7c850a16 --- /dev/null +++ b/app/components/app/icd/entry-form.vue @@ -0,0 +1,43 @@ + + + diff --git a/app/components/app/icd/list-cfg.ts b/app/components/app/icd/list-cfg.ts new file mode 100644 index 00000000..c74ef59b --- /dev/null +++ b/app/components/app/icd/list-cfg.ts @@ -0,0 +1,131 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +export const cols: Col[] = [ + {}, + {}, + {}, + { width: 100 }, + { width: 120 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + {}, + { width: 50 }, +] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'Rekam Medis' }, + { label: 'KTP' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'JK' }, + { label: 'Pendidikan' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'name', + 'medicalRecord_number', + 'identity_number', + 'birth_date', + 'patient_age', + 'gender', + 'education', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + birth_date: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.birth_date == 'object' && recX.birth_date) { + return (recX.birth_date as Date).toLocaleDateString() + } else if (typeof recX.birth_date == 'string') { + return (recX.birth_date as string).substring(0, 10) + } + return recX.birth_date + }, + patient_age: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.birth_date?.split('T')[0] + }, + gender: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { + return 'Tidak Diketahui' + } + return recX.gender_code + }, + education: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.education_code == 'number' && recX.education_code >= 0) { + return recX.education_code + } else if (typeof recX.education_code) { + return recX.education_code + } + return '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + if (rec.status === null) { + rec.status_code = 0 + } + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/icd/list.vue b/app/components/app/icd/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/icd/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/icd/multiselect-picker.vue b/app/components/app/icd/multiselect-picker.vue new file mode 100644 index 00000000..9a08bb86 --- /dev/null +++ b/app/components/app/icd/multiselect-picker.vue @@ -0,0 +1,20 @@ + + + diff --git a/app/components/app/icd/preview.vue b/app/components/app/icd/preview.vue new file mode 100644 index 00000000..36bb193c --- /dev/null +++ b/app/components/app/icd/preview.vue @@ -0,0 +1,46 @@ + + + diff --git a/app/components/app/icd/search.vue b/app/components/app/icd/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/icd/status-badge.vue b/app/components/app/icd/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/icd/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/installation/entry-form.vue b/app/components/app/installation/entry-form.vue new file mode 100644 index 00000000..9d57b434 --- /dev/null +++ b/app/components/app/installation/entry-form.vue @@ -0,0 +1,119 @@ + + + diff --git a/app/components/app/installation/list-cfg.ts b/app/components/app/installation/list-cfg.ts new file mode 100644 index 00000000..e6fc5d47 --- /dev/null +++ b/app/components/app/installation/list-cfg.ts @@ -0,0 +1,51 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue')) + +export const cols: Col[] = [{}, {}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Encounter Class' }, { label: '' }]] + +export const keys = ['code', 'name', 'encounterClass_code', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.name}`.trim() + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + props: { + size: 'sm', + }, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} \ No newline at end of file diff --git a/app/components/app/installation/list.vue b/app/components/app/installation/list.vue new file mode 100644 index 00000000..e1b056ce --- /dev/null +++ b/app/components/app/installation/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/app/item-price/entry-form.vue b/app/components/app/item-price/entry-form.vue new file mode 100644 index 00000000..f2f55d76 --- /dev/null +++ b/app/components/app/item-price/entry-form.vue @@ -0,0 +1,50 @@ + + + diff --git a/app/components/app/item-price/list-cfg.ts b/app/components/app/item-price/list-cfg.ts new file mode 100644 index 00000000..c26856bf --- /dev/null +++ b/app/components/app/item-price/list-cfg.ts @@ -0,0 +1,46 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [{}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Aksi' }]] + +export const keys = ['code', 'name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = {} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/item-price/list.vue b/app/components/app/item-price/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/item-price/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/item-price/picker.vue b/app/components/app/item-price/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/item-price/search.vue b/app/components/app/item-price/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/item-price/status-badge.vue b/app/components/app/item-price/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/item-price/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/item/entry-form.vue b/app/components/app/item/entry-form.vue new file mode 100644 index 00000000..7ddc930b --- /dev/null +++ b/app/components/app/item/entry-form.vue @@ -0,0 +1,68 @@ + + + diff --git a/app/components/app/item/list-cfg.ts b/app/components/app/item/list-cfg.ts new file mode 100644 index 00000000..c26856bf --- /dev/null +++ b/app/components/app/item/list-cfg.ts @@ -0,0 +1,46 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [{}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Aksi' }]] + +export const keys = ['code', 'name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = {} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/item/list.vue b/app/components/app/item/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/item/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/item/picker.vue b/app/components/app/item/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/item/search.vue b/app/components/app/item/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/item/status-badge.vue b/app/components/app/item/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/item/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/laborant/entry-form.vue b/app/components/app/laborant/entry-form.vue new file mode 100644 index 00000000..c9d54963 --- /dev/null +++ b/app/components/app/laborant/entry-form.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/app/laborant/list-cfg.ts b/app/components/app/laborant/list-cfg.ts new file mode 100644 index 00000000..14c9cf0d --- /dev/null +++ b/app/components/app/laborant/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/laborant/list.vue b/app/components/app/laborant/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/laborant/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/laborant/picker.vue b/app/components/app/laborant/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/laborant/search.vue b/app/components/app/laborant/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/laborant/status-badge.vue b/app/components/app/laborant/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/laborant/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/medicine-group/entry-form.vue b/app/components/app/medicine-group/entry-form.vue new file mode 100644 index 00000000..38aaeb8f --- /dev/null +++ b/app/components/app/medicine-group/entry-form.vue @@ -0,0 +1,96 @@ + + + + diff --git a/app/components/app/medicine-group/list-cfg.ts b/app/components/app/medicine-group/list-cfg.ts new file mode 100644 index 00000000..b9f068e9 --- /dev/null +++ b/app/components/app/medicine-group/list-cfg.ts @@ -0,0 +1,37 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Aksi' }]] + +export const keys = ['code', 'name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = {} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/medicine-group/list.vue b/app/components/app/medicine-group/list.vue new file mode 100644 index 00000000..3af2b398 --- /dev/null +++ b/app/components/app/medicine-group/list.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/components/app/medicine-method/entry-form.vue b/app/components/app/medicine-method/entry-form.vue new file mode 100644 index 00000000..cccfe1c4 --- /dev/null +++ b/app/components/app/medicine-method/entry-form.vue @@ -0,0 +1,96 @@ + + + + diff --git a/app/components/app/medicine-method/list-cfg.ts b/app/components/app/medicine-method/list-cfg.ts new file mode 100644 index 00000000..b9f068e9 --- /dev/null +++ b/app/components/app/medicine-method/list-cfg.ts @@ -0,0 +1,37 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Aksi' }]] + +export const keys = ['code', 'name', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = {} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/medicine-method/list.vue b/app/components/app/medicine-method/list.vue new file mode 100644 index 00000000..3af2b398 --- /dev/null +++ b/app/components/app/medicine-method/list.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/components/app/medicine/entry-form.vue b/app/components/app/medicine/entry-form.vue new file mode 100644 index 00000000..66ef4afb --- /dev/null +++ b/app/components/app/medicine/entry-form.vue @@ -0,0 +1,196 @@ + + + diff --git a/app/components/app/medicine/list-cfg.ts b/app/components/app/medicine/list-cfg.ts new file mode 100644 index 00000000..77993d55 --- /dev/null +++ b/app/components/app/medicine/list-cfg.ts @@ -0,0 +1,59 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, {}, {}, {}, {}, { width: 50 }] + +export const header: Th[][] = [ + [ + { label: 'Kode' }, + { label: 'Name' }, + { label: 'Golongan' }, + { label: 'Metode Pemberian' }, + { label: "Satuan" }, + { label: 'Stok' }, + { label: 'Aksi' }, + ], +] + +export const keys = ['code', 'name', 'group', 'method', 'unit', 'stock', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + group: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineGroup?.name || '-' + }, + method: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineMethod?.name || '-' + }, + unit: (rec: unknown): unknown => { + return (rec as SmallDetailDto).uom?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action: (rec: unknown, idx: number): RecComponent => { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/medicine/list.vue b/app/components/app/medicine/list.vue new file mode 100644 index 00000000..3af2b398 --- /dev/null +++ b/app/components/app/medicine/list.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/components/app/medicine/picker.vue b/app/components/app/medicine/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine/search.vue b/app/components/app/medicine/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/medicine/status-badge.vue b/app/components/app/medicine/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/medicine/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/nurse/entry-form.vue b/app/components/app/nurse/entry-form.vue new file mode 100644 index 00000000..c9d54963 --- /dev/null +++ b/app/components/app/nurse/entry-form.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/app/nurse/list-cfg.ts b/app/components/app/nurse/list-cfg.ts new file mode 100644 index 00000000..14c9cf0d --- /dev/null +++ b/app/components/app/nurse/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/nurse/list.vue b/app/components/app/nurse/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/nurse/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/nurse/picker.vue b/app/components/app/nurse/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/nurse/search.vue b/app/components/app/nurse/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/nurse/status-badge.vue b/app/components/app/nurse/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/nurse/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/nutritionist/entry-form.vue b/app/components/app/nutritionist/entry-form.vue new file mode 100644 index 00000000..c9d54963 --- /dev/null +++ b/app/components/app/nutritionist/entry-form.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/app/nutritionist/list-cfg.ts b/app/components/app/nutritionist/list-cfg.ts new file mode 100644 index 00000000..14c9cf0d --- /dev/null +++ b/app/components/app/nutritionist/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/nutritionist/list.vue b/app/components/app/nutritionist/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/nutritionist/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/nutritionist/picker.vue b/app/components/app/nutritionist/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/nutritionist/search.vue b/app/components/app/nutritionist/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/nutritionist/status-badge.vue b/app/components/app/nutritionist/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/nutritionist/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/patient/_common/input-file.vue b/app/components/app/patient/_common/input-file.vue new file mode 100644 index 00000000..38ad6cea --- /dev/null +++ b/app/components/app/patient/_common/input-file.vue @@ -0,0 +1,58 @@ + + + diff --git a/app/components/app/patient/_common/input-patient-name.vue b/app/components/app/patient/_common/input-patient-name.vue new file mode 100644 index 00000000..fbc57351 --- /dev/null +++ b/app/components/app/patient/_common/input-patient-name.vue @@ -0,0 +1,102 @@ + + + diff --git a/app/components/app/patient/_common/radio-communication-barrier.vue b/app/components/app/patient/_common/radio-communication-barrier.vue new file mode 100644 index 00000000..463b3659 --- /dev/null +++ b/app/components/app/patient/_common/radio-communication-barrier.vue @@ -0,0 +1,94 @@ + + + diff --git a/app/components/app/patient/_common/radio-disability.vue b/app/components/app/patient/_common/radio-disability.vue new file mode 100644 index 00000000..312c3730 --- /dev/null +++ b/app/components/app/patient/_common/radio-disability.vue @@ -0,0 +1,94 @@ + + + diff --git a/app/components/app/patient/_common/radio-gender.vue b/app/components/app/patient/_common/radio-gender.vue new file mode 100644 index 00000000..108b1d22 --- /dev/null +++ b/app/components/app/patient/_common/radio-gender.vue @@ -0,0 +1,92 @@ + + + diff --git a/app/components/app/patient/_common/radio-nationality.vue b/app/components/app/patient/_common/radio-nationality.vue new file mode 100644 index 00000000..9c0eef1d --- /dev/null +++ b/app/components/app/patient/_common/radio-nationality.vue @@ -0,0 +1,94 @@ + + + diff --git a/app/components/app/patient/_common/select-disability.vue b/app/components/app/patient/_common/select-disability.vue new file mode 100644 index 00000000..de65a07f --- /dev/null +++ b/app/components/app/patient/_common/select-disability.vue @@ -0,0 +1,81 @@ + + + diff --git a/app/components/app/patient/_common/select-dob.vue b/app/components/app/patient/_common/select-dob.vue new file mode 100644 index 00000000..938bd254 --- /dev/null +++ b/app/components/app/patient/_common/select-dob.vue @@ -0,0 +1,142 @@ + + + diff --git a/app/components/app/patient/_common/select-education.vue b/app/components/app/patient/_common/select-education.vue new file mode 100644 index 00000000..33caac16 --- /dev/null +++ b/app/components/app/patient/_common/select-education.vue @@ -0,0 +1,88 @@ + + + diff --git a/app/components/app/patient/_common/select-ethnicity.vue b/app/components/app/patient/_common/select-ethnicity.vue new file mode 100644 index 00000000..a4231571 --- /dev/null +++ b/app/components/app/patient/_common/select-ethnicity.vue @@ -0,0 +1,86 @@ + + + diff --git a/app/components/app/patient/_common/select-job.vue b/app/components/app/patient/_common/select-job.vue new file mode 100644 index 00000000..b9804bb5 --- /dev/null +++ b/app/components/app/patient/_common/select-job.vue @@ -0,0 +1,155 @@ + + + diff --git a/app/components/app/patient/_common/select-lang.vue b/app/components/app/patient/_common/select-lang.vue new file mode 100644 index 00000000..aadf9313 --- /dev/null +++ b/app/components/app/patient/_common/select-lang.vue @@ -0,0 +1,82 @@ + + + diff --git a/app/components/app/patient/_common/select-marital-status.vue b/app/components/app/patient/_common/select-marital-status.vue new file mode 100644 index 00000000..cb3b56fb --- /dev/null +++ b/app/components/app/patient/_common/select-marital-status.vue @@ -0,0 +1,78 @@ + + + diff --git a/app/components/app/patient/_common/select-religion.vue b/app/components/app/patient/_common/select-religion.vue new file mode 100644 index 00000000..069e3575 --- /dev/null +++ b/app/components/app/patient/_common/select-religion.vue @@ -0,0 +1,86 @@ + + + diff --git a/app/components/app/patient/entry-form.vue b/app/components/app/patient/entry-form.vue new file mode 100644 index 00000000..e3587988 --- /dev/null +++ b/app/components/app/patient/entry-form.vue @@ -0,0 +1,225 @@ + + + diff --git a/app/components/app/patient/list-cfg.ts b/app/components/app/patient/list-cfg.ts new file mode 100644 index 00000000..4fbdf694 --- /dev/null +++ b/app/components/app/patient/list-cfg.ts @@ -0,0 +1,100 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import type { PatientEntity } from '~/models/patient' +import { defineAsyncComponent } from 'vue' +import { educationCodes, genderCodes } from '~/lib/constants' +import { calculateAge } from '~/lib/utils' + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, {}, {}, {}, {}, {}, { width: 5 }] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'NIK' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'Jenis Kelamin' }, + { label: 'Pendidikan' }, + { label: '' }, + ], +] + +export const keys = ['name', 'identity_number', 'birth_date', 'patient_age', 'gender', 'education', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const { person } = rec as PatientEntity + return person.name.trim() + }, + identity_number: (rec: unknown): unknown => { + const { person } = rec as PatientEntity + + if (person?.residentIdentityNumber?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return person.residentIdentityNumber + }, + birth_date: (rec: unknown): unknown => { + const { person } = rec as PatientEntity + + if (typeof person.birthDate == 'object' && person.birthDate) { + return (person.birthDate as Date).toLocaleDateString() + } else if (typeof person.birthDate == 'string') { + return (person.birthDate as string).substring(0, 10) + } + return person.birthDate + }, + patient_age: (rec: unknown): unknown => { + const { person } = rec as PatientEntity + return calculateAge(person.birthDate) + }, + gender: (rec: unknown): unknown => { + const { person } = rec as PatientEntity + + if (typeof person.gender_code == 'number' && person.gender_code >= 0) { + return person.gender_code + } else if (typeof person.gender_code === 'string' && person.gender_code) { + return genderCodes[person.gender_code] || '-' + } + return '-' + }, + education: (rec: unknown): unknown => { + const { person } = rec as PatientEntity + if (typeof person.education_code == 'number' && person.education_code >= 0) { + return person.education_code + } else if (typeof person.education_code === 'string' && person.education_code) { + return educationCodes[person.education_code] || '-' + } + return '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/patient/list.vue b/app/components/app/patient/list.vue new file mode 100644 index 00000000..53558b2b --- /dev/null +++ b/app/components/app/patient/list.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/patient/picker.vue b/app/components/app/patient/picker.vue new file mode 100644 index 00000000..5789ef6b --- /dev/null +++ b/app/components/app/patient/picker.vue @@ -0,0 +1,20 @@ + + + diff --git a/app/components/app/patient/preview.vue b/app/components/app/patient/preview.vue new file mode 100644 index 00000000..ec3d8b6d --- /dev/null +++ b/app/components/app/patient/preview.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/app/components/app/patient/search.vue b/app/components/app/patient/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/patient/status-badge.vue b/app/components/app/patient/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/patient/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/person-address/_common/radio-residence.vue b/app/components/app/person-address/_common/radio-residence.vue new file mode 100644 index 00000000..f6e429a8 --- /dev/null +++ b/app/components/app/person-address/_common/radio-residence.vue @@ -0,0 +1,95 @@ + + + diff --git a/app/components/app/person-address/_common/select-district.vue b/app/components/app/person-address/_common/select-district.vue new file mode 100644 index 00000000..97b50e4e --- /dev/null +++ b/app/components/app/person-address/_common/select-district.vue @@ -0,0 +1,63 @@ + + + diff --git a/app/components/app/person-address/_common/select-postal.vue b/app/components/app/person-address/_common/select-postal.vue new file mode 100644 index 00000000..84df7b33 --- /dev/null +++ b/app/components/app/person-address/_common/select-postal.vue @@ -0,0 +1,76 @@ + + + diff --git a/app/components/app/person-address/_common/select-province.vue b/app/components/app/person-address/_common/select-province.vue new file mode 100644 index 00000000..bf984154 --- /dev/null +++ b/app/components/app/person-address/_common/select-province.vue @@ -0,0 +1,69 @@ + + + diff --git a/app/components/app/person-address/_common/select-regency.vue b/app/components/app/person-address/_common/select-regency.vue new file mode 100644 index 00000000..bb2202d3 --- /dev/null +++ b/app/components/app/person-address/_common/select-regency.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/components/app/person-address/_common/select-village.vue b/app/components/app/person-address/_common/select-village.vue new file mode 100644 index 00000000..561fa9b6 --- /dev/null +++ b/app/components/app/person-address/_common/select-village.vue @@ -0,0 +1,64 @@ + + + diff --git a/app/components/app/person-address/entry-form-relative.vue b/app/components/app/person-address/entry-form-relative.vue new file mode 100644 index 00000000..1c8c91a7 --- /dev/null +++ b/app/components/app/person-address/entry-form-relative.vue @@ -0,0 +1,369 @@ + + + diff --git a/app/components/app/person-address/entry-form.vue b/app/components/app/person-address/entry-form.vue new file mode 100644 index 00000000..a26381d8 --- /dev/null +++ b/app/components/app/person-address/entry-form.vue @@ -0,0 +1,268 @@ + + + diff --git a/app/components/app/person-contact/_common/select-contact-type.vue b/app/components/app/person-contact/_common/select-contact-type.vue new file mode 100644 index 00000000..d6f8fe24 --- /dev/null +++ b/app/components/app/person-contact/_common/select-contact-type.vue @@ -0,0 +1,71 @@ + + + diff --git a/app/components/app/person-contact/entry-form.vue b/app/components/app/person-contact/entry-form.vue new file mode 100644 index 00000000..5fa451b4 --- /dev/null +++ b/app/components/app/person-contact/entry-form.vue @@ -0,0 +1,110 @@ + + + diff --git a/app/components/app/person-relative/_common/select-relations.vue b/app/components/app/person-relative/_common/select-relations.vue new file mode 100644 index 00000000..179976bf --- /dev/null +++ b/app/components/app/person-relative/_common/select-relations.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/components/app/person-relative/_common/table-head.vue b/app/components/app/person-relative/_common/table-head.vue new file mode 100644 index 00000000..1994147e --- /dev/null +++ b/app/components/app/person-relative/_common/table-head.vue @@ -0,0 +1,22 @@ + + + diff --git a/app/components/app/person-relative/entry-form.vue b/app/components/app/person-relative/entry-form.vue new file mode 100644 index 00000000..411fab37 --- /dev/null +++ b/app/components/app/person-relative/entry-form.vue @@ -0,0 +1,155 @@ + + + diff --git a/app/components/app/person/_common/radio-parents-input.vue b/app/components/app/person/_common/radio-parents-input.vue new file mode 100644 index 00000000..bd8b6f15 --- /dev/null +++ b/app/components/app/person/_common/radio-parents-input.vue @@ -0,0 +1,94 @@ + + + diff --git a/app/components/app/person/entry-form.vue b/app/components/app/person/entry-form.vue new file mode 100644 index 00000000..a9a9c6cf --- /dev/null +++ b/app/components/app/person/entry-form.vue @@ -0,0 +1,476 @@ + + + diff --git a/app/components/app/person/family-parents-form.vue b/app/components/app/person/family-parents-form.vue new file mode 100644 index 00000000..e5ac4a46 --- /dev/null +++ b/app/components/app/person/family-parents-form.vue @@ -0,0 +1,167 @@ + + + diff --git a/app/components/app/pharmacist/entry-form.vue b/app/components/app/pharmacist/entry-form.vue new file mode 100644 index 00000000..4d7fde87 --- /dev/null +++ b/app/components/app/pharmacist/entry-form.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/app/pharmacist/list-cfg.ts b/app/components/app/pharmacist/list-cfg.ts new file mode 100644 index 00000000..14c9cf0d --- /dev/null +++ b/app/components/app/pharmacist/list-cfg.ts @@ -0,0 +1,114 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) +const statusBadge = defineAsyncComponent(() => import('./status-badge.vue')) + +const _doctorStatus = { + 0: 'Tidak Aktif', + 1: 'Aktif', +} + +export const cols: Col[] = [ + { width: 100 }, + { width: 250 }, + {}, + { width: 100 }, + { width: 100 }, + {}, + {}, + {}, + { width: 120 }, + { width: 100 }, + {}, + {}, +] + +export const header: Th[][] = [ + [ + { label: 'Kode JKN' }, + { label: 'Nama' }, + { label: 'No KTP' }, + { label: 'No SIP' }, + { label: 'No IHS' }, + { label: 'Telpon' }, + { label: 'Fee Ranap' }, + { label: 'Fee Rajal' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'bpjs_code', + 'name', + 'identity_number', + 'sip_no', + 'ihs_number', + 'phone', + 'inPatient_itemPrice', + 'outPatient_itemPrice', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim() + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + inPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.inPatient_itemPrice.price).toLocaleString('id-ID') + }, + outPatient_itemPrice: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID') + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/pharmacist/list.vue b/app/components/app/pharmacist/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/pharmacist/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/pharmacist/picker.vue b/app/components/app/pharmacist/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/pharmacist/search.vue b/app/components/app/pharmacist/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/pharmacist/status-badge.vue b/app/components/app/pharmacist/status-badge.vue new file mode 100644 index 00000000..32cdfbca --- /dev/null +++ b/app/components/app/pharmacist/status-badge.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/prescription-item/list-entry.ts b/app/components/app/prescription-item/list-entry.ts new file mode 100644 index 00000000..c257b46a --- /dev/null +++ b/app/components/app/prescription-item/list-entry.ts @@ -0,0 +1,66 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, {}, {}, {}, {}, { width: 50 }] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'Bentuk' }, + { label: 'Freq' }, + { label: 'Dosis' }, + { label: 'Interval' }, + { label: 'Total' }, + { label: '' }, + ], +] + +export const keys = ['name', 'uom_code', 'frequency', 'multiplier', 'interval', 'total', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + cateogry: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineCategory?.name || '-' + }, + group: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineGroup?.name || '-' + }, + method: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineMethod?.name || '-' + }, + unit: (rec: unknown): unknown => { + return (rec as SmallDetailDto).medicineUnit?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action: (rec: unknown, idx: number): RecComponent => { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + // (_rec) { + // return '-' + // }, +} diff --git a/app/components/app/prescription-item/list-entry.vue b/app/components/app/prescription-item/list-entry.vue new file mode 100644 index 00000000..e5feecba --- /dev/null +++ b/app/components/app/prescription-item/list-entry.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/prescription/entry.vue b/app/components/app/prescription/entry.vue new file mode 100644 index 00000000..3b4acf28 --- /dev/null +++ b/app/components/app/prescription/entry.vue @@ -0,0 +1,32 @@ + diff --git a/app/components/app/prescription/list.vue b/app/components/app/prescription/list.vue new file mode 100644 index 00000000..6fe27d39 --- /dev/null +++ b/app/components/app/prescription/list.vue @@ -0,0 +1,42 @@ + diff --git a/app/components/app/rehab/registration/sep-prosedur/entry-form.vue b/app/components/app/rehab/registration/sep-prosedur/entry-form.vue new file mode 100644 index 00000000..5768c6a0 --- /dev/null +++ b/app/components/app/rehab/registration/sep-prosedur/entry-form.vue @@ -0,0 +1,47 @@ + + + diff --git a/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts b/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts new file mode 100644 index 00000000..754d2dfb --- /dev/null +++ b/app/components/app/rehab/registration/sep-prosedur/list-cfg.ts @@ -0,0 +1,112 @@ +import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [ + {}, + {}, + {}, + { width: 100 }, + { width: 120 }, + {}, + {}, + {}, + { width: 100 }, + { width: 100 }, + {}, + { width: 50 }, +] + +export const header: Th[][] = [ + [ + { label: 'Nama' }, + { label: 'Rekam Medis' }, + { label: 'KTP' }, + { label: 'Tgl Lahir' }, + { label: 'Umur' }, + { label: 'JK' }, + { label: 'Pendidikan' }, + { label: 'Status' }, + { label: '' }, + ], +] + +export const keys = [ + 'name', + 'medicalRecord_number', + 'identity_number', + 'birth_date', + 'patient_age', + 'gender', + 'education', + 'status', + 'action', +] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, + identity_number: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (recX.identity_number?.substring(0, 5) === 'BLANK') { + return '(TANPA NIK)' + } + return recX.identity_number + }, + birth_date: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.birth_date == 'object' && recX.birth_date) { + return (recX.birth_date as Date).toLocaleDateString() + } else if (typeof recX.birth_date == 'string') { + return (recX.birth_date as string).substring(0, 10) + } + return recX.birth_date + }, + patient_age: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.birth_date?.split('T')[0] + }, + gender: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') { + return 'Tidak Diketahui' + } + return recX.gender_code + }, + education: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + if (typeof recX.education_code == 'number' && recX.education_code >= 0) { + return recX.education_code + } else if (typeof recX.education_code) { + return recX.education_code + } + return '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/rehab/registration/sep-prosedur/list.vue b/app/components/app/rehab/registration/sep-prosedur/list.vue new file mode 100644 index 00000000..b9a74929 --- /dev/null +++ b/app/components/app/rehab/registration/sep-prosedur/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/rehab/registration/sep-prosedur/picker.vue b/app/components/app/rehab/registration/sep-prosedur/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/rehab/registration/sep-prosedur/search.vue b/app/components/app/rehab/registration/sep-prosedur/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/room/entry-form.vue b/app/components/app/room/entry-form.vue new file mode 100644 index 00000000..6f4e7708 --- /dev/null +++ b/app/components/app/room/entry-form.vue @@ -0,0 +1,195 @@ + + + diff --git a/app/components/app/room/list-cfg.ts b/app/components/app/room/list-cfg.ts new file mode 100644 index 00000000..98e7eb50 --- /dev/null +++ b/app/components/app/room/list-cfg.ts @@ -0,0 +1,61 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/my-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{}, {}, {}, {}, {}, { width: 50 }] + +export const header: Th[][] = [ + [ + { label: 'Kode' }, + { label: 'Nama' }, + { label: 'Spesialis' }, + { label: 'Sub Spesialis' }, + { label: 'Unit' }, + { label: '' }, + ], +] + +export const keys = ['code', 'name', 'specialist', 'subspecialist', 'unit', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + specialist: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.specialist?.name || '-' + }, + subspecialist: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.subspecialist?.name || '-' + }, + unit: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.unit?.name || '-' + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = {} diff --git a/app/components/app/room/list.vue b/app/components/app/room/list.vue new file mode 100644 index 00000000..e1b056ce --- /dev/null +++ b/app/components/app/room/list.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/app/satusehat/badge-patient.vue b/app/components/app/satusehat/badge-patient.vue new file mode 100644 index 00000000..41202aaf --- /dev/null +++ b/app/components/app/satusehat/badge-patient.vue @@ -0,0 +1,13 @@ + + + diff --git a/app/components/app/satusehat/badge-status.vue b/app/components/app/satusehat/badge-status.vue new file mode 100644 index 00000000..5ff492f0 --- /dev/null +++ b/app/components/app/satusehat/badge-status.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/components/app/satusehat/badge.vue b/app/components/app/satusehat/badge.vue new file mode 100644 index 00000000..197cb084 --- /dev/null +++ b/app/components/app/satusehat/badge.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/components/app/satusehat/button-action.vue b/app/components/app/satusehat/button-action.vue new file mode 100644 index 00000000..f8ee85ec --- /dev/null +++ b/app/components/app/satusehat/button-action.vue @@ -0,0 +1,16 @@ + + + diff --git a/app/components/app/satusehat/card-summary.vue b/app/components/app/satusehat/card-summary.vue new file mode 100644 index 00000000..531e24d2 --- /dev/null +++ b/app/components/app/satusehat/card-summary.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/satusehat/entry-form.vue b/app/components/app/satusehat/entry-form.vue new file mode 100644 index 00000000..5768c6a0 --- /dev/null +++ b/app/components/app/satusehat/entry-form.vue @@ -0,0 +1,47 @@ + + + diff --git a/app/components/app/satusehat/list-cfg.ts b/app/components/app/satusehat/list-cfg.ts new file mode 100644 index 00000000..d287a38b --- /dev/null +++ b/app/components/app/satusehat/list-cfg.ts @@ -0,0 +1,78 @@ +import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '../../pub/nav/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +export const rowType = { + 1: 'Patient', + 2: 'Encounter', + 3: 'Observation', +} + +export const rowStatus = { + 0: 'Gagal', + 1: 'Pending', + 2: 'Terkirim', +} + +const patientBadge = defineAsyncComponent(() => import('./badge-patient.vue')) +const statusBadge = defineAsyncComponent(() => import('./badge-status.vue')) + +export const cols: Col[] = [ + { width: 100 }, + { width: 100 }, + { width: 100 }, + { width: 100 }, + { width: 100 }, + { width: 100 }, +] + +export const header: Th[][] = [ + [ + { label: 'ID' }, + { label: 'Jenis' }, + { label: 'Pasien' }, + { label: 'Status' }, + { label: 'Terakhir Update' }, + { label: 'FHIR ID' }, + ], +] + +export const keys = ['id', 'resource_type', 'patient', 'status', 'updated_at', 'fhir_id'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: RecStrFuncUnknown = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}` + }, +} + +export const funcComponent: RecStrFuncComponent = { + patient(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: patientBadge, + } + return res + }, + status(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: statusBadge, + } + return res + }, +} + +export const funcHtml: RecStrFuncUnknown = { + patient_address(_rec) { + return '-' + }, +} diff --git a/app/components/app/satusehat/list.vue b/app/components/app/satusehat/list.vue new file mode 100644 index 00000000..3e3fe4cb --- /dev/null +++ b/app/components/app/satusehat/list.vue @@ -0,0 +1,14 @@ + + + diff --git a/app/components/app/satusehat/picker.vue b/app/components/app/satusehat/picker.vue new file mode 100644 index 00000000..29f282d7 --- /dev/null +++ b/app/components/app/satusehat/picker.vue @@ -0,0 +1,51 @@ + + + diff --git a/app/components/app/satusehat/search.vue b/app/components/app/satusehat/search.vue new file mode 100644 index 00000000..9e2d2405 --- /dev/null +++ b/app/components/app/satusehat/search.vue @@ -0,0 +1,12 @@ + + + diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue new file mode 100644 index 00000000..9aea7c31 --- /dev/null +++ b/app/components/app/sep/entry-form.vue @@ -0,0 +1,282 @@ + + +