Skip to main content

Patient Resource

Resource Patient digunakan untuk mengelola data demografis dan informasi identitas pasien dalam ekosistem SATUSEHAT.

Endpoint

GET    /Patient
POST /Patient
GET /Patient/{id}
PUT /Patient/{id}
PATCH /Patient/{id}

Base URL

  • Sandbox: https://api-satusehat-stg.dto.kemkes.go.id/fhir-r4/v1
  • Production: https://api-satusehat.kemkes.go.id/fhir-r4/v1

Headers

HeaderValueRequired
AuthorizationBearer {access_token}
Content-Typeapplication/fhir+json

Structure

Mandatory Fields

  • resourceType: "Patient"
  • identifier: Identifikasi unik pasien (NIK, No. KTP)
  • name: Nama lengkap pasien
  • birthDate: Tanggal lahir
  • gender: Jenis kelamin

Optional Fields

  • telecom: Informasi kontak
  • address: Alamat pasien
  • maritalStatus: Status pernikahan
  • communication: Bahasa komunikasi

Contoh Request

POST /Patient

{
"resourceType": "Patient",
"identifier": [
{
"use": "official",
"system": "https://fhir.kemkes.go.id/id/nik",
"value": "3271010101010001"
}
],
"name": [
{
"use": "official",
"family": "Doe",
"given": ["John"]
}
],
"gender": "male",
"birthDate": "1990-01-01",
"telecom": [
{
"system": "phone",
"value": "+62812345678",
"use": "mobile"
}
]
}

Response

{
"resourceType": "Patient",
"id": "100000030009",
"meta": {
"versionId": "1",
"lastUpdated": "2024-01-01T10:00:00.000+00:00"
},
"identifier": [
{
"use": "official",
"system": "https://fhir.kemkes.go.id/id/nik",
"value": "3271010101010001"
}
],
"name": [
{
"use": "official",
"family": "Doe",
"given": ["John"]
}
],
"gender": "male",
"birthDate": "1990-01-01"
}

Search Parameters

ParameterTypeDescription
identifiertokenPencarian berdasarkan identifier
namestringPencarian berdasarkan nama
birthdatedatePencarian berdasarkan tanggal lahir
gendertokenPencarian berdasarkan jenis kelamin

Error Handling

Common Error Codes

  • 400 Bad Request: Format data tidak sesuai
  • 401 Unauthorized: Token tidak valid
  • 404 Not Found: Patient tidak ditemukan
  • 422 Unprocessable Entity: Validasi data gagal

Example Error Response

{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "required",
"details": {
"text": "Missing required field: identifier"
}
}
]
}