config('pacs.api.endpoint'), ]); } public function getStudies(): array { $url = '/studies?'.http_build_query(['expand' => '1']); $response = $this->getClient()->get($url); $studies = json_decode($response->getBody()->getContents(), true); $result = []; foreach ($studies as $study) { $study['ReceiveDateTime'] = Carbon::parse($study['LastUpdate'], 'UTC'); $study['StudyDateTime'] = Carbon::createFromFormat('Ymd His.u', $study['MainDicomTags']['StudyDate'].' '.$study['MainDicomTags']['StudyTime'], 'UTC'); $result[] = $study; } return $result; } }