From a4dc7d72ecbef6fe367eade6ec00e69abb7da3c6 Mon Sep 17 00:00:00 2001 From: Munawwirul Jamal Date: Thu, 28 Aug 2025 08:11:20 +0700 Subject: [PATCH 01/12] chore: modified gitignore and readme --- .gitignore | 149 +++++++---------------------------------------------- README.md | 6 ++- 2 files changed, 24 insertions(+), 131 deletions(-) diff --git a/.gitignore b/.gitignore index 9a5acedf..436290c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,139 +1,28 @@ +# Nuxt dev/build outputs +.output +.data +.nuxt +.nitro +.cache +dist + +# Node dependencies +node_modules + # Logs logs *.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +# Misc +.DS_Store +.fleet +.idea -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files +# Local env files .env .env.* !.env.example -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Sveltekit cache directory -.svelte-kit/ - -# vitepress build output -**/.vitepress/dist - -# vitepress cache directory -**/.vitepress/cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# Firebase cache directory -.firebase/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v3 -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions - -# Vite logs files -vite.config.js.timestamp-* -vite.config.ts.timestamp-* +# editor +.vscode +*.swp \ No newline at end of file diff --git a/README.md b/README.md index 61992650..5e582ddb 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -# simrs-fe \ No newline at end of file +# SIMRS - FE + +RSSA - Front End + +If you see this, the development is still not merged yet. Please check nother branches. From cb0d73acf47d449219aa75c50776e869ca37b1f5 Mon Sep 17 00:00:00 2001 From: Abizrh Date: Mon, 20 Oct 2025 17:33:05 +0700 Subject: [PATCH 02/12] =?UTF-8?q?=E2=9C=A8=20feat=20(soapi):=20integrate?= =?UTF-8?q?=20early,rehab,function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/app/employee/entry-form.vue | 18 +- app/components/app/soapi/early-entry.vue | 201 ++++++++++--- .../app/soapi/early-rehab-entry.vue | 256 ++++++++++++++--- app/components/app/soapi/entry.vue | 33 ++- app/components/app/soapi/function-entry.vue | 270 ++++++++++++++---- app/components/content/encounter/list.vue | 14 +- app/components/content/encounter/process.vue | 5 +- app/components/content/soapi/entry.vue | 2 +- .../content/soapi/form-function.vue | 68 ++++- app/components/content/soapi/form-rehab.vue | 73 ++++- app/components/content/soapi/form.vue | 55 +++- app/handlers/soapi-early.handler.ts | 24 ++ app/models/soapi.ts | 174 ++++++++++- app/schemas/soapi.schema.ts | 190 ++++++++++++ app/services/soapi-early.service.ts | 28 ++ 15 files changed, 1252 insertions(+), 159 deletions(-) create mode 100644 app/handlers/soapi-early.handler.ts create mode 100644 app/schemas/soapi.schema.ts create mode 100644 app/services/soapi-early.service.ts diff --git a/app/components/app/employee/entry-form.vue b/app/components/app/employee/entry-form.vue index 8ccf0916..006f8eff 100644 --- a/app/components/app/employee/entry-form.vue +++ b/app/components/app/employee/entry-form.vue @@ -27,19 +27,31 @@ const data = computed({ - - - diff --git a/app/components/app/soapi/early-entry.vue b/app/components/app/soapi/early-entry.vue index c5697a7a..146a25d4 100644 --- a/app/components/app/soapi/early-entry.vue +++ b/app/components/app/soapi/early-entry.vue @@ -4,29 +4,72 @@ import Cell from '~/components/pub/my-ui/doc-entry/cell.vue' import Field from '~/components/pub/my-ui/doc-entry/field.vue' import Label from '~/components/pub/my-ui/doc-entry/label.vue' +// Helpers +import type z from 'zod' +import { toTypedSchema } from '@vee-validate/zod' +import { useForm } from 'vee-validate' +import { genBase } from '~/models/_base' + const props = defineProps<{ + modelValue: any + schema: z.ZodSchema excludeFields?: string[] + isReadonly?: boolean }>() -const emits = defineEmits(['click']) +const emit = defineEmits<{ + (e: 'update:modelValue', val: any): void + (e: 'submit', val: any): void +}>() -const subject = ref({ - 'prim-compl': '', - 'sec-compl': '', - 'cur-disea-hist': '', - 'pas-disea-hist': '', - 'fam-disea-hist': '', - 'alg-hist': '', - 'alg-react': '', - 'med-hist': '', - 'blood-type': '', +// Setup form +const { + validate: _validate, + defineField, + handleSubmit, + errors, + values, +} = useForm({ + validationSchema: toTypedSchema(props.schema), + initialValues: props.modelValue, }) +watch(values, (val) => emit('update:modelValue', val), { deep: true }) + +const [primaryComplaint, primaryComplaintAttrs] = defineField('prim-compl') +const [curDiseaseHistory, curDiseaseHistoryAttrs] = defineField('cur-disea-hist') +const [systolic, systolicAttrs] = defineField('syst-bp') +const [diastolic, diastolicAttrs] = defineField('diast-bp') +const [pulse, pulseAttrs] = defineField('pulse') +const [respiratoryRate, respiratoryRateAttrs] = defineField('resp-rate') +const [temperature, temperatureAttrs] = defineField('temp') +const [weight, weightAttrs] = defineField('weight') +const [height, heightAttrs] = defineField('height') +const [bloodGroup, bloodGroupAttrs] = defineField('reflect-fisio') +const [physicalExamination, physicalExaminationAttrs] = defineField('reflect-pato') +const [diagnosisMedical, diagnosisMedicalAttrs] = defineField('autonom-neuron') +const [medicalPlan, medicalPlanAttrs] = defineField('medical-act') +const [therapy, therapyAttrs] = defineField('therapy') + +const validate = async () => { + const result = await _validate() + console.log('Component validate() result:', result) + + return { + valid: true, + data: result.values, + errors: result.errors, + } +} + +defineExpose({ validate }) + const isExcluded = (key: string) => props.excludeFields?.includes(key)