This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
# 🚀 API Service - Clean Architecture
|
||||
|
||||
> **Layanan API modern dengan arsitektur bersih untuk manajemen produk, pesanan, dan otentikasi pengguna**
|
||||
> **Layanan API modern dengan arsitektur bersih untuk manajemen QRIS**
|
||||
|
||||
## 📑 Daftar Isi
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
### Core Features
|
||||
|
||||
- **📦 CRUD Operations** - Operasi lengkap untuk produk dan pesanan
|
||||
- **📦 CRUD Operations** - Operasi lengkap untuk QRIS
|
||||
- **📖 API Documentation** - Swagger/OpenAPI yang interaktif
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ api-service/
|
||||
│ ├── services/ # 💼 Business logic (Application)
|
||||
│ └── repository/ # 💾 Data access (Infrastructure)
|
||||
├── 📁 tools/ # 🔧 Development tools
|
||||
│ ├── general/ # 🎯 General generators
|
||||
│ └── general/ # 🎯 General generators
|
||||
├── 📁 docs/ # 📚 Documentation
|
||||
├── 📁 configs/ # ⚙️ Configuration files
|
||||
└── 📁 scripts/ # 📜 Automation scripts
|
||||
@@ -162,7 +162,7 @@ GET /api/v1/qris/dynamic?filter[ip][_eq]=10.10.150.160&filter[display_name][_con
|
||||
|
||||
# Pagination dan sorting
|
||||
# Default Limit 10 dan Offset 0 jika tidak didefinisikan di dalam link
|
||||
GET /api/v1/qris/ip/:ip?limit=10&offset=0
|
||||
GET /api/v1/qris/ip/dynamic?sort=created_at&limit=5&offset=1
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
# BPJS Services Configuration
|
||||
global:
|
||||
module_name: "api-service"
|
||||
output_dir: "internal/handlers"
|
||||
enable_swagger: true
|
||||
enable_logging: true
|
||||
|
||||
services:
|
||||
vclaim:
|
||||
name: "VClaim"
|
||||
category: "vclaim"
|
||||
package: "vclaim"
|
||||
description: "BPJS VClaim service for eligibility and SEP management"
|
||||
base_url: "https://apijkn.bpjs-kesehatan.go.id/vclaim-rest"
|
||||
timeout: 30
|
||||
retry_count: 3
|
||||
endpoints:
|
||||
peserta:
|
||||
bynokartu:
|
||||
methods: ["GET"]
|
||||
get_path: "/peserta/:nokartu"
|
||||
model: "PesertaRequest"
|
||||
response_model: "PesertaResponse"
|
||||
description: "Get participant eligibility information by card number"
|
||||
summary: "Get Participant Info by No Kartu"
|
||||
tags: ["Peserta"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 300
|
||||
bynik:
|
||||
methods: ["GET"]
|
||||
get_path: "/peserta/nik/:nik"
|
||||
model: "PesertaRequest"
|
||||
response_model: "PesertaResponse"
|
||||
description: "Get participant eligibility information by NIK"
|
||||
summary: "Get Participant Info by NIK"
|
||||
tags: ["Peserta"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 300
|
||||
sep:
|
||||
sep:
|
||||
methods: ["GET", "POST", "PUT", "DELETE"]
|
||||
get_path: "/sep/:nosep"
|
||||
post_path: "/sep"
|
||||
put_path: "/sep/:nosep"
|
||||
delete_path: "/sep/:nosep"
|
||||
model: "SepRequest"
|
||||
response_model: "SepResponse"
|
||||
description: "Manage SEP (Surat Eligibilitas Peserta)"
|
||||
summary: "SEP Management"
|
||||
tags: ["Sep"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 180
|
||||
rujukan:
|
||||
bynorujukan:
|
||||
methods: ["GET"]
|
||||
get_path: "/Rujukan/:norujukan"
|
||||
model: "RujukanRequest"
|
||||
response_model: "RujukanResponse"
|
||||
description: "Manage rujukan"
|
||||
summary: "Rujukan Management"
|
||||
tags: ["Rujukan"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 300
|
||||
bynokartu:
|
||||
methods: ["GET"]
|
||||
get_path: "/Rujukan/:nokartu"
|
||||
model: "RujukanRequest"
|
||||
response_model: "RujukanResponse"
|
||||
description: "Manage rujukan"
|
||||
summary: "Rujukan Management"
|
||||
tags: ["Rujukan"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 300
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# services-config-simple.yaml
|
||||
global:
|
||||
module_name: "api-service"
|
||||
output_dir: "internal/handlers"
|
||||
enable_swagger: true
|
||||
enable_logging: true
|
||||
|
||||
services:
|
||||
vclaim:
|
||||
name: "VClaim"
|
||||
category: "vclaim"
|
||||
package: "vclaim"
|
||||
description: "BPJS VClaim service for eligibility and SEP management"
|
||||
base_url: "https://apijkn.bpjs-kesehatan.go.id/vclaim-rest"
|
||||
timeout: 30
|
||||
retry_count: 3
|
||||
endpoints:
|
||||
peserta:
|
||||
methods: ["GET"]
|
||||
get_path: "/peserta/:nokartu"
|
||||
model: "PesertaRequest"
|
||||
response_model: "PesertaResponse"
|
||||
description: "Get participant eligibility information"
|
||||
summary: "Get Participant Info"
|
||||
tags: ["vclaim", "peserta"]
|
||||
cache_enabled: true
|
||||
cache_ttl: 300
|
||||
sep:
|
||||
methods: ["GET", "POST", "PUT", "DELETE"]
|
||||
get_path: "/sep/:nosep"
|
||||
post_path: "/sep"
|
||||
put_path: "/sep/:nosep"
|
||||
delete_path: "/sep/:nosep"
|
||||
model: "SepRequest"
|
||||
response_model: "SepResponse"
|
||||
description: "Manage SEP (Surat Eligibilitas Peserta)"
|
||||
summary: "SEP Management"
|
||||
tags: ["vclaim", "sep"]
|
||||
cache_enabled: true
|
||||
cache_ttl: 180
|
||||
|
||||
eclaim:
|
||||
name: "EClaim"
|
||||
category: "eclaim"
|
||||
package: "eclaim"
|
||||
description: "BPJS EClaim service for claim processing"
|
||||
base_url: "https://apijkn.bpjs-kesehatan.go.id/new-eclaim-rest"
|
||||
timeout: 60
|
||||
retry_count: 2
|
||||
endpoints:
|
||||
klaim:
|
||||
methods: ["GET", "POST", "PUT"]
|
||||
get_path: "/klaim/:noklaim"
|
||||
post_path: "/klaim"
|
||||
put_path: "/klaim/:noklaim"
|
||||
model: "KlaimRequest"
|
||||
response_model: "KlaimResponse"
|
||||
description: "Manage insurance claims"
|
||||
summary: "Claim Management"
|
||||
tags: ["eclaim", "klaim"]
|
||||
cache_enabled: false
|
||||
@@ -1,199 +0,0 @@
|
||||
# Satu Sehat FHIR Services Configuration
|
||||
global:
|
||||
module_name: "api-service"
|
||||
output_dir: "internal/handlers"
|
||||
enable_swagger: true
|
||||
enable_logging: true
|
||||
enable_metrics: true
|
||||
enable_auth: true
|
||||
base_url: "https://api-satusehat-stg.dto.kemkes.go.id/fhir-r4/v1"
|
||||
version: "1.0.0"
|
||||
environment: "staging"
|
||||
fhir_version: "FHIR R4"
|
||||
profile_url: "https://fhir.kemkes.go.id/r4/StructureDefinition"
|
||||
|
||||
services:
|
||||
patient:
|
||||
name: "Patient"
|
||||
category: "fhir/patient"
|
||||
package: "patient"
|
||||
description: "FHIR Patient resource management for Satu Sehat ecosystem"
|
||||
base_url: "https://api-satusehat-stg.dto.kemkes.go.id/fhir-r4/v1"
|
||||
timeout: 30
|
||||
retry_count: 3
|
||||
fhir_resource: "Patient"
|
||||
validation:
|
||||
enable_fhir_validation: true
|
||||
required_fields: ["resourceType", "identifier"]
|
||||
custom_validators: ["validateNIK", "validateKTP"]
|
||||
authentication:
|
||||
type: "oauth2"
|
||||
token_url: "https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/accesstoken"
|
||||
scopes: ["patient.read", "patient.write"]
|
||||
endpoints:
|
||||
patient:
|
||||
basic:
|
||||
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "SEARCH"]
|
||||
get_path: "/:id"
|
||||
post_path: ""
|
||||
put_path: "/:id"
|
||||
patch_path: "/:id"
|
||||
delete_path: "/:id"
|
||||
search_path: ""
|
||||
model: "PatientCreateRequest"
|
||||
response_model: "PatientResponse"
|
||||
description: "Manage FHIR Patient resources"
|
||||
summary: "Patient Resource Management"
|
||||
tags: ["Patient", "FHIR"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 300
|
||||
fhir_profiles: ["https://fhir.kemkes.go.id/r4/StructureDefinition/Patient"]
|
||||
search_params: ["identifier", "name", "gender", "birthdate", "address"]
|
||||
|
||||
organization:
|
||||
name: "Organization"
|
||||
category: "fhir/organization"
|
||||
package: "organization"
|
||||
description: "FHIR Organization resource management for Satu Sehat ecosystem"
|
||||
base_url: "https://api-satusehat-stg.dto.kemkes.go.id/fhir-r4/v1"
|
||||
timeout: 30
|
||||
retry_count: 3
|
||||
fhir_resource: "Organization"
|
||||
validation:
|
||||
enable_fhir_validation: true
|
||||
required_fields: ["resourceType", "name"]
|
||||
authentication:
|
||||
type: "oauth2"
|
||||
token_url: "https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/accesstoken"
|
||||
scopes: ["organization.read", "organization.write"]
|
||||
endpoints:
|
||||
organization:
|
||||
basic:
|
||||
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "SEARCH"]
|
||||
get_path: "/:id"
|
||||
post_path: ""
|
||||
put_path: "/:id"
|
||||
patch_path: "/:id"
|
||||
delete_path: "/:id"
|
||||
search_path: ""
|
||||
model: "OrganizationCreateRequest"
|
||||
response_model: "OrganizationResponse"
|
||||
description: "Manage FHIR Organization resources"
|
||||
summary: "Organization Resource Management"
|
||||
tags: ["Organization", "FHIR"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 600
|
||||
fhir_profiles: ["https://fhir.kemkes.go.id/r4/StructureDefinition/Organization"]
|
||||
search_params: ["identifier", "name", "type", "address"]
|
||||
|
||||
practitioner:
|
||||
name: "Practitioner"
|
||||
category: "fhir/practitioner"
|
||||
package: "practitioner"
|
||||
description: "FHIR Practitioner resource management for Satu Sehat ecosystem"
|
||||
base_url: "https://api-satusehat-stg.dto.kemkes.go.id/fhir-r4/v1"
|
||||
timeout: 30
|
||||
retry_count: 3
|
||||
fhir_resource: "Practitioner"
|
||||
validation:
|
||||
enable_fhir_validation: true
|
||||
required_fields: ["resourceType", "name"]
|
||||
authentication:
|
||||
type: "oauth2"
|
||||
token_url: "https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/accesstoken"
|
||||
scopes: ["practitioner.read", "practitioner.write"]
|
||||
endpoints:
|
||||
practitioner:
|
||||
basic:
|
||||
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "SEARCH"]
|
||||
get_path: "/:id"
|
||||
post_path: ""
|
||||
put_path: "/:id"
|
||||
patch_path: "/:id"
|
||||
delete_path: "/:id"
|
||||
search_path: ""
|
||||
model: "PractitionerCreateRequest"
|
||||
response_model: "PractitionerResponse"
|
||||
description: "Manage FHIR Practitioner resources"
|
||||
summary: "Practitioner Resource Management"
|
||||
tags: ["Practitioner", "FHIR"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 600
|
||||
fhir_profiles: ["https://fhir.kemkes.go.id/r4/StructureDefinition/Practitioner"]
|
||||
search_params: ["identifier", "name", "qualification"]
|
||||
|
||||
encounter:
|
||||
name: "Encounter"
|
||||
category: "fhir/encounter"
|
||||
package: "encounter"
|
||||
description: "FHIR Encounter resource management for Satu Sehat ecosystem"
|
||||
base_url: "https://api-satusehat-stg.dto.kemkes.go.id/fhir-r4/v1"
|
||||
timeout: 45
|
||||
retry_count: 3
|
||||
fhir_resource: "Encounter"
|
||||
validation:
|
||||
enable_fhir_validation: true
|
||||
required_fields: ["resourceType", "status", "subject"]
|
||||
authentication:
|
||||
type: "oauth2"
|
||||
token_url: "https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/accesstoken"
|
||||
scopes: ["encounter.read", "encounter.write"]
|
||||
endpoints:
|
||||
encounter:
|
||||
basic:
|
||||
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "SEARCH"]
|
||||
get_path: "/:id"
|
||||
post_path: ""
|
||||
put_path: "/:id"
|
||||
patch_path: "/:id"
|
||||
delete_path: "/:id"
|
||||
search_path: ""
|
||||
model: "EncounterCreateRequest"
|
||||
response_model: "EncounterResponse"
|
||||
description: "Manage FHIR Encounter resources"
|
||||
summary: "Encounter Resource Management"
|
||||
tags: ["Encounter", "FHIR"]
|
||||
require_auth: true
|
||||
cache_enabled: false
|
||||
fhir_profiles: ["https://fhir.kemkes.go.id/r4/StructureDefinition/Encounter"]
|
||||
search_params: ["patient", "subject", "status", "date", "practitioner"]
|
||||
|
||||
observation:
|
||||
name: "Observation"
|
||||
category: "fhir/observation"
|
||||
package: "observation"
|
||||
description: "FHIR Observation resource management for Satu Sehat ecosystem"
|
||||
base_url: "https://api-satusehat-stg.dto.kemkes.go.id/fhir-r4/v1"
|
||||
timeout: 30
|
||||
retry_count: 3
|
||||
fhir_resource: "Observation"
|
||||
validation:
|
||||
enable_fhir_validation: true
|
||||
required_fields: ["resourceType", "status", "code", "subject"]
|
||||
authentication:
|
||||
type: "oauth2"
|
||||
token_url: "https://api-satusehat-stg.dto.kemkes.go.id/oauth2/v1/accesstoken"
|
||||
scopes: ["observation.read", "observation.write"]
|
||||
endpoints:
|
||||
observation:
|
||||
basic:
|
||||
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "SEARCH"]
|
||||
get_path: "/:id"
|
||||
post_path: ""
|
||||
put_path: "/:id"
|
||||
patch_path: "/:id"
|
||||
delete_path: "/:id"
|
||||
search_path: ""
|
||||
model: "ObservationCreateRequest"
|
||||
response_model: "ObservationResponse"
|
||||
description: "Manage FHIR Observation resources"
|
||||
summary: "Observation Resource Management"
|
||||
tags: ["Observation", "FHIR"]
|
||||
require_auth: true
|
||||
cache_enabled: true
|
||||
cache_ttl: 180
|
||||
fhir_profiles: ["https://fhir.kemkes.go.id/r4/StructureDefinition/Observation"]
|
||||
search_params: ["patient", "subject", "code", "date", "category"]
|
||||
149
test
149
test
@@ -1,149 +0,0 @@
|
||||
# services-config-complete.yaml
|
||||
global:
|
||||
module_name: "api-service"
|
||||
output_dir: "internal/handlers"
|
||||
package_prefix: "api-service"
|
||||
enable_swagger: true
|
||||
enable_logging: true
|
||||
enable_metrics: true
|
||||
|
||||
services:
|
||||
vclaim:
|
||||
name: "VClaim"
|
||||
category: "vclaim"
|
||||
package: "vclaim"
|
||||
description: "BPJS VClaim service for eligibility and SEP management"
|
||||
base_url: "https://apijkn.bpjs-kesehatan.go.id/vclaim-rest"
|
||||
timeout: 30
|
||||
retry_count: 3
|
||||
middleware:
|
||||
- "RequestLogger"
|
||||
- "ResponseLogger"
|
||||
- "RateLimiter"
|
||||
dependencies:
|
||||
- "database"
|
||||
- "redis"
|
||||
endpoints:
|
||||
peserta:
|
||||
methods: ["GET"]
|
||||
get_path: "/Peserta/:nokartu"
|
||||
model: "PesertaRequest"
|
||||
response_model: "PesertaResponse"
|
||||
description: "Get participant eligibility information"
|
||||
summary: "Get Participant Info"
|
||||
tags: ["vclaim", "peserta"]
|
||||
require_auth: true
|
||||
rate_limit: 100
|
||||
cache_enabled: true
|
||||
cache_ttl: 300
|
||||
sep:
|
||||
methods: ["GET", "POST", "PUT", "DELETE"]
|
||||
get_path: "/SEP/:nosep"
|
||||
post_path: "/sep"
|
||||
put_path: "/sep/:nosep"
|
||||
delete_path: "/sep/:nosep"
|
||||
model: "SEPRequest"
|
||||
response_model: "SEPResponse"
|
||||
description: "Manage SEP (Surat Eligibilitas Peserta)"
|
||||
summary: "SEP Management"
|
||||
tags: ["vclaim", "sep"]
|
||||
require_auth: true
|
||||
rate_limit: 50
|
||||
cache_enabled: true
|
||||
cache_ttl: 180
|
||||
custom_headers:
|
||||
X-Service: "VClaim"
|
||||
X-Version: "2.0"
|
||||
rujukan:
|
||||
methods: ["GET"]
|
||||
get_path: "/rujukan/:norujukan"
|
||||
model: "RujukanRequest"
|
||||
response_model: "RujukanResponse"
|
||||
description: "Get referral information"
|
||||
summary: "Get Referral Info"
|
||||
tags: ["vclaim", "rujukan"]
|
||||
require_auth: true
|
||||
rate_limit: 100
|
||||
cache_enabled: true
|
||||
cache_ttl: 600
|
||||
|
||||
eclaim:
|
||||
name: "EClaim"
|
||||
category: "eclaim"
|
||||
package: "eclaim"
|
||||
description: "BPJS EClaim service for claim processing and grouper"
|
||||
base_url: "https://apijkn.bpjs-kesehatan.go.id/new-eclaim-rest"
|
||||
timeout: 60
|
||||
retry_count: 2
|
||||
middleware:
|
||||
- "RequestLogger"
|
||||
- "ResponseLogger"
|
||||
- "ClaimValidator"
|
||||
dependencies:
|
||||
- "database"
|
||||
- "grouper_service"
|
||||
endpoints:
|
||||
klaim:
|
||||
methods: ["GET", "POST", "PUT"]
|
||||
get_path: "/klaim/:noklaim"
|
||||
post_path: "/klaim"
|
||||
put_path: "/klaim/:noklaim"
|
||||
model: "KlaimRequest"
|
||||
response_model: "KlaimResponse"
|
||||
description: "Manage insurance claims"
|
||||
summary: "Claim Management"
|
||||
tags: ["eclaim", "klaim"]
|
||||
require_auth: true
|
||||
rate_limit: 30
|
||||
cache_enabled: false
|
||||
grouper:
|
||||
methods: ["POST"]
|
||||
post_path: "/grouper"
|
||||
model: "GrouperRequest"
|
||||
response_model: "GrouperResponse"
|
||||
description: "Process claim grouping and pricing"
|
||||
summary: "Claim Grouper"
|
||||
tags: ["eclaim", "grouper"]
|
||||
require_auth: true
|
||||
rate_limit: 20
|
||||
cache_enabled: true
|
||||
cache_ttl: 120
|
||||
|
||||
aplicare:
|
||||
name: "Aplicare"
|
||||
category: "aplicare"
|
||||
package: "aplicare"
|
||||
description: "BPJS Aplicare service for reference data and monitoring"
|
||||
base_url: "https://apijkn.bpjs-kesehatan.go.id/aplicaresws"
|
||||
timeout: 45
|
||||
retry_count: 3
|
||||
middleware:
|
||||
- "RequestLogger"
|
||||
- "ResponseLogger"
|
||||
dependencies:
|
||||
- "database"
|
||||
endpoints:
|
||||
referensi:
|
||||
methods: ["GET"]
|
||||
get_path: "/referensi/:jenis"
|
||||
model: "ReferensiRequest"
|
||||
response_model: "ReferensiResponse"
|
||||
description: "Get reference data (diagnoses, procedures, etc.)"
|
||||
summary: "Get Reference Data"
|
||||
tags: ["aplicare", "referensi"]
|
||||
require_auth: true
|
||||
rate_limit: 200
|
||||
cache_enabled: true
|
||||
cache_ttl: 3600
|
||||
monitoring:
|
||||
methods: ["GET", "POST"]
|
||||
get_path: "/monitoring/:tanggal"
|
||||
post_path: "/monitoring"
|
||||
model: "MonitoringRequest"
|
||||
response_model: "MonitoringResponse"
|
||||
description: "Healthcare monitoring and reporting"
|
||||
summary: "Monitoring Data"
|
||||
tags: ["aplicare", "monitoring"]
|
||||
require_auth: true
|
||||
rate_limit: 50
|
||||
cache_enabled: false
|
||||
Reference in New Issue
Block a user