update create e-prescription

This commit is contained in:
2024-04-30 10:11:11 +07:00
parent 2c4fe723dc
commit 8aa67c1864
19 changed files with 2234 additions and 28 deletions

View File

@@ -211,6 +211,24 @@ class RequestLogController extends Controller
});
return Helper::responseJson(data: $manipulatedIcds);
}
public function hospitals(){
$organizations = Organization::query()
->where([
'type' => 'hospital',
'status' => 'active',
])
->get();
$manipulatedOrganizations = $organizations->map(function ($organization) {
// Contoh manipulasi, tambahkan atau ubah properti sesuai kebutuhan
return [
'value' => $organization->id, // Ganti dengan properti yang sesuai dari model Icd
'label' => $organization->name, // Ganti dengan properti yang sesuai dari model Icd
];
});
return Helper::responseJson(data: $manipulatedOrganizations);
}
/**
* Show the form for editing the specified resource.