feat: implement queue management store and administrative interface for patient flow control
This commit is contained in:
No files matched your search
+14
-21
@@ -606,7 +606,8 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
|
||||
// String versions for robustness
|
||||
"1": 'menunggu', "2": 'menunggu', "3": 'anjungan', "4": 'anjungan', "5": 'di-loket',
|
||||
"6": 'di-loket', "14": 'pemeriksaan', "15": 'pemeriksaan', "28": 'pending', "29": 'terlambat'
|
||||
"6": 'di-loket', "14": 'pemeriksaan', "15": 'pemeriksaan', "28": 'pending', "29": 'terlambat',
|
||||
"30": 'pending', "31": 'terlambat', "32": 'pending', "33": 'terlambat'
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2046,17 +2047,14 @@ const fetchPatientsForLoket = async (loketId, force = false) => {
|
||||
message = `Menandai pasien ${patientCode} sebagai terlambat...`;
|
||||
|
||||
const payload = {
|
||||
barcode: patient.barcode || "",
|
||||
statuspasien: "29",
|
||||
statuspasien2: "29",
|
||||
idklinikstatus: "2",
|
||||
idklinikstatus2: "2"
|
||||
visit_code: patient.barcode || patient.visitCode || patient.ticket || "",
|
||||
visit_status_id: [29]
|
||||
};
|
||||
|
||||
// POST to external API and WAIT for response
|
||||
try {
|
||||
const apiBase = config.public.verificationApiBaseUrl || 'http://10.10.123.140:8089/api/v1';
|
||||
const response = await fetch(`${apiBase}/tiket/update`, {
|
||||
const apiBase = config.public.externalApiBaseUrl || 'http://10.10.123.135:8084/api/v1';
|
||||
const response = await fetch(`${apiBase}/visit/status`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload)
|
||||
@@ -2109,17 +2107,14 @@ const fetchPatientsForLoket = async (loketId, force = false) => {
|
||||
message = `Menandai pasien ${patientCode} sebagai pending...`;
|
||||
|
||||
const payload = {
|
||||
barcode: patient.barcode || "",
|
||||
statuspasien: "28",
|
||||
statuspasien2: "28",
|
||||
idklinikstatus: "2",
|
||||
idklinikstatus2: "2"
|
||||
visit_code: patient.barcode || patient.visitCode || patient.ticket || "",
|
||||
visit_status_id: [28]
|
||||
};
|
||||
|
||||
// POST to external API and WAIT for response
|
||||
try {
|
||||
const apiBase = config.public.verificationApiBaseUrl || 'http://10.10.123.140:8089/api/v1';
|
||||
const response = await fetch(`${apiBase}/tiket/update`, {
|
||||
const apiBase = config.public.externalApiBaseUrl || 'http://10.10.123.135:8084/api/v1';
|
||||
const response = await fetch(`${apiBase}/visit/status`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload)
|
||||
@@ -2839,10 +2834,9 @@ const fetchPatientsForLoket = async (loketId, force = false) => {
|
||||
// Send API call to update status to 33 (TR PEMERIKSAAN)
|
||||
try {
|
||||
const visitApiBase = config.public.externalApiBaseUrl || 'http://10.10.123.135:8084/api/v1';
|
||||
const apiUrl = `${visitApiBase}/visit/status/finish`;
|
||||
const apiUrl = `${visitApiBase}/visit/status`;
|
||||
const requestBody = {
|
||||
patient_visit_healthcare_service_id: patient.healthcareServiceId,
|
||||
visit_code: patient.barcode || patient.visitCode,
|
||||
visit_code: patient.barcode || patient.visitCode || patient.ticket || "",
|
||||
visit_status_id: [33]
|
||||
};
|
||||
|
||||
@@ -2864,10 +2858,9 @@ const fetchPatientsForLoket = async (loketId, force = false) => {
|
||||
// Send API call to update status to 32 (PE PEMERIKSAAN)
|
||||
try {
|
||||
const visitApiBase = config.public.externalApiBaseUrl || 'http://10.10.123.135:8084/api/v1';
|
||||
const apiUrl = `${visitApiBase}/visit/status/finish`;
|
||||
const apiUrl = `${visitApiBase}/visit/status`;
|
||||
const requestBody = {
|
||||
patient_visit_healthcare_service_id: patient.healthcareServiceId,
|
||||
visit_code: patient.barcode || patient.visitCode,
|
||||
visit_code: patient.barcode || patient.visitCode || patient.ticket || "",
|
||||
visit_status_id: [32]
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user