{
  "openapi": "3.0.3",
  "info": {
    "title": "BPJS Mock API",
    "version": "1.0.0",
    "description": "Mock server untuk PCare, Antrean FKTP, dan iCare BPJS Kesehatan. Mengikuti skema enkripsi BPJS asli: response field di-LZString compress lalu di-AES-256-CBC dengan key = consId+secretKey+timestamp, akhirnya base64. Tambahkan query `?plain=1` untuk response JSON apa adanya (mode debug).\n\n**Header wajib** untuk semua endpoint BPJS:\n- `X-cons-id` — consumer id\n- `X-timestamp` — unix epoch detik\n- `X-signature` — base64(hmac_sha256(`<consId>&<timestamp>`, `<secretKey>`))\n- `user_key` — user key per modul\n- `X-authorization` — base64(`username:password:095`) untuk PCare/iCare-FKTP"
  },
  "servers": [
    { "url": "/bpjs-mock/web", "description": "Apache htdocs — http://localhost/bpjs-mock/web/" },
    { "url": "http://localhost:8080", "description": "Built-in PHP dev server (php -S localhost:8080 -t web)" },
    { "url": "..", "description": "Relatif terhadap /docs/ (otomatis ikut host saat ini)" }
  ],
  "tags": [
    { "name": "PCare — Peserta" },
    { "name": "PCare — Pendaftaran" },
    { "name": "PCare — Kunjungan" },
    { "name": "PCare — Tindakan" },
    { "name": "PCare — Obat" },
    { "name": "PCare — MCU" },
    { "name": "PCare — Referensi" },
    { "name": "PCare — Spesialis" },
    { "name": "PCare — Kelompok" },
    { "name": "PCare — Skrining" },
    { "name": "Antrean FKTP" },
    { "name": "iCare" }
  ],
  "components": {
    "securitySchemes": {
      "XConsId":      { "type": "apiKey", "in": "header", "name": "X-cons-id" },
      "XTimestamp":   { "type": "apiKey", "in": "header", "name": "X-timestamp" },
      "XSignature":   { "type": "apiKey", "in": "header", "name": "X-signature" },
      "UserKey":      { "type": "apiKey", "in": "header", "name": "user_key" },
      "XAuthorization": { "type": "apiKey", "in": "header", "name": "X-authorization" }
    },
    "schemas": {
      "Envelope": {
        "type": "object",
        "properties": {
          "metaData": {
            "type": "object",
            "properties": { "code": { "type": "string" }, "message": { "type": "string" } }
          },
          "response": {
            "oneOf": [
              { "type": "string", "description": "Base64(AES-256-CBC(LZString(JSON))). Mode default." },
              { "type": "object", "description": "Plain object jika request pakai `?plain=1`." },
              { "type": "null" }
            ]
          }
        }
      },
      "Peserta": {
        "type": "object",
        "properties": {
          "noKartu":  { "type": "string", "example": "0001234567890" },
          "nik":      { "type": "string", "example": "3301010101010001" },
          "nama":     { "type": "string" },
          "sex":      { "type": "string", "enum": ["L", "P"] },
          "tglLahir": { "type": "string", "example": "01-01-1990" },
          "jenisPeserta":     { "type": "object" },
          "kelasTanggungan":  { "type": "object" },
          "statusPeserta":    { "type": "object" },
          "provUmum":         { "type": "object" }
        }
      },
      "PendaftaranInput": {
        "type": "object",
        "required": ["noKartu", "tglDaftar", "kdPoli"],
        "properties": {
          "kdProviderPeserta": { "type": "integer" },
          "tglDaftar":         { "type": "string", "example": "10-04-2026", "description": "Format d-m-Y" },
          "noKartu":           { "type": "string" },
          "kdPoli":            { "type": "string", "example": "001" },
          "keluhan":           { "type": "string" },
          "kunjSakit":         { "type": "boolean" },
          "sistole":           { "type": "integer" },
          "diastole":          { "type": "integer" },
          "beratBadan":        { "type": "integer" },
          "tinggiBadan":       { "type": "integer" },
          "respRate":          { "type": "integer" },
          "heartRate":         { "type": "integer" },
          "lingkarPerut":      { "type": "integer" },
          "rujukBalik":        { "type": "integer" },
          "kdTkp":             { "type": "integer" }
        }
      },
      "KunjunganInput": {
        "type": "object",
        "required": ["noKartu", "tglDaftar", "kdPoli", "kdDiag1"],
        "properties": {
          "noKunjungan":  { "type": "string", "nullable": true },
          "noKartu":      { "type": "string" },
          "tglDaftar":    { "type": "string", "example": "10-04-2026" },
          "kdPoli":       { "type": "string" },
          "keluhan":      { "type": "string" },
          "kdSadar":      { "type": "string", "example": "01" },
          "sistole":      { "type": "integer" },
          "diastole":     { "type": "integer" },
          "beratBadan":   { "type": "integer" },
          "tinggiBadan":  { "type": "integer" },
          "respRate":     { "type": "integer" },
          "heartRate":    { "type": "integer" },
          "lingkarPerut": { "type": "integer" },
          "kdStatusPulang": { "type": "string", "example": "4" },
          "tglPulang":    { "type": "string" },
          "kdDokter":     { "type": "string" },
          "kdDiag1":      { "type": "string" },
          "kdDiag2":      { "type": "string", "nullable": true },
          "kdDiag3":      { "type": "string", "nullable": true },
          "kdTacc":       { "type": "integer" },
          "alasanTacc":   { "type": "string" },
          "anamnesa":     { "type": "string" },
          "alergiMakan":  { "type": "string", "example": "00" },
          "alergiUdara":  { "type": "string", "example": "00" },
          "alergiObat":   { "type": "string", "example": "00" },
          "kdPrognosa":   { "type": "string", "example": "01" },
          "terapiObat":   { "type": "string" },
          "terapiNonObat":{ "type": "string" },
          "bmhp":         { "type": "string" },
          "suhu":         { "type": "string", "example": "36.4" },
          "rujukLanjut": {
            "type": "object",
            "nullable": true,
            "properties": {
              "kdppk":         { "type": "string" },
              "tglEstRujuk":   { "type": "string" },
              "subSpesialis":  { "type": "string" },
              "khusus":        { "type": "string" }
            }
          }
        }
      },
      "TindakanInput": {
        "type": "object",
        "required": ["noKunjungan", "kdTindakan"],
        "properties": {
          "kdTindakanSK": { "type": "integer" },
          "noKunjungan":  { "type": "string" },
          "kdTindakan":   { "type": "string" },
          "biaya":        { "type": "integer" },
          "keterangan":   { "type": "string" },
          "hasil":        { "type": "integer" }
        }
      },
      "ObatInput": {
        "type": "object",
        "required": ["noKunjungan", "kdObat"],
        "properties": {
          "kdObatSK":      { "type": "integer" },
          "noKunjungan":   { "type": "string" },
          "racikan":       { "type": "string", "nullable": true },
          "kdRacikan":     { "type": "string", "nullable": true },
          "obatDPHO":      { "type": "boolean" },
          "kdObat":        { "type": "string" },
          "signa1":        { "type": "integer" },
          "signa2":        { "type": "integer" },
          "jmlObat":       { "type": "integer" },
          "jmlPermintaan": { "type": "integer" },
          "nmObatNonDPHO": { "type": "string" }
        }
      },
      "McuInput": {
        "type": "object",
        "required": ["noKunjungan"],
        "properties": {
          "kdMCU":               { "type": "integer" },
          "noKunjungan":         { "type": "string" },
          "kdProvider":          { "type": "string" },
          "tglPelayanan":        { "type": "string" },
          "tekananDarahSistole": { "type": "integer" },
          "tekananDarahDiastole":{ "type": "integer" },
          "gulaDarahSewaktu":    { "type": "integer" },
          "gulaDarahPuasa":      { "type": "integer" },
          "lemakDarahLDL":       { "type": "integer" },
          "lemakDarahHDL":       { "type": "integer" },
          "lemakDarahChol":      { "type": "integer" },
          "lemakDarahTrigli":    { "type": "integer" },
          "fungsiGinjalCrea":    { "type": "integer" },
          "fungsiGinjalUreum":   { "type": "integer" },
          "keterangan":          { "type": "string" }
        }
      },
      "AntreanAddInput": {
        "type": "object",
        "required": ["nomorkartu", "kodepoli", "tanggalperiksa", "kodedokter", "nomorantrean"],
        "properties": {
          "nomorkartu":     { "type": "string" },
          "nik":            { "type": "string" },
          "nohp":           { "type": "string" },
          "kodepoli":       { "type": "string" },
          "namapoli":       { "type": "string" },
          "norm":           { "type": "string" },
          "tanggalperiksa": { "type": "string", "example": "2026-04-10", "description": "Format Y-m-d" },
          "kodedokter":     { "type": "string" },
          "namadokter":     { "type": "string" },
          "jampraktek":     { "type": "string" },
          "nomorantrean":   { "type": "string" },
          "angkaantrean":   { "type": "string" },
          "keterangan":     { "type": "string" }
        }
      },
      "AntreanPanggilInput": {
        "type": "object",
        "required": ["tanggalperiksa", "kodepoli", "nomorkartu", "status", "waktu"],
        "properties": {
          "tanggalperiksa": { "type": "string", "example": "2026-04-10" },
          "kodepoli":       { "type": "string" },
          "nomorkartu":     { "type": "string" },
          "status":         { "type": "integer", "enum": [1, 2], "description": "1 = Hadir, 2 = Tidak Hadir" },
          "waktu":          { "type": "integer", "description": "Unix epoch millisecond" }
        }
      },
      "AntreanBatalInput": {
        "type": "object",
        "required": ["tanggalperiksa", "kodepoli", "nomorkartu", "alasan"],
        "properties": {
          "tanggalperiksa": { "type": "string", "example": "2026-04-10" },
          "kodepoli":       { "type": "string" },
          "nomorkartu":     { "type": "string" },
          "alasan":         { "type": "string" }
        }
      },
      "IcareValidateInput": {
        "type": "object",
        "required": ["param", "kodedokter"],
        "properties": {
          "param":      { "type": "string", "description": "Nomor kartu BPJS atau NIK" },
          "kodedokter": { "type": "string" }
        }
      }
    }
  },
  "security": [
    { "XConsId": [], "XTimestamp": [], "XSignature": [], "UserKey": [] }
  ],
  "paths": {
    "/pcare-rest/peserta/{noKartu}": {
      "get": {
        "tags": ["PCare — Peserta"],
        "summary": "Cari peserta berdasarkan nomor kartu BPJS",
        "parameters": [{ "name": "noKartu", "in": "path", "required": true, "schema": { "type": "string" }, "example": "0001234567890" }],
        "responses": { "200": { "description": "Envelope BPJS", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } } }
      }
    },
    "/pcare-rest/peserta/nik/{nik}": {
      "get": {
        "tags": ["PCare — Peserta"],
        "summary": "Cari peserta berdasarkan NIK",
        "parameters": [{ "name": "nik", "in": "path", "required": true, "schema": { "type": "string" }, "example": "3301010101010001" }],
        "responses": { "200": { "description": "Envelope BPJS", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope" } } } } }
      }
    },
    "/pcare-rest/peserta/noka/{noKartu}": {
      "get": {
        "tags": ["PCare — Peserta"],
        "summary": "Cari peserta (alias noka)",
        "parameters": [{ "name": "noKartu", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/pendaftaran": {
      "post": {
        "tags": ["PCare — Pendaftaran"],
        "summary": "Buat pendaftaran",
        "requestBody": { "required": true, "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PendaftaranInput" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PendaftaranInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/pendaftaran/noUrut/{noUrut}/tglDaftar/{tglDaftar}": {
      "get": {
        "tags": ["PCare — Pendaftaran"],
        "summary": "Detail pendaftaran",
        "parameters": [
          { "name": "noUrut", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "tglDaftar", "in": "path", "required": true, "schema": { "type": "string" }, "example": "10-04-2026" }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/pendaftaran/tglDaftar/{tglDaftar}/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Pendaftaran"],
        "summary": "List pendaftaran (paged)",
        "parameters": [
          { "name": "tglDaftar", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/pendaftaran/peserta/{noKartu}/tglDaftar/{tglDaftar}/noUrut/{noUrut}/kdPoli/{kdPoli}": {
      "delete": {
        "tags": ["PCare — Pendaftaran"],
        "summary": "Hapus pendaftaran",
        "parameters": [
          { "name": "noKartu", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "tglDaftar", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "noUrut", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "kdPoli", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/kunjungan/V1": {
      "post": {
        "tags": ["PCare — Kunjungan"],
        "summary": "Buat kunjungan (V1)",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KunjunganInput" } } } },
        "responses": { "200": { "description": "OK" } }
      },
      "put": {
        "tags": ["PCare — Kunjungan"],
        "summary": "Update kunjungan",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KunjunganInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kunjungan/rujukan/{noKunjungan}": {
      "get": {
        "tags": ["PCare — Kunjungan"],
        "summary": "Cari rujukan berdasarkan nomor kunjungan",
        "parameters": [{ "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kunjungan/peserta/{noPeserta}": {
      "get": {
        "tags": ["PCare — Kunjungan"],
        "summary": "Riwayat kunjungan peserta",
        "parameters": [{ "name": "noPeserta", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kunjungan/{noKunjungan}": {
      "delete": {
        "tags": ["PCare — Kunjungan"],
        "summary": "Hapus kunjungan",
        "parameters": [{ "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/tindakan/kdTkp/{kodeTkp}/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Tindakan"],
        "summary": "Referensi tindakan (paged)",
        "parameters": [
          { "name": "kodeTkp", "in": "path", "required": true, "schema": { "type": "string" }, "example": "10" },
          { "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/tindakan/kunjungan/{noKunjungan}": {
      "get": {
        "tags": ["PCare — Tindakan"],
        "summary": "Tindakan per kunjungan",
        "parameters": [{ "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/tindakan": {
      "post": {
        "tags": ["PCare — Tindakan"],
        "summary": "Tambah tindakan",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TindakanInput" } } } },
        "responses": { "200": { "description": "OK" } }
      },
      "put": {
        "tags": ["PCare — Tindakan"],
        "summary": "Update tindakan",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TindakanInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/tindakan/{kdTindakanSK}/kunjungan/{noKunjungan}": {
      "delete": {
        "tags": ["PCare — Tindakan"],
        "summary": "Hapus tindakan",
        "parameters": [
          { "name": "kdTindakanSK", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/obat/dpho/{keyword}/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Obat"],
        "summary": "Cari obat DPHO",
        "parameters": [
          { "name": "keyword", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/obat/kunjungan/{noKunjungan}": {
      "get": {
        "tags": ["PCare — Obat"],
        "summary": "Obat per kunjungan",
        "parameters": [{ "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/obat/kunjungan": {
      "post": {
        "tags": ["PCare — Obat"],
        "summary": "Tambah obat ke kunjungan",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObatInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/obat/{kodeObat}/kunjungan/{noKunjungan}": {
      "delete": {
        "tags": ["PCare — Obat"],
        "summary": "Hapus obat dari kunjungan",
        "parameters": [
          { "name": "kodeObat", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/MCU/kunjungan/{noKunjungan}": {
      "get": {
        "tags": ["PCare — MCU"],
        "summary": "Data MCU per kunjungan",
        "parameters": [{ "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/MCU": {
      "post": {
        "tags": ["PCare — MCU"],
        "summary": "Tambah MCU",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McuInput" } } } },
        "responses": { "200": { "description": "OK" } }
      },
      "put": {
        "tags": ["PCare — MCU"],
        "summary": "Update MCU",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McuInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/MCU/{kodeMCU}/kunjungan/{noKunjungan}": {
      "delete": {
        "tags": ["PCare — MCU"],
        "summary": "Hapus MCU",
        "parameters": [
          { "name": "kodeMCU", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "noKunjungan", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/diagnosa/{keyword}/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Referensi"],
        "summary": "Cari diagnosa (ICD-10)",
        "parameters": [
          { "name": "keyword", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/dokter/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Referensi"],
        "summary": "Daftar dokter",
        "parameters": [
          { "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/alergi/jenis/{kodeJenis}": {
      "get": {
        "tags": ["PCare — Referensi"],
        "summary": "Daftar alergi per jenis (01=makanan, 02=udara, 03=obat)",
        "parameters": [{ "name": "kodeJenis", "in": "path", "required": true, "schema": { "type": "string", "enum": ["01", "02", "03"] } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kesadaran": {
      "get": { "tags": ["PCare — Referensi"], "summary": "Referensi tingkat kesadaran", "responses": { "200": { "description": "OK" } } }
    },
    "/pcare-rest/statuspulang/rawatInap/{rawatInap}": {
      "get": {
        "tags": ["PCare — Referensi"],
        "summary": "Referensi status pulang",
        "parameters": [{ "name": "rawatInap", "in": "path", "required": true, "schema": { "type": "string", "enum": ["true", "false"] } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/prognosa": { "get": { "tags": ["PCare — Referensi"], "summary": "Referensi prognosa", "responses": { "200": { "description": "OK" } } } },
    "/pcare-rest/poli/fktp/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Referensi"],
        "summary": "Daftar poli FKTP",
        "parameters": [{ "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/provider/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Referensi"],
        "summary": "Daftar provider/FKRTL",
        "parameters": [{ "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/spesialis": { "get": { "tags": ["PCare — Spesialis"], "summary": "Daftar spesialis", "responses": { "200": { "description": "OK" } } } },
    "/pcare-rest/spesialis/{kdSpesialis}/subspesialis": {
      "get": {
        "tags": ["PCare — Spesialis"],
        "summary": "Daftar sub-spesialis",
        "parameters": [{ "name": "kdSpesialis", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/spesialis/sarana": { "get": { "tags": ["PCare — Spesialis"], "summary": "Referensi sarana", "responses": { "200": { "description": "OK" } } } },
    "/pcare-rest/spesialis/khusus": { "get": { "tags": ["PCare — Spesialis"], "summary": "Referensi kasus khusus", "responses": { "200": { "description": "OK" } } } },
    "/pcare-rest/spesialis/rujuk/subspesialis/{kdSubSpesialis}/sarana/{kdSarana}/tglEstRujuk/{tglEstRujuk}": {
      "get": {
        "tags": ["PCare — Spesialis"],
        "summary": "Provider rujukan per sub-spesialis",
        "parameters": [
          { "name": "kdSubSpesialis", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "kdSarana", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "tglEstRujuk", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/spesialis/rujuk/khusus/{kdKhusus}/noKartu/{noKartu}/tglEstRujuk/{tglEstRujuk}": {
      "get": {
        "tags": ["PCare — Spesialis"],
        "summary": "Provider rujukan khusus",
        "parameters": [
          { "name": "kdKhusus", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "noKartu", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "tglEstRujuk", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/spesialis/rujuk/khusus/{kdKhusus}/subspesialis/{kdSubSpesialis}/noKartu/{noKartu}/tglEstRujuk/{tglEstRujuk}": {
      "get": {
        "tags": ["PCare — Spesialis"],
        "summary": "Provider rujukan khusus + sub-spesialis",
        "parameters": [
          { "name": "kdKhusus", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "kdSubSpesialis", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "noKartu", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "tglEstRujuk", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/kelompok/club/{kodeJenis}": {
      "get": {
        "tags": ["PCare — Kelompok"],
        "summary": "List club Prolanis",
        "parameters": [{ "name": "kodeJenis", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kelompok/kegiatan/{tgl}": {
      "get": {
        "tags": ["PCare — Kelompok"],
        "summary": "Kegiatan kelompok per tanggal",
        "parameters": [{ "name": "tgl", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kelompok/kegiatan": {
      "post": { "tags": ["PCare — Kelompok"], "summary": "Tambah kegiatan",  "responses": { "200": { "description": "OK" } } },
      "put":  { "tags": ["PCare — Kelompok"], "summary": "Update kegiatan",  "responses": { "200": { "description": "OK" } } }
    },
    "/pcare-rest/kelompok/kegiatan/{eduId}": {
      "delete": {
        "tags": ["PCare — Kelompok"],
        "summary": "Hapus kegiatan",
        "parameters": [{ "name": "eduId", "in": "path", "required": true, "schema": { "type": "integer" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kelompok/peserta/{eduId}": {
      "get": {
        "tags": ["PCare — Kelompok"],
        "summary": "Peserta kegiatan",
        "parameters": [{ "name": "eduId", "in": "path", "required": true, "schema": { "type": "integer" } }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/pcare-rest/kelompok/peserta": {
      "post": { "tags": ["PCare — Kelompok"], "summary": "Tambah peserta kegiatan",  "responses": { "200": { "description": "OK" } } }
    },
    "/pcare-rest/kelompok/peserta/{eduId}/{noKartu}": {
      "delete": {
        "tags": ["PCare — Kelompok"],
        "summary": "Hapus peserta kegiatan",
        "parameters": [
          { "name": "eduId", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "noKartu", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/pcare-rest/skrinning/peserta/{noKartu}/{start}/{limit}": {
      "get": {
        "tags": ["PCare — Skrining"],
        "summary": "Riwayat skrining peserta",
        "parameters": [
          { "name": "noKartu", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "start", "in": "path", "required": true, "schema": { "type": "integer" } },
          { "name": "limit", "in": "path", "required": true, "schema": { "type": "integer" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/antreanfktp/ref/poli/tanggal/{tanggal}": {
      "get": {
        "tags": ["Antrean FKTP"],
        "summary": "Daftar poli aktif tanggal X",
        "parameters": [{ "name": "tanggal", "in": "path", "required": true, "schema": { "type": "string" }, "example": "2026-04-10" }],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/antreanfktp/ref/dokter/kodepoli/{kodepoli}/tanggal/{tanggal}": {
      "get": {
        "tags": ["Antrean FKTP"],
        "summary": "Daftar dokter aktif per poli & tanggal",
        "parameters": [
          { "name": "kodepoli", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "tanggal", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/antreanfktp/antrean/add": {
      "post": {
        "tags": ["Antrean FKTP"],
        "summary": "Tambah antrean",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AntreanAddInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/antreanfktp/antrean/panggil": {
      "post": {
        "tags": ["Antrean FKTP"],
        "summary": "Update status antrean (panggil)",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AntreanPanggilInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/antreanfktp/antrean/batal": {
      "post": {
        "tags": ["Antrean FKTP"],
        "summary": "Batalkan antrean",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AntreanBatalInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },

    "/wsIHS/api/pcare/validate": {
      "post": {
        "tags": ["iCare"],
        "summary": "Validasi peserta untuk akses iCare di FKTP",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IcareValidateInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    },
    "/wsIHS/api/rs/validate": {
      "post": {
        "tags": ["iCare"],
        "summary": "Validasi peserta untuk akses iCare di FKRTL",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IcareValidateInput" } } } },
        "responses": { "200": { "description": "OK" } }
      }
    }
  }
}
