first commit

This commit is contained in:
2025-11-26 07:49:54 +00:00
commit d8685ccf10
468 changed files with 41346 additions and 0 deletions
@@ -0,0 +1,145 @@
<template>
<v-container fluid>
<v-row>
<v-col cols="12">
<!-- Breadcrumb -->
<v-breadcrumbs :items="breadcrumbs" divider=">" class="pa-0 mb-4">
<template v-slot:item="{ item }">
<v-breadcrumbs-item :to="item.to" :disabled="item.disabled">
{{ item.title }}
</v-breadcrumbs-item>
</template>
</v-breadcrumbs>
<!-- Page Title -->
<h1 class="text-h5 mb-6">Buat Registrasi</h1>
<!-- Registration Form -->
<v-form ref="form" v-model="valid" lazy-validation>
<!-- Registration Type Section -->
<RegistrationType
v-model:registrationData="formData.registrationType"
@update="updateSection('registrationType')"
/>
<!-- Patient Data Section -->
<PatientData
v-model:patientData="formData.patient"
@update="updateSection('patient')"
class="mt-6"
/>
<!-- Appointment Schedule Section -->
<AppointmentSchedule
v-model:scheduleData="formData.schedule"
@update="updateSection('schedule')"
class="mt-6"
/>
<!-- Risk Assessment Section -->
<RiskAssessment
v-model:riskData="formData.riskAssessment"
@update="updateSection('riskAssessment')"
class="mt-6"
/>
<!-- Action Buttons -->
<v-row class="mt-8">
<v-col cols="12" class="d-flex justify-end gap-3">
<v-btn variant="outlined" color="primary" @click="resetForm">
Reset
</v-btn>
<v-btn color="primary" :loading="loading" @click="submitForm">
Simpan Registrasi
</v-btn>
</v-col>
</v-row>
</v-form>
</v-col>
</v-row>
</v-container>
</template>
<script setup>
import { ref, reactive } from "vue";
import { useRouter } from "vue-router";
import RegistrationType from "~/components/apps/registration/form/RegistrationType.vue";
import PatientData from "~/components/apps/registration/form/PatientData.vue";
import AppointmentSchedule from "~/components/apps/registration/form/AppointmentSchedule.vue";
import RiskAssessment from "~/components/apps/registration/form/RiskAssessment.vue";
const router = useRouter();
const form = ref();
const valid = ref(true);
const loading = ref(false);
const breadcrumbs = [
{ title: "Rawat Jalan", to: "/appointment", disabled: false },
{ title: "Registrasi", to: "/appointment/registration", disabled: false },
{ title: "Buat Registrasi", to: "", disabled: true }
];
const formData = reactive({
registrationType: {
visitType: "",
treatmentType: "Rawat Jalan",
triage: ""
},
patient: {
name: "",
medicalRecordNumber: "",
category: "",
birthDate: "",
gender: "",
address: "",
phoneCode: "+62",
phoneNumber: "",
email: "",
identityType: "",
identityNumber: ""
},
schedule: {
paymentMethod: "Pribadi",
referralNumber: "",
polyclinicName: "",
doctorName: "",
consultationDate: "",
consultationTime: "",
slotAvailable: true
},
riskAssessment: {
walkingAbility: null,
supportWhileSitting: null,
score: 0
}
});
const updateSection = (section) => {
console.log(`Section ${section} updated:`, formData[section]);
};
const submitForm = async () => {
const { valid } = await form.value.validate();
if (valid) {
loading.value = true;
try {
// API call simulation
await new Promise((resolve) => setTimeout(resolve, 2000));
console.log("Form submitted:", formData);
// Navigate to success page or show notification
router.push("/appointment/registration");
} catch (error) {
console.error("Error submitting form:", error);
} finally {
loading.value = false;
}
}
};
const resetForm = () => {
form.value.reset();
};
</script>
+25
View File
@@ -0,0 +1,25 @@
<script setup lang="ts">
/*Call Components*/
import RevenueCard from '@/components/dashboard/RevenueCard.vue';
import NewCustomer from '@/components/dashboard/NewCustomer.vue';
import Totalincome from '@/components/dashboard/TotalIncome.vue';
import RevenueProduct from '@/components/dashboard/RevenueProducts.vue';
import DailyActivities from '@/components/dashboard/DailyActivities.vue';
import BlogCards from '@/components/dashboard/BlogCards.vue';
// definePageMeta({
// middleware: 'role',
// });
</script>
<template>
<v-row>
<v-col cols="12" lg="8"><RevenueCard /></v-col>
<v-col cols="12" lg="4"
><NewCustomer class="mb-6" />
<Totalincome />
</v-col>
<v-col cols="12" lg="8"><RevenueProduct/></v-col>
<v-col cols="12" lg="4"><DailyActivities/> </v-col>
<v-col cols="12"><BlogCards/></v-col>
</v-row>
</template>
+183
View File
@@ -0,0 +1,183 @@
<template>
<v-container fluid>
<v-row>
<v-col cols="12">
<!-- Breadcrumb -->
<v-breadcrumbs :items="breadcrumbs" class="pa-0 mb-4">
<template v-slot:prepend>
<v-icon icon="mdi-home" size="small"></v-icon>
</template>
</v-breadcrumbs>
<!-- Form Container -->
<v-card elevation="2">
<v-form ref="form" v-model="valid" @submit.prevent="submitForm">
<!-- Header Section -->
<v-card-title class="bg-grey-lighten-3 py-3">
<span class="text-subtitle-1 font-weight-medium"
>DATA PASIEN</span
>
</v-card-title>
<!-- Data Diri Section -->
<DataDiriSection
v-model:formData="formData.dataDiri"
v-model:isBayiBaru="formData.isBayiBaru"
/>
<!-- Alamat Section -->
<AlamatSection
v-model:alamatIdentitas="formData.alamatIdentitas"
v-model:alamatDomisili="formData.alamatDomisili"
v-model:samaDenganIdentitas="formData.samaDenganIdentitas"
/>
<!-- Kesehatan Section -->
<KesehatanSection v-model:formData="formData.kesehatan" />
<!-- Pembayaran Section -->
<PembayaranSection v-model:formData="formData.pembayaran" />
<!-- Sosial Section -->
<SosialSection v-model:formData="formData.sosial" />
<!-- Penanggung Jawab Section -->
<PenanggungJawabSection
v-model:formData="formData.penanggungJawab"
v-model:samaDenganPasien="formData.samaDenganPasien"
:alamatPasien="formData.alamatDomisili"
/>
<!-- Action Buttons -->
<v-card-actions class="pa-4 bg-grey-lighten-4">
<v-spacer></v-spacer>
<v-btn variant="outlined" color="grey" @click="resetForm">
Reset
</v-btn>
<v-btn
type="submit"
variant="flat"
color="primary"
:loading="loading"
:disabled="!valid"
>
Simpan Pasien
</v-btn>
</v-card-actions>
</v-form>
</v-card>
</v-col>
</v-row>
</v-container>
</template>
<script setup>
import { ref, reactive } from "vue";
import { useRouter } from "vue-router";
import DataDiriSection from "~/components/apps/patient/form/DataDiriSection.vue";
import AlamatSection from "~/components/apps/patient/form/AlamatSection.vue";
import KesehatanSection from "~/components/apps/patient/form/KesehatanSection.vue";
import PembayaranSection from "~/components/apps/patient/form/PembayaranSection.vue";
import SosialSection from "~/components/apps/patient/form/SosialSection.vue";
import PenanggungJawabSection from "~/components/apps/patient/form/PenanggungJawabSection.vue";
const router = useRouter();
const form = ref();
const valid = ref(false);
const loading = ref(false);
const breadcrumbs = [
{
title: "Pasien",
disabled: false,
href: "/patient"
},
{
title: "Buat Pasien",
disabled: true,
href: "/patient/create"
}
];
const formData = reactive({
isBayiBaru: false,
samaDenganIdentitas: false,
samaDenganPasien: false,
dataDiri: {
photo: null,
namaLengkap: "",
nomorTeleponSelular: "",
nomorTeleponRumah: "",
email: "",
jenisKelamin: "",
tempatLahir: "",
tanggalLahir: "",
jenisIdentitas: "",
nomorIdentitas: "",
namaIbuKandung: "",
nomorRekamMedis: ""
},
alamatIdentitas: {
desa: "",
alamatLengkap: "",
rt: "",
rw: "",
kodePos: ""
},
alamatDomisili: {
desa: "",
alamatLengkap: "",
rt: "",
rw: "",
kodePos: ""
},
kesehatan: {
golonganDarah: "",
statusPerokok: "",
jenisPenyakit: ""
},
pembayaran: {
jenisPembayaran: ""
},
sosial: {
agama: "",
statusPernikahan: "",
pendidikanTerakhir: "",
pekerjaan: "",
bahasaDikuasai: "",
sukuEtnis: ""
},
penanggungJawab: {
namaLengkap: "",
jenisKelamin: "",
hubunganDenganPasien: "",
nomorTelepon: "",
pekerjaan: "",
alamat: ""
}
});
const submitForm = async () => {
const validation = await form.value.validate();
if (!validation.valid) return;
loading.value = true;
try {
// Simulasi API call
await new Promise((resolve) => setTimeout(resolve, 2000));
console.log("Submitting form data:", formData);
// Redirect ke halaman list pasien
router.push("/patient");
} catch (error) {
console.error("Error saving patient:", error);
} finally {
loading.value = false;
}
};
const resetForm = () => {
form.value.reset();
};
</script>