Complete Guide to Implementing the PDP Law in Hospitals: Strategy & Technology
T
Kembali ke Blog

Complete Guide to Implementing the PDP Law in Hospitals: Strategy & Technology

Industri Kesehatan
Tim Pilar Inovasi 15 Jun 2026 15 min baca 3,246 kata 348
This article thoroughly examines the challenges and solutions for implementing Law No. 27 of 2022 on Personal Data Protection (PDP) for hospitals. Learn technical strategies, code examples, and best practices to ensure compliance and the security of sensitive patient data.

Hospitals bear a great responsibility in managing highly sensitive personal patient data, ranging from medical records, diagnostic results, to payment information. Violations of this data not only have the potential to harm patients financially and in terms of privacy, but can also result in fines of billions of rupiah and criminal sanctions for healthcare institutions. With the enactment of Law Number 27 of 2022 concerning Personal Data Protection (PDP Law), hospitals are now faced with strict legal obligations to maintain the confidentiality and security of data. Many hospital IT managers, clinic owners, and operational decision-makers feel overwhelmed by the complexity of this regulation, especially in integrating it with hospital information systems (SIMRS) and interoperability platforms such as SatuSehat. This article serves as a comprehensive guide prepared by Nugroho Setiawan, an expert in the field of SIMRS and healthcare system integration, to help you understand the essence of the PDP Law, design an effective technical implementation strategy, and apply best practices to achieve full compliance.

Understanding the Foundations of the PDP Law for Healthcare Services

The PDP Law No. 27 of 2022 defines Personal Data as any data about an individual who is identified or can be identified individually or in combination with other information. Specifically, healthcare services deal with Sensitive Personal Data which according to Article 4 paragraph (2) includes health data and information, biometric data, genetic data, criminal records, children's data, personal financial data, and other data in accordance with the provisions of laws and regulations. For hospitals, this means that all electronic medical records, laboratory results, disease history, diagnoses, and patient genetic information fall into the category of data requiring extra strict protection. Violations of these provisions can result in administrative fines of up to IDR 6 billion and criminal sanctions as stipulated in Article 57 and Chapter XIII of the PDP Law.

As a Personal Data Controller, hospitals have a series of crucial obligations. First, data processing must have a clear legal basis, the most common being explicit consent from the data subject (patient). This consent must be specific, given voluntarily, and can be withdrawn at any time by the patient. Second, hospitals must ensure that the purposes of data processing are specific, lawful, and informed to the patient. For example, data for treatment purposes differs from data for research or publication, and each requires different consent.

Third, hospitals must apply the principle of data minimization, namely only collecting data that is truly relevant and necessary according to the purpose. Fourth, data security is a top priority, encompassing technical and organizational measures to prevent unauthorized access, disclosure, alteration, or deletion of data. This includes data encryption, strict access management, and audit trails. Fifth, patients as Data Subjects have fundamental rights, including the right to access their data, request correction, deletion, restriction of processing, and withdrawal of consent. Hospitals are required to facilitate the exercise of these rights with clear and easily accessible procedures. Understanding these foundations is an absolute first step before moving to technical implementation.

Technical Implementation Strategy in SIMRS and Integration

Compliance with the PDP Law requires hospitals to overhaul or optimize their existing information system architecture, especially SIMRS and other integration systems. The main principle is Privacy by Design, which means privacy must be considered from the outset of system design, not as an add-on. This includes the application of data minimization (collecting only necessary data), pseudonymization (replacing direct identities with artificial identifiers), and anonymization (removing all identifying information) for data that does not require direct identification, especially for statistical or research purposes.

The technical security aspect is the heart of PDP Law implementation. All personal data, both when stored (data at-rest) and when in transit (data in-transit), must be encrypted. For data at-rest, AES-256 encryption at the database or disk level is the industry standard. For example, the use of Transparent Data Encryption (TDE) on PostgreSQL 16 or selective column encryption for highly sensitive data such as national ID numbers or medical record numbers. For data in-transit, secure communication protocols such as TLS 1.2 or TLS 1.3 must be used for all data exchanges, including internal APIs or bridging to external parties.

Access management is another important pillar. Implement strict Role-Based Access Control (RBAC) on your SIMRS. A concrete example: a doctor may only access the medical records of patients under their responsibility, registration staff only see demographic data, and finance staff only payment data. Every access must be recorded in a comprehensive audit trail, including who accessed, when, from where, and what data was accessed. Systems such as the `pg_audit` extension on PostgreSQL 16 can help record database activity in detail. For backend applications such as those built with Laravel 11.x, the `spatie/laravel-permission` package is very effective for managing user roles and permissions, while `laravel-auditing` can record every data change.

Integration with SatuSehat is a crucial area. This platform facilitates the exchange of health data between facilities, which means sensitive data will be transferred. Hospitals must ensure that authorization and authentication mechanisms comply with FHIR R4 standards and are secure. The data exchanged must comply with patient consent and the principle of data minimization. The use of FHIR R4 supported by HAPI FHIR 6.8 as a FHIR server will help standardize and secure data exchange. In addition, integration tools such as Mirth Connect 4.4 must also be configured to ensure proper encryption and authorization when processing HL7 v2.5.1 or other formats. For encryption key management, services such as AWS KMS (Key Management Service) or Azure Key Vault are highly recommended to keep keys secure and isolated from the main application.

Example Code and Data Security Configuration

To provide a concrete illustration, here is an example implementation of encrypting sensitive data at the application level using Laravel 11.x and audit logging configuration on PostgreSQL 16. This implementation shows how vital data such as NIK or medical data can be protected even if the database is accessed unauthorized.

Encrypting Sensitive Data in the Application (Laravel Backend)

In a Laravel-based application, you can use the `Crypt` facade to encrypt and decrypt strings. This is very useful for protecting certain columns in the database that contain sensitive personal data. The example below shows how you can integrate this encryption directly into your Eloquent model.

<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Crypt; class Pasien extends Model { protected $fillable = ['nama', 'nik', 'alamat', 'telepon', 'data_medis_terenkripsi']; protected $casts = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; public function setNikAttribute($value) { $this->attributes['nik'] = Crypt::encryptString($value); } public function getNikAttribute($value) { try { return Crypt::decryptString($value); } catch (\Illuminate\Contracts\Encryption\DecryptException $e) { // Log the error or handle it appropriately return null; } } public function setDataMedisTerenkripsiAttribute($value) { $this->attributes['data_medis_terenkripsi'] = Crypt::encryptString($value); } public function getDataMedisTerenkripsiAttribute($value) { try { return Crypt::decryptString($value); } catch (\Illuminate\Contracts\Encryption\DecryptException $e) { // Log the error or handle it appropriately return null; } } } 

Code Explanation: This `Pasien` model has mutators `setNikAttribute` and `setDataMedisTerenkripsiAttribute` that will automatically encrypt the NIK value and sensitive medical data before being stored in the database. Conversely, the mutators `getNikAttribute` and `getDataMedisTerenkripsiAttribute` will decrypt those values when data is retrieved from the database. This ensures that sensitive data is always stored in encrypted format. The encryption key (`APP_KEY`) must be stored very securely in the `.env` file and must not be exposed. Ensure `APP_KEY` is generated with `php artisan key:generate` and rotated regularly.

Audit Logging Configuration in PostgreSQL 16

Audit logging is vital evidence of PDP Law compliance. PostgreSQL 16 can be configured to record every database activity in detail, including `SELECT`, `INSERT`, `UPDATE`, and `DELETE` operations. The `pg_audit` extension is a very effective solution for this purpose. Here is an example configuration in the `postgresql.conf` file and SQL commands to enable it.

# Configuration in postgresql.conf shared_preload_libraries = 'pgaudit' pgaudit.log = 'READ, WRITE' # Log all read and write operations pgaudit.log_level = log pgaudit.log_catalog = off # Do not log access to system catalog tables pgaudit.log_client = on pgaudit.log_relation = on # Log access to relations (tables) pgaudit.log_statement_parameters = on # Log statement parameters pgaudit.log_duration = off pgaudit.log_buffer_size = 1024 pgaudit.role = 'pgaudit_role' # Create this role and grant it to the user that needs to be audited log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' log_rotation_age = 1d log_rotation_size = 10MB log_min_duration_statement = 0 # Log all statements, without duration filter  -- After the configuration is changed, restart PostgreSQL. -- Then, create a special role for pg_audit (optional, but recommended): CREATE ROLE pgaudit_role NOINHERIT; GRANT pgaudit_role TO your_database_user; -- Replace 'your_database_user' with your application user. 

Configuration Explanation: With the configuration `pgaudit.log = 'READ, WRITE'`, every read and write operation on the database will be recorded. This allows you to track who accessed patient data, when, and what operations were performed. `pgaudit.log_statement_parameters = on` is very important because it records the parameters used in queries, providing full context about the data accessed or modified. These logs can then be integrated with a SIEM (Security Information and Event Management) system for real-time monitoring and incident analysis. Ensure the log directory has proper permissions and logs are rotated regularly to prevent disk exhaustion.

Handling Data Exchange and Incidents

Health data exchange, especially with platforms like SatuSehat, is a high-risk area that requires special attention to the PDP Law. The data exchanged must comply with the agreed purpose and patient consent. Here, the FHIR R4 standard plays an important role in ensuring data is structured and secure.

Example FHIR Payload (JSON) with Pseudonymization

In a data exchange scenario for research or statistical purposes, where direct patient identity is not required, hospitals can implement pseudonymization. The following is an example of a partially pseudonymized FHIR `Patient` payload:

{ "resourceType": "Patient", "id": "pasien-anonim-123", "meta": { "lastUpdated": "2024-05-20T10:00:00Z" }, "identifier": [ { "use": "usual", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "http://sys.rs-sehat-sentosa.id/mrn", "value": "MRN-PSEUDO-001" } ], "active": true, "name": [ { "use": "official", "family": "Xxxxx", "given": ["Yyyyy"] } ], "gender": "female", "birthDate": "1985-07-15", "address": [ { "use": "home", "line": ["Jl. Rahasia No. 123"], "city": "Jakarta", "state": "DKI Jakarta", "postalCode": "10000", "country": "ID" } ], "maritalStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus", "code": "M" } ], "text": "Married" }, "contact": [ { "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0131", "code": "N" } ] } ], "name": { "family": "Zzzzz", "given": ["Wwwww"] }, "telecom": [ { "system": "phone", "value": "08XX-XXXX-XXXX", "use": "mobile" } ] } ] } 

Payload Explanation: In this example, fields that can directly identify the patient such as name (`family`, `given`), address (`line`, `city`, `state`, `postalCode`), and phone number (`telecom`) have been changed to placeholders or pseudonym values (`Xxxxx`, `Yyyyy`, `Jl. Rahasia No. 123`, `08XX-XXXX-XXXX`). Patient identification now uses `MRN-PSEUDO-001` as the `identifier` value which does not directly refer to the original identity. This approach allows data to be used for secondary purposes (e.g., health trend analysis) without compromising individual privacy.

Example Error Messages from Integration and Their Handling

In data exchange with external systems such as SatuSehat, authorization or access errors are common. The following is an example of an error message that might be received and how the hospital should handle it:

{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Access denied: Insufficient scope or invalid authorization token for Patient resource with id 'patient-sensitive-001'. Required scope: patient/*.read" } } ] } 

Error Explanation and Handling: This error, with `code: "forbidden"` and a clear `details.text`, indicates that the hospital application does not have sufficient permissions (insufficient scope) or the authorization token (JWT) used is invalid or expired to access the `Patient` resource with a specific ID. To handle it, the hospital IT team must immediately: (1) Verify Authorization Token: Ensure the JWT token used is still valid and has not expired. (2) Check Access Scope: Ensure the application has requested and been granted the appropriate access scope, such as `patient/*.read` to read patient data. (3) Audit Application Log: Check the application and identity system logs (e.g., Keycloak or OAuth2 server) to trace the authorization request and response. (4) Notification: If this is a security incident (e.g., unauthorized access attempt by a third party), activate the data incident handling procedure.

The data breach response plan is a crucial element of PDP Law compliance. This plan must include the following steps: (1) Identification: Detect incidents through log monitoring or SIEM systems. (2) Isolation: Isolate affected systems or data to prevent spread. (3) Investigation: Investigate the cause, scope, and impact of the incident. (4) Mitigation: Take immediate corrective measures. (5) Notification: Notify data subjects (patients) and Kominfo within 3x24 hours from the discovery of the incident, in accordance with Article 46 of the PDP Law. (6) Recovery: Restore systems to normal conditions. (7) Prevention: Implement measures to prevent similar incidents in the future, including routine patch management, penetration testing, and periodic vulnerability assessment.

Best Practices in PDP Law Compliance

Achieving and maintaining PDP Law compliance is a continuous journey that requires commitment from the entire organization. The following are best practices that hospitals can implement:

  1. Form an Internal PDP Team and Appoint a DPO: In accordance with Article 43 of the PDP Law, hospitals that process personal data on a large scale or sensitive data are required to appoint a Data Protection Officer (DPO). Form a cross-functional team (IT, Legal, Operations, Medical) to formulate policies, monitor implementation, and handle incidents.
  2. Comprehensive Data Audit and Inventory: Conduct a thorough mapping of all personal data managed by the hospital. Identify data sources, processing purposes, retention periods, storage locations, and who has access. Use a data flow matrix for better visualization and control.
  3. Develop a Clear and Transparent Privacy Policy: Create a privacy policy document that is easy to understand, explaining how patient data is collected, used, stored, and deleted. Ensure this policy is easily accessible to patients through the hospital website or at the registration desk.
  4. Apply the Principles of Data Minimization and Privacy by Design: From the outset of designing any new system or process, ensure that only truly relevant data is collected and treat privacy as an integral part of the design. Use pseudonymization or anonymization whenever possible, especially for data used for secondary purposes.
  5. Strengthen Technical Security and Infrastructure: Implement end-to-end encryption for all sensitive data, apply strict Role-Based Access Control (RBAC) to the SIMRS, and enable comprehensive audit logs. Conduct penetration testing and vulnerability assessments routinely at least once a year to identify and fix security gaps.
  6. Continuous Employee Training: Educate all hospital staff, from doctors to administrative staff, about the importance of personal data protection, internal policies, and data handling procedures. Employee awareness and understanding are the first line of defense against data breaches.
  7. A Mature Data Breach Response Plan: Prepare clear and documented procedures to detect, respond to, and report personal data incidents in accordance with Article 46 of the PDP Law. Conduct regular incident simulations to ensure the team is ready to act quickly and effectively when a real incident occurs.
  8. Evaluation and Contracts of Third-Party Vendors: Ensure that all vendors or third parties with access to patient data (for example, cloud providers, SIMRS developers, integrators) have data security commitments and standards equal to or higher than your hospital's. Include strict personal data protection clauses in every cooperation contract.
  9. Implementation of a Granular Consent Management System: Build a module in the SIMRS or registration system to record patient consent specifically and granularly. This allows patients to give separate consent for treatment, research, or data sharing with third parties, and facilitates easy withdrawal of consent.

FAQ About the PDP Law and Hospitals

The following are some common questions that often arise regarding the implementation of the PDP Law in the hospital environment:

1. What is the difference between Personal Data and Sensitive Personal Data according to the PDP Law?

Personal Data is any data about an individual who is identified or can be identified on their own or in combination with other information. Examples include name, ID number, address. Sensitive Personal Data, as stipulated in Article 4 paragraph (2) of the PDP Law, is a special category that includes health data and information, biometrics, genetics, criminal records, children's data, personal financial data, and other data that may give rise to discrimination or greater harm. Hospitals manage both, with the main focus on health data, which falls into the sensitive category.

2. How should hospitals obtain patient consent for data processing?

Consent must be explicit, specific, and given voluntarily. This means the hospital must clearly inform patients of the purpose of data processing and obtain verifiable written or electronic consent. Patients must have the option to withdraw their consent at any time. In the context of SIMRS, this can be implemented through a digital form or checkbox that patients must fill in at registration or before medical procedures, with a transparent explanation.

3. What are the sanctions if a hospital violates the PDP Law?

Sanctions for violating the PDP Law can be very severe. Article 57 of the PDP Law provides for administrative sanctions in the form of written warnings, temporary suspension of data processing activities, and administrative fines of up to Rp6 billion. In addition, Chapter XIII of the PDP Law also provides for criminal sanctions that vary depending on the type of violation, ranging from imprisonment of up to 6 years and/or fines of up to Rp60 billion. These sanctions apply to both institutions and responsible individuals.

4. How does the PDP Law affect integration with SatuSehat?

Integration with the SatuSehat platform is strongly affected by the PDP Law. Data exchanged to SatuSehat must be based on patient consent and the principle of data minimization. Hospitals must ensure that the authorization and authentication mechanisms used comply with FHIR standards and are secure. Only data that is relevant and necessary for legitimate medical purposes may be exchanged, and the entire process must be transparent and recorded in an audit trail.

5. What is the role of the Data Protection Officer (DPO) in a hospital?

A Data Protection Officer (DPO) is an individual or team appointed to oversee a hospital's compliance with the PDP Law. The DPO's duties include providing advice regarding PDP obligations, acting as a point of contact for data subjects (patients) and the supervisory authority (Kominfo), and conducting internal compliance audits. The appointment of a DPO is an obligation for Data Controllers that process personal data on a large scale or sensitive personal data, such as hospitals.

6. Can patients request that their data be deleted or changed? What is the process?

Yes, Data Subjects have the right to withdraw consent, request deletion, or correction of their inaccurate data. Hospitals are required to provide an easily accessible mechanism for patients to submit these requests. The process must be well documented and carried out within a reasonable time limit, for example 7x24 hours from when the request is received. Exceptions may apply to data that must be retained under other laws and regulations, such as medical records that have a certain retention period.

Compliance with the Personal Data Protection Law is not merely a legal obligation, but a strategic investment to build and maintain patient trust. It requires a holistic approach that integrates policies, processes, and technology. Do not let regulatory complexity hinder your hospital. Nugroho Setiawan and his team are ready to be your partner in navigating the landscape of the PDP Law, from comprehensive system audits, development of SIMRS compatible with the latest security and privacy standards, to implementation of secure and efficient SatuSehat integration. We offer technology solutions designed for the specific needs of your healthcare facility, ensuring patient data is protected and operations run smoothly. Contact us today for a free consultation or demo of our solutions, and let us create a hospital that is secure and data compliant.

Terakhir diperbarui 17 Oct 2026

Komentar

Komentar ditinjau sebelum tampil.

Belum ada komentar. Jadilah yang pertama!