Skip to content

Commit

Permalink
fixing database switching issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kchapple committed Dec 20, 2016
1 parent eaf7de7 commit c850400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Adapters/FHIRAppointmentAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public function interfaceToModel(AppointmentInterface $appointment)
$value = new FHIRString();
$providerRepo = new ProviderRepository();
$user = Auth::user();
$provider = $providerRepo->findByEmrIdfindByEmrIdAndConnection( $appointment->getProviderId(), $user->connection );
$provider = $providerRepo->findByEmrIdAndConnection( $appointment->getProviderId(), $user->connection );
$authId = $provider->getId();
$value->setValue( $authId );
$valueProviderId->setValueString($value);
Expand Down
4 changes: 4 additions & 0 deletions src/Adapters/FHIRSlotAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public function getSlots(Request $request)

if (!empty($request->server->get('QUERY_STRING'))) {
$data = $this->parseUrl($request->server->get('QUERY_STRING'));
$authProviderId = $data['provider'];
$providerRepo = new ProviderRepository();
$provider = $providerRepo->get( $authProviderId );
$data['provider'] = $provider->getEmrId();
$collection = $this->repository->getSlots($data);
} else {
$data['startDate'] = date('Y-m-d');
Expand Down

0 comments on commit c850400

Please sign in to comment.