Skip to content

fix: ensure boolean status is correctly converted to string in rawatInap method#7

Merged
indravscode merged 4 commits into
mainfrom
pcare
Jul 8, 2026
Merged

fix: ensure boolean status is correctly converted to string in rawatInap method#7
indravscode merged 4 commits into
mainfrom
pcare

Conversation

@indravscode

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 8, 2026 07:24
@indravscode indravscode merged commit bcfcc33 into main Jul 8, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates PCare service helpers to ensure request URLs and endpoints match the expected BPJS API formats, including a fix for boolean-to-string conversion and adding a missing update operation for kunjungan.

Changes:

  • Convert rawatInap boolean status into "true"/"false" strings before appending to the statuspulang feature path.
  • Add an update() method to Kunjungan that performs a PUT to kunjungan/v1 and returns the decoded response.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/PCare/StatusPulang.php Ensures rawatInap status is appended as "true"/"false" instead of PHP’s default boolean string casting.
src/PCare/Kunjungan.php Adds a PUT-based update() operation for the kunjungan/v1 endpoint to complement the existing store().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


public function rawatInap($status = true)
{
$status = $status ? 'true' : 'false';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants