feat(sep): add service of letter vclaim
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim-swagger/RencanaKontrol'
|
||||
const name = 'rencana-kontrol'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
let url = path
|
||||
if (params?.letterNumber && params.letterMode === 'by-control') {
|
||||
url += `/noSuratKontrol/${params.letterNumber}`
|
||||
}
|
||||
if (params?.letterNumber && params.letterMode === 'by-card') {
|
||||
url += `/noka/${params.letterNumber}`
|
||||
}
|
||||
if (params?.letterNumber && params.letterMode === 'by-sep') {
|
||||
url += `/${params.letterNumber}`
|
||||
}
|
||||
if (params?.letterNumber && params.letterMode === 'by-schedule') {
|
||||
url += `/jadwalDokter?jeniskontrol=${params.controlType}&kodepoli=${params.poliCode}&tanggalkontrol=${params.controlDate}`
|
||||
delete params.controlType
|
||||
delete params.poliCode
|
||||
delete params.controlDate
|
||||
}
|
||||
if (params) {
|
||||
delete params.letterNumber
|
||||
delete params.letterMode
|
||||
}
|
||||
return base.getList(url, params, name)
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim/monitoring/history'
|
||||
const path = '/api/vclaim-swagger/monitoring/history'
|
||||
const name = 'monitoring-history'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim/monitoring/kunjungan'
|
||||
const path = '/api/vclaim-swagger/monitoring/kunjungan'
|
||||
const name = 'monitoring-visit'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim-swagger/Rujukan/RS'
|
||||
const name = 'rujukan-rumah-sakit'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
let url = path
|
||||
if (params?.letterNumber) {
|
||||
url += `/${params.letterNumber}`
|
||||
}
|
||||
if (params) {
|
||||
delete params.letterNumber
|
||||
}
|
||||
return base.getList(url, params, name)
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Base
|
||||
import * as base from './_crud-base'
|
||||
|
||||
const path = '/api/vclaim-swagger/RujukanKhusus'
|
||||
const name = 'rujukan-khusus'
|
||||
|
||||
export function getList(params: any = null) {
|
||||
let url = path
|
||||
if (params?.letterNumber) {
|
||||
url += `?noRujukan=${params.letterNumber}`
|
||||
}
|
||||
if (params) {
|
||||
delete params.letterNumber
|
||||
}
|
||||
return base.getList(url, params, name)
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import * as base from './_crud-base'
|
||||
// Types
|
||||
import type { IntegrationBpjsFormData } from '~/schemas/integration-bpjs.schema'
|
||||
|
||||
const path = '/api/vclaim/sep'
|
||||
const path = '/api/vclaim-swagger/sep'
|
||||
const name = 'sep'
|
||||
|
||||
export function create(data: any) {
|
||||
|
||||
+4
-3
@@ -1,4 +1,3 @@
|
||||
|
||||
import process from 'node:process'
|
||||
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
@@ -7,10 +6,12 @@ export default defineNuxtConfig({
|
||||
runtimeConfig: {
|
||||
API_ORIGIN: process.env.NUXT_API_ORIGIN || 'http://localhost:3000',
|
||||
VCLAIM: process.env.NUXT_API_VCLAIM || 'http://localhost:3000',
|
||||
VCLAIM_SWAGGER: process.env.NUXT_API_VCLAIM_SWAGGER || 'http://localhost:3000',
|
||||
public: {
|
||||
API_ORIGIN: process.env.NUXT_API_ORIGIN || 'http://localhost:3000',
|
||||
VCLAIM: process.env.NUXT_API_VCLAIM || 'http://localhost:3000',
|
||||
}
|
||||
VCLAIM: process.env.NUXT_API_VCLAIM || 'http://localhost:3000',
|
||||
VCLAIM_SWAGGER: process.env.NUXT_API_VCLAIM_SWAGGER || 'http://localhost:3000',
|
||||
},
|
||||
},
|
||||
ssr: false,
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { is } from 'date-fns/locale'
|
||||
import { defineEventHandler, getCookie, getRequestHeaders, getRequestURL, readBody } from 'h3'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
@@ -9,6 +8,7 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
const apiOrigin = config.public.API_ORIGIN
|
||||
const apiVclaim = config.public.VCLAIM
|
||||
const apiVclaimSwagger = config.public.VCLAIM_SWAGGER
|
||||
const pathname = url.pathname.replace(/^\/api/, '')
|
||||
const isVclaim = pathname.includes('/vclaim')
|
||||
|
||||
@@ -16,6 +16,9 @@ export default defineEventHandler(async (event) => {
|
||||
if (pathname.includes('/vclaim')) {
|
||||
targetUrl = apiVclaim + pathname.replace('/vclaim', '') + (url.search || '')
|
||||
}
|
||||
if (pathname.includes('/vclaim-swagger')) {
|
||||
targetUrl = apiVclaimSwagger + pathname.replace('/vclaim-swagger', '') + (url.search || '')
|
||||
}
|
||||
|
||||
const verificationId = headers['verification-id'] as string | undefined
|
||||
let bearer = ''
|
||||
|
||||
Reference in New Issue
Block a user