forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading AllergyIntolerance Resource (openemr#3736)
* Upgrading AllergyIntolerance Resource Signed-off-by: Yash Bothra <[email protected]> * Fixed Multiple Line issue Signed-off-by: Yash Bothra <[email protected]> * Added allergyintolerance-verification valueset Signed-off-by: Yash Bothra <[email protected]> * Added verificationStatus AND codes (diagnosis) Signed-off-by: Yash Bothra <[email protected]> * Fixes Signed-off-by: Yash Bothra <[email protected]> * Fixes -2 Signed-off-by: Yash Bothra <[email protected]> * Fixes Signed-off-by: Yash Bothra <[email protected]> * Updated Docs Signed-off-by: Yash Bothra <[email protected]> * Fixes * Added New Endpoint Signed-off-by: Yash Bothra <[email protected]> * Fix Signed-off-by: Yash Bothra <[email protected]> * Fix Signed-off-by: Yash Bothra <[email protected]> * Changed Restcontrollers Signed-off-by: Yash Bothra <[email protected]> * Comment Fix Signed-off-by: Yash Bothra <[email protected]> * Upgraded All endpoint to Support UUID Signed-off-by: Yash Bothra <[email protected]> * Fixed Some Ooopsie Signed-off-by: Yash Bothra <[email protected]> * Using lookup_code_descriptions() function Signed-off-by: Yash Bothra <[email protected]> * Fixed UI Issue Signed-off-by: Yash Bothra <[email protected]> * Indentation Signed-off-by: Yash Bothra <[email protected]> * Fixes Signed-off-by: Yash Bothra <[email protected]> * PSR fix Signed-off-by: Yash Bothra <[email protected]> * PSR Fix Signed-off-by: Yash Bothra <[email protected]>
- Loading branch information
1 parent
f078e1a
commit 632cf25
Showing
13 changed files
with
1,333 additions
and
865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,18 @@ | |
* @author Matthew Vita <[email protected]> | ||
* @author Jerry Padgett <[email protected]> | ||
* @author Brady Miller <[email protected]> | ||
* @author Yash Raj Bothra <[email protected]> | ||
* @copyright Copyright (c) 2018 Matthew Vita <[email protected]> | ||
* @copyright Copyright (c) 2018-2020 Jerry Padgett <[email protected]> | ||
* @copyright Copyright (c) 2019 Brady Miller <[email protected]> | ||
* @copyright Copyright (c) 2020 Yash Raj Bothra <[email protected]> | ||
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 | ||
*/ | ||
|
||
// Lets keep our controller classes with the routes. | ||
// | ||
use OpenEMR\Common\Uuid\UuidRegistry; | ||
use OpenEMR\RestControllers\AllergyIntoleranceRestController; | ||
use OpenEMR\RestControllers\FacilityRestController; | ||
use OpenEMR\RestControllers\VersionRestController; | ||
use OpenEMR\RestControllers\ProductRegistrationRestController; | ||
|
@@ -172,27 +175,35 @@ | |
RestConfig::authorization_check("patients", "med"); | ||
return (new ListRestController())->delete($pid, $mid, "medical_problem"); | ||
}, | ||
"GET /api/patient/:pid/allergy" => function ($pid) { | ||
"GET /api/allergy" => function () { | ||
RestConfig::authorization_check("patients", "med"); | ||
return (new ListRestController())->getAll($pid, "allergy"); | ||
return (new AllergyIntoleranceRestController())->getAll(); | ||
}, | ||
"GET /api/patient/:pid/allergy/:aid" => function ($pid, $aid) { | ||
"GET /api/allergy/:auuid" => function ($auuid) { | ||
RestConfig::authorization_check("patients", "med"); | ||
return (new ListRestController())->getOne($pid, "allergy", $aid); | ||
return (new AllergyIntoleranceRestController())->getOne($auuid); | ||
}, | ||
"DELETE /api/patient/:pid/allergy/:aid" => function ($pid, $aid) { | ||
"GET /api/patient/:puuid/allergy" => function ($puuid) { | ||
RestConfig::authorization_check("patients", "med"); | ||
return (new ListRestController())->delete($pid, $aid, "allergy"); | ||
return (new AllergyIntoleranceRestController())->getAll(['lists.pid' => $puuid]); | ||
}, | ||
"POST /api/patient/:pid/allergy" => function ($pid) { | ||
"GET /api/patient/:puuid/allergy/:auuid" => function ($puuid, $auuid) { | ||
RestConfig::authorization_check("patients", "med"); | ||
return (new AllergyIntoleranceRestController())->getAll(['lists.pid' => $puuid, 'lists.id' => $auuid]); | ||
}, | ||
"POST /api/patient/:puuid/allergy" => function ($puuid) { | ||
RestConfig::authorization_check("patients", "med"); | ||
$data = (array) (json_decode(file_get_contents("php:https://input"))); | ||
return (new ListRestController())->post($pid, "allergy", $data); | ||
return (new AllergyIntoleranceRestController())->post($puuid, $data); | ||
}, | ||
"PUT /api/patient/:pid/allergy/:aid" => function ($pid, $aid) { | ||
"PUT /api/patient/:puuid/allergy/:auuid" => function ($puuid, $auuid) { | ||
RestConfig::authorization_check("patients", "med"); | ||
$data = (array) (json_decode(file_get_contents("php:https://input"))); | ||
return (new ListRestController())->put($pid, $aid, "allergy", $data); | ||
return (new AllergyIntoleranceRestController())->put($puuid, $auuid, $data); | ||
}, | ||
"DELETE /api/patient/:puuid/allergy/:auuid" => function ($puuid, $auuid) { | ||
RestConfig::authorization_check("patients", "med"); | ||
return (new AllergyIntoleranceRestController())->delete($puuid, $auuid); | ||
}, | ||
"GET /api/patient/:pid/medication" => function ($pid) { | ||
RestConfig::authorization_check("patients", "med"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.