diff --git a/.stylelintrc.json b/.stylelintrc.json index 900dc572bca..1150dde87ef 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -2,6 +2,9 @@ "plugins": ["stylelint-order", "stylelint-scss"], "extends": "stylelint-config-standard", "extends": "stylelint-config-sass-guidelines", + "ignoreFiles": [ + "swagger/*.css" + ], "rules": { "selector-no-qualifying-type": [true, { "ignore": ["attribute", "class", "id"] diff --git a/API_README.md b/API_README.md index 69af73358da..dac147c58fd 100644 --- a/API_README.md +++ b/API_README.md @@ -120,6 +120,86 @@ OpenEMR uses OIDC compliant authorization for API. SSL is required and setting b #### Scopes This is a listing of scopes: +- `openid` (Generic mandatory scope) +- `fhirUser` +- `online_access` +- `offline_access` (Will signal server to provide a refresh token) +- `launch` +- `launch/patient` +- `api:fhir` (fhir which are the /fhir/ endpoints) + - `patient/AllergyIntolerance.read` + - `patient/CarePlan.read` + - `patient/CareTeam.read` + - `patient/Condition.read` + - `patient/Device.read` + - `patient/DiagnosticReport.read` + - `patient/DocumentReference.read` + - `patient/Encounter.read` + - `patient/Goal.read` + - `patient/Immunization.read` + - `patient/Location.read` + - `patient/Medication.read` + - `patient/MedicationRequest.read` + - `patient/Observation.read` + - `patient/Organization.read` + - `patient/Patient.read` + - `patient/Person.read` + - `patient/Practitioner.read` + - `patient/Procedure.read` + - `patient/Provenance.read` + - `system/AllergyIntolerance.read` + - `system/CarePlan.read` + - `system/CareTeam.read` + - `system/Condition.read` + - `system/Coverage.read` + - `system/Device.read` + - `system/DiagnosticReport.read` + - `system/Document.read` (used for Bulk FHIR export downloads) + - `system/DocumentReference.read` + - `system/Encounter.read` + - `system/Goal.read` + - `system/Group.read` + - `system/Group.$export` (???) + - `system/Immunization.read` + - `system/Location.read` + - `system/Medication.read` + - `system/MedicationRequest.read` + - `system/Observation.read` + - `system/Organization.read` + - `system/Patient.read` + - `system/Patient.$export` (???) + - `system/Person.read` + - `system/Practitioner.read` + - `system/PractitionerRole.read` + - `system/Procedure.read` + - `system/Provenance.read` + - `system/*.$bulkdata-status` (???) + - `system/*.$export` (???) + - `user/AllergyIntolerance.read` + - `user/CarePlan.read` + - `user/CareTeam.read` + - `user/Condition.read` + - `user/Coverage.read` + - `user/Device.read` + - `user/DiagnosticReport.read` + - `user/DocumentReference.read` + - `user/Encounter.read` + - `user/Goal.read` + - `user/Immunization.read` + - `user/Location.read` + - `user/Medication.read` + - `user/MedicationRequest.read` + - `user/Observation.read` + - `user/Organization.read` + - `user/Organization.write` + - `user/Patient.read` + - `user/Patient.write` + - `user/Person.read` + - `user/Practitioner.read` + - `user/Practitioner.write` + - `user/PractitionerRole.read` + - `user/Procedure.read` + - `user/Provenance.read` - `api:oemr` (user api which are the /api/ endpoints) - `user/allergy.read` - `user/allergy.write` @@ -158,34 +238,6 @@ This is a listing of scopes: - `user/surgery.write` - `user/vital.read` - `user/vital.write` -- `api:fhir` (fhir which are the /fhir/ endpoints) - - `patient/AllergyIntolerance.read` - - `patient/CareTeam.read` - - `patient/Condition.read` - - `patient/Encounter.read` - - `patient/Immunization.read` - - `patient/MedicationRequest.read` - - `patient/Observation.read` - - `patient/Patient.read` - - `patient/Procedure.read` - - `user/AllergyIntolerance.read` - - `user/CareTeam.read` - - `user/Condition.read` - - `user/Coverage.read` - - `user/Encounter.read` - - `user/Immunization.read` - - `user/Location.read` - - `user/Medication.read` - - `user/MedicationRequest.read` - - `user/Observation.read` - - `user/Organization.read` - - `user/Organization.write` - - `user/Patient.read` - - `user/Patient.write` - - `user/Practitioner.read` - - `user/Practitioner.write` - - `user/PractitionerRole.read` - - `user/Procedure.read` - `api:port` (patient api which are the /portal/ endpoints) (EXPERIMENTAL) - `patient/encounter.read` - `patient/patient.read` diff --git a/_rest_routes.inc.php b/_rest_routes.inc.php index 046a5a119fa..9970be5313e 100644 --- a/_rest_routes.inc.php +++ b/_rest_routes.inc.php @@ -12,11 +12,152 @@ * @author Yash Raj Bothra * @copyright Copyright (c) 2018 Matthew Vita * @copyright Copyright (c) 2018-2020 Jerry Padgett - * @copyright Copyright (c) 2019 Brady Miller + * @copyright Copyright (c) 2019-2021 Brady Miller * @copyright Copyright (c) 2020 Yash Raj Bothra * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ +/** + * @OA\Info(title="OpenEMR API", version="6.1.0") + * @OA\Server(url="/apis/default/") + * @OA\SecurityScheme( + * securityScheme="openemr_auth", + * type="oauth2", + * @OA\Flow( + * authorizationUrl="/oauth2/default/authorize", + * tokenUrl="/oauth2/default/token", + * flow="authorizationCode", + * scopes={ + * "openid": "Generic mandatory scope", + * "offline_access": "Will signal server to provide a refresh token", + * "api:fhir": "FHIR R4 API", + * "patient/AllergyIntolerance.read": "Read allergy intolerance resources for the current patient (api:fhir)", + * "patient/CarePlan.read": "Read care plan resources for the current patient (api:fhir)", + * "patient/CareTeam.read": "Read care team resources for the current patient (api:fhir)", + * "patient/Condition.read": "Read condition resources for the current patient (api:fhir)", + * "patient/Device.read": "Read device resources for the current patient (api:fhir)", + * "patient/DiagnosticReport.read": "Read diagnostic report resources for the current patient (api:fhir)", + * "patient/DocumentReference.read": "Read document reference resources for the current patient (api:fhir)", + * "patient/Encounter.read": "Read encounter resources for the current patient (api:fhir)", + * "patient/Goal.read": "Read goal resources for the current patient (api:fhir)", + * "patient/Immunization.read": "Read immunization resources for the current patient (api:fhir)", + * "patient/Location.read": "Read location resources for the current patient (api:fhir)", + * "patient/Medication.read": "Read medication resources for the current patient (api:fhir)", + * "patient/MedicationRequest.read": "Read medication request resources for the current patient (api:fhir)", + * "patient/Observation.read": "Read observation resources for the current patient (api:fhir)", + * "patient/Organization.read": "Read organization resources for the current patient (api:fhir)", + * "patient/Patient.read": "Read patient resource for the current patient (api:fhir)", + * "patient/Person.read": "Read person resources for the current patient (api:fhir)", + * "patient/Practitioner.read": "Read practitioner resources for the current patient (api:fhir)", + * "patient/Procedure.read": "Read procedure resources for the current patient (api:fhir)", + * "patient/Provenance.read": "Read provenance resources for the current patient (api:fhir)", + * "system/AllergyIntolerance.read": "Read all allergy intolerance resources in the system (api:fhir)", + * "system/CarePlan.read": "Read all care plan resources in the system (api:fhir)", + * "system/CareTeam.read": "Read all care team resources in the system (api:fhir)", + * "system/Condition.read": "Read all condition resources in the system (api:fhir)", + * "system/Coverage.read": "Read all coverage resources in the system (api:fhir)", + * "system/Device.read": "Read all device resources in the system (api:fhir)", + * "system/DiagnosticReport.read": "Read all diagnostic report resources in the system (api:fhir)", + * "system/Document.read": "Read all document resources in the system (api:fhir)", + * "system/DocumentReference.read": "Read all document reference resources in the system (api:fhir)", + * "system/Encounter.read": "Read all encounter resources in the system (api:fhir)", + * "system/Goal.read": "Read all goal resources in the system (api:fhir)", + * "system/Group.read": "Read all group resources in the system (api:fhir)", + * "system/Immunization.read": "Read all immunization resources in the system (api:fhir)", + * "system/Location.read": "Read all location resources in the system (api:fhir)", + * "system/Medication.read": "Read all medication resources in the system (api:fhir)", + * "system/MedicationRequest.read": "Read all medication request resources in the system (api:fhir)", + * "system/Observation.read": "Read all observation resources in the system (api:fhir)", + * "system/Organization.read": "Read all organization resources in the system (api:fhir)", + * "system/Patient.read": "Read all patient resources in the system (api:fhir)", + * "system/Person.read": "Read all person resources in the system (api:fhir)", + * "system/Practitioner.read": "Read all practitioner resources in the system (api:fhir)", + * "system/PractitionerRole.read": "Read all practitioner role resources in the system (api:fhir)", + * "system/Procedure.read": "Read all procedure resources in the system (api:fhir)", + * "system/Provenance.read": "Read all provenance resources in the system (api:fhir)", + * "user/AllergyIntolerance.read": "Read all allergy intolerance resources the user has access to (api:fhir)", + * "user/CarePlan.read": "Read all care plan resources the user has access to (api:fhir)", + * "user/CareTeam.read": "Read all care team resources the user has access to (api:fhir)", + * "user/Condition.read": "Read all condition resources the user has access to (api:fhir)", + * "user/Coverage.read": "Read all coverage resources the user has access to (api:fhir)", + * "user/Device.read": "Read all device resources the user has access to (api:fhir)", + * "user/DiagnosticReport.read": "Read all diagnostic report resources the user has access to (api:fhir)", + * "user/DocumentReference.read": "Read all document reference resources the user has access to (api:fhir)", + * "user/Encounter.read": "Read all encounter resources the user has access to (api:fhir)", + * "user/Goal.read": "Read all goal resources the user has access to (api:fhir)", + * "user/Immunization.read": "Read all immunization resources the user has access to (api:fhir)", + * "user/Location.read": "Read all location resources the user has access to (api:fhir)", + * "user/Medication.read": "Read all medication resources the user has access to (api:fhir)", + * "user/MedicationRequest.read": "Read all medication request resources the user has access to (api:fhir)", + * "user/Observation.read": "Read all observation resources the user has access to (api:fhir)", + * "user/Organization.read": "Read all organization resources the user has access to (api:fhir)", + * "user/Organization.write": "Write all organization resources the user has access to (api:fhir)", + * "user/Patient.read": "Read all patient resources the user has access to (api:fhir)", + * "user/Patient.write": "Write all patient resources the user has access to (api:fhir)", + * "user/Person.read": "Read all person resources the user has access to (api:fhir)", + * "user/Practitioner.read": "Read all practitioner resources the user has access to (api:fhir)", + * "user/Practitioner.write": "Write all practitioner resources the user has access to (api:fhir)", + * "user/PractitionerRole.read": "Read all practitioner role resources the user has access to (api:fhir)", + * "user/Procedure.read": "Read all procedure resources the user has access to (api:fhir)", + * "user/Provenance.read": "Read all provenance resources the user has access to (api:fhir)", + * "api:oemr": "Standard OpenEMR API", + * "user/allergy.read": "Read allergies the user has access to (api:oemr)", + * "user/allergy.write": "Write allergies the user has access to for (api:oemr)", + * "user/appointment.read": "Read appointments the user has access to (api:oemr)", + * "user/appointment.write": "Write appointments the user has access to for (api:oemr)", + * "user/dental_issue.read": "Read dental issues the user has access to (api:oemr)", + * "user/dental_issue.write": "Write dental issues the user has access to (api:oemr)", + * "user/document.read": "Read documents the user has access to (api:oemr)", + * "user/document.write": "Write documents the user has access to (api:oemr)", + * "user/drug.read": "Read drugs the user has access to (api:oemr)", + * "user/encounter.read": "Read encounters the user has access to (api:oemr)", + * "user/encounter.write": "Write encounters the user has access to (api:oemr)", + * "user/facility.read": "Read facilities the user has access to (api:oemr)", + * "user/facility.write": "Write facilities the user has access to (api:oemr)", + * "user/immunization.read": "Read immunizations the user has access to (api:oemr)", + * "user/insurance.read": "Read insurances the user has access to (api:oemr)", + * "user/insurance.write": "Write insurances the user has access to (api:oemr)", + * "user/insurance_company.read": "Read insurance companies the user has access to (api:oemr)", + * "user/insurance_company.write": "Write insurance companies the user has access to (api:oemr)", + * "user/insurance_type.read": "Read insurance types the user has access to (api:oemr)", + * "user/list.read": "Read lists the user has access to (api:oemr)", + * "user/medical_problem.read": "Read medical problems the user has access to (api:oemr)", + * "user/medical_problem.write": "Write medical problems the user has access to (api:oemr)", + * "user/medication.read": "Read medications the user has access to (api:oemr)", + * "user/medication.write": "Write medications the user has access to (api:oemr)", + * "user/message.write": "Read messages the user has access to (api:oemr)", + * "user/patient.read": "Read patients the user has access to (api:oemr)", + * "user/patient.write": "Write patients the user has access to (api:oemr)", + * "user/practitioner.read": "Read practitioners the user has access to (api:oemr)", + * "user/practitioner.write": "Write practitioners the user has access to (api:oemr)", + * "user/prescription.read": "Read prescriptions the user has access to (api:oemr)", + * "user/procedure.read": "Read procedures the user has access to (api:oemr)", + * "user/soap_note.read": "Read soap notes the user has access to (api:oemr)", + * "user/soap_note.write": "Write soap notes the user has access to (api:oemr)", + * "user/surgery.read": "Read surgeries the user has access to (api:oemr)", + * "user/surgery.write": "Write surgeries the user has access to (api:oemr)", + * "user/vital.read": "Read vitals the user has access to (api:oemr)", + * "user/vital.write": "Write vitals the user has access to (api:oemr)", + * "api:port": "Standard Patient Portal OpenEMR API", + * "patient/encounter.read": "Read encounters the patient has access to (api:port)", + * "patient/patient.read": "Write encounters the patient has access to (api:port)" + * } + * ) + * ) + * @OA\Tag( + * name="fhir", + * description="FHIR R4 API" + * ) + * @OA\Tag( + * name="standard", + * description="Standard OpenEMR API" + * ) + * @OA\Tag( + * name="standard-patient", + * description="Standard Patient Portal OpenEMR API" + * ) + */ + // Lets keep our controller classes with the routes. // use OpenEMR\Common\Acl\AccessDeniedException; @@ -47,18 +188,277 @@ // Note that the api route is only for users role // (there is a mechanism in place to ensure only user role can access the api route) RestConfig::$ROUTE_MAP = array( + /** + * @OA\Get( + * path="/api/facility", + * tags={"standard"}, + * @OA\Parameter( + * name="name", + * in="query", + * description="The name for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="facility_npi", + * in="query", + * description="The facility_npi for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="phone", + * in="query", + * description="The phone for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="fax", + * in="query", + * description="The fax for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="street", + * in="query", + * description="The street for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="city", + * in="query", + * description="The city for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="state", + * in="query", + * description="The state for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="postal_code", + * in="query", + * description="The postal_code for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="country_code", + * in="query", + * description="The country_code for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="federal_ein", + * in="query", + * description="The federal_ein for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="website", + * in="query", + * description="The website for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="email", + * in="query", + * description="The email for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="domain_identifier", + * in="query", + * description="The domain_identifier for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="facility_taxonomy", + * in="query", + * description="The facility_taxonomy for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="facility_code", + * in="query", + * description="The facility_code for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="billing_location", + * in="query", + * description="The billing_location setting for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="accepts_assignment", + * in="query", + * description="The accepts_assignment setting for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="oid", + * in="query", + * description="The oid for the facility.", + * required=false + * ), + * @OA\Parameter( + * name="service_location", + * in="query", + * description="The service_location setting for the facility.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of facilities" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/facility" => function () { RestConfig::authorization_check("admin", "users"); $return = (new FacilityRestController())->getAll($_GET); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/facility/{fuuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="fuuid", + * in="path", + * description="The uuid for the facility.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single facility." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/facility/:fuuid" => function ($fuuid) { RestConfig::authorization_check("admin", "users"); $return = (new FacilityRestController())->getOne($fuuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/facility", + * tags={"standard"}, + * @OA\RequestBody( + * required=true, + * @OA\MediaType( + * mediaType="application/json", + * @OA\Schema( + * @OA\Property( + * property="name", + * description="The name for the facility.", + * ), + * @OA\Property( + * property="facility_npi", + * description="The facility_npi for the facility.", + * ), + * @OA\Property( + * property="phone", + * description="The phone for the facility." + * ), + * @OA\Property( + * property="fax", + * description="The fax for the facility." + * ), + * @OA\Property( + * property="street", + * description="The street for the facility." + * ), + * @OA\Property( + * property="city", + * description="The city for the facility." + * ), + * @OA\Property( + * property="state", + * description="The state for the facility." + * ), + * @OA\Property( + * property="postal_code", + * description="The postal_code for the facility." + * ), + * @OA\Property( + * property="country_code", + * description="The country_code for the facility." + * ), + * @OA\Property( + * property="federal_ein", + * description="The federal_ein for the facility." + * ), + * @OA\Property( + * property="website", + * description="The website for the facility." + * ), + * @OA\Property( + * property="email", + * description="The email for the facility." + * ), + * @OA\Property( + * property="domain_identifier", + * description="The domain_identifier for the facility." + * ), + * @OA\Property( + * property="facility_taxonomy", + * description="The facility_taxonomy for the facility." + * ), + * @OA\Property( + * property="facility_code", + * description="The facility_code for the facility." + * ), + * @OA\Property( + * property="billing_location", + * description="The billing_location setting for the facility." + * ), + * @OA\Property( + * property="accepts_assignment", + * description="The accepts_assignment setting for the facility." + * ), + * @OA\Property( + * property="oid", + * description="The oid for the facility." + * ), + * @OA\Property( + * property="service_location", + * description="The service_location setting for the facility." + * ), + * required={"name", "facility_npi"}, + * example={"name": "Aquaria", + * "facility_npi": "123456789123", + * "phone": "808-606-3030", + * "fax": "808-606-3031", + * "street": "1337 Bit Shifter Ln", + * "city": "San Lorenzo", + * "state": "ZZ", + * "postal_code": "54321", + * "country_code": "US", + * "federal_ein": "4343434", + * "website": "https://example.com", + * "email": "foo@bar.com", + * "domain_identifier": "", + * "facility_taxonomy": "", + * "facility_code": "", + * "billing_location": "1", + * "accepts_assignment": "1", + * "oid": "", + * "service_location": "1"} + * ) + * ) + * ), + * @OA\Response( + * response="200", + * description="Creates a facility in the system" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "POST /api/facility" => function () { RestConfig::authorization_check("admin", "super"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -66,6 +466,127 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/facility/{fuuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="fuuid", + * in="path", + * description="The uuid for the facility.", + * required=true + * ), + * @OA\RequestBody( + * required=true, + * @OA\MediaType( + * mediaType="application/json", + * @OA\Schema( + * @OA\Property( + * property="name", + * description="The name for the facility.", + * ), + * @OA\Property( + * property="facility_npi", + * description="The facility_npi for the facility.", + * ), + * @OA\Property( + * property="phone", + * description="The phone for the facility." + * ), + * @OA\Property( + * property="fax", + * description="The fax for the facility." + * ), + * @OA\Property( + * property="street", + * description="The street for the facility." + * ), + * @OA\Property( + * property="city", + * description="The city for the facility." + * ), + * @OA\Property( + * property="state", + * description="The state for the facility." + * ), + * @OA\Property( + * property="postal_code", + * description="The postal_code for the facility." + * ), + * @OA\Property( + * property="country_code", + * description="The country_code for the facility." + * ), + * @OA\Property( + * property="federal_ein", + * description="The federal_ein for the facility." + * ), + * @OA\Property( + * property="website", + * description="The website for the facility." + * ), + * @OA\Property( + * property="email", + * description="The email for the facility." + * ), + * @OA\Property( + * property="domain_identifier", + * description="The domain_identifier for the facility." + * ), + * @OA\Property( + * property="facility_taxonomy", + * description="The facility_taxonomy for the facility." + * ), + * @OA\Property( + * property="facility_code", + * description="The facility_code for the facility." + * ), + * @OA\Property( + * property="billing_location", + * description="The billing_location setting for the facility." + * ), + * @OA\Property( + * property="accepts_assignment", + * description="The accepts_assignment setting for the facility." + * ), + * @OA\Property( + * property="oid", + * description="The oid for the facility." + * ), + * @OA\Property( + * property="service_location", + * description="The service_location setting for the facility." + * ), + * example={"name": "Aquaria", + * "facility_npi": "123456789123", + * "phone": "808-606-3030", + * "fax": "808-606-3031", + * "street": "1337 Bit Shifter Ln", + * "city": "San Lorenzo", + * "state": "ZZ", + * "postal_code": "54321", + * "country_code": "US", + * "federal_ein": "4343434", + * "website": "https://example.com", + * "email": "foo@bar.com", + * "domain_identifier": "", + * "facility_taxonomy": "", + * "facility_code": "", + * "billing_location": "1", + * "accepts_assignment": "1", + * "oid": "", + * "service_location": "1"} + * ) + * ) + * ), + * @OA\Response( + * response="200", + * description="Updates a facility in the system" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "PUT /api/facility/:fuuid" => function ($fuuid) { RestConfig::authorization_check("admin", "super"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -73,12 +594,129 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/patient", + * tags={"standard"}, + * @OA\Parameter( + * name="fname", + * in="query", + * description="The first name for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="lname", + * in="query", + * description="The last name for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="ss", + * in="query", + * description="The social security number for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="street", + * in="query", + * description="The street for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="postal_code", + * in="query", + * description="The postal code for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="city", + * in="query", + * description="The city for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="state", + * in="query", + * description="The state for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="phone_home", + * in="query", + * description="The home phone for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="phone_biz", + * in="query", + * description="The business phone for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="phone_cell", + * in="query", + * description="The cell phone for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="postal_contact", + * in="query", + * description="The postal_contact for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="sex", + * in="query", + * description="The gender for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="country_code", + * in="query", + * description="The country code for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="email", + * in="query", + * description="The email for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="DOB", + * in="query", + * description="The DOB for the patient.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Retrieves a list of patients" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient" => function () { RestConfig::authorization_check("patients", "demo"); $return = (new PatientRestController())->getAll($_GET); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Creates a new patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient" => function () { RestConfig::authorization_check("patients", "demo"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -86,6 +724,20 @@ RestConfig::apiLog($return, $data); return $return; }, + /** + * @OA\Put( + * path="/api/patient/{puuid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Updates a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:puuid" => function ($puuid) { RestConfig::authorization_check("patients", "demo"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -93,18 +745,69 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{puuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a single patient by their uuid" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:puuid" => function ($puuid) { RestConfig::authorization_check("patients", "demo"); $return = (new PatientRestController())->getOne($puuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{puuid}/encounter", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a list of encounters for a single patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:puuid/encounter" => function ($puuid) { RestConfig::authorization_check("encounters", "auth_a"); $return = (new EncounterRestController())->getAll($puuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{puuid}/encounter", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Creates a new encounter" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:puuid/encounter" => function ($puuid) { RestConfig::authorization_check("encounters", "auth_a"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -112,6 +815,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{puuid}/encounter/{euuid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modify a encounter" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:puuid/encounter/:euuid" => function ($puuid, $euuid) { RestConfig::authorization_check("encounters", "auth_a"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -119,18 +837,81 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{puuid}/encounter/{euuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="euuid", + * in="path", + * description="The uuid for the encounter.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a single encounter for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:puuid/encounter/:euuid" => function ($puuid, $euuid) { RestConfig::authorization_check("encounters", "auth_a"); $return = (new EncounterRestController())->getOne($puuid, $euuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/encounter/{eid}/soap_note", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="eid", + * in="path", + * description="The id for the encounter.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves soap notes from an encounter for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/encounter/:eid/soap_note" => function ($pid, $eid) { RestConfig::authorization_check("encounters", "notes"); $return = (new EncounterRestController())->getSoapNotes($pid, $eid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/encounter/{eid}/vital", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new vitals form" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/encounter/:eid/vital" => function ($pid, $eid) { RestConfig::authorization_check("encounters", "notes"); $data = json_decode(file_get_contents("php://input"), true) ?? []; @@ -138,6 +919,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{pid}/encounter/{eid}/vital/:vid", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a vitals form" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:pid/encounter/:eid/vital/:vid" => function ($pid, $eid, $vid) { RestConfig::authorization_check("encounters", "notes"); $data = json_decode(file_get_contents("php://input"), true) ?? []; @@ -145,24 +941,123 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/encounter/{eid}/vital", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="eid", + * in="path", + * description="The id for the encounter.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all vitals from an encounter for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/encounter/:eid/vital" => function ($pid, $eid) { RestConfig::authorization_check("encounters", "notes"); $return = (new EncounterRestController())->getVitals($pid, $eid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/encounter/{eid}/vital/{vid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="eid", + * in="path", + * description="The id for the encounter.", + * required=true + * ), + * @OA\Parameter( + * name="vid", + * in="path", + * description="The id for the vitals form.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a vitals form from an encounter for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/encounter/:eid/vital/:vid" => function ($pid, $eid, $vid) { RestConfig::authorization_check("encounters", "notes"); $return = (new EncounterRestController())->getVital($pid, $eid, $vid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/encounter/{eid}/soap_note/{sid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="eid", + * in="path", + * description="The id for the encounter.", + * required=true + * ), + * @OA\Parameter( + * name="sid", + * in="path", + * description="The id for the soap note.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a soap note from an encounter for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/encounter/:eid/soap_note/:sid" => function ($pid, $eid, $sid) { RestConfig::authorization_check("encounters", "notes"); $return = (new EncounterRestController())->getSoapNote($pid, $eid, $sid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/encounter/{eid}/soap_note", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new soap note" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/encounter/:eid/soap_note" => function ($pid, $eid) { RestConfig::authorization_check("encounters", "notes"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -170,6 +1065,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{pid}/encounter/{eid}/soap_note/{sid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a soap note" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:pid/encounter/:eid/soap_note/:sid" => function ($pid, $eid, $sid) { RestConfig::authorization_check("encounters", "notes"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -177,18 +1087,238 @@ RestConfig::apiLog($return, $data); return $return; }, + + + /** + * @OA\Get( + * path="/api/practitioner", + * tags={"standard"}, + * @OA\Parameter( + * name="title", + * in="query", + * description="The title for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="fname", + * in="query", + * description="The first name for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="lname", + * in="query", + * description="The last name for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="mname", + * in="query", + * description="The middle name for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="federaltaxid", + * in="query", + * description="The federal tax id for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="federaldrugid", + * in="query", + * description="The federal drug id for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="upin", + * in="query", + * description="The upin for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="facility_id", + * in="query", + * description="The facility id for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="facility", + * in="query", + * description="The facility for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="npi", + * in="query", + * description="The npi for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="email", + * in="query", + * description="The email for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="specialty", + * in="query", + * description="The specialty for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="billname", + * in="query", + * description="The billname for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="url", + * in="query", + * description="The url for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="assistant", + * in="query", + * description="The assistant for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="organization", + * in="query", + * description="The organization for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="valedictory", + * in="query", + * description="The valedictory for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="street", + * in="query", + * description="The street for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="streetb", + * in="query", + * description="The street (line 2) for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="city", + * in="query", + * description="The city for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="state", + * in="query", + * description="The state for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="zip", + * in="query", + * description="The zip for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="phone", + * in="query", + * description="The phone for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="fax", + * in="query", + * description="The fax for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="phonew1", + * in="query", + * description="The phonew1 for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="phonecell", + * in="query", + * description="The phonecell for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="notes", + * in="query", + * description="The notes for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="state_license_number2", + * in="query", + * description="The state license number for the practitioner.", + * required=false + * ), + * @OA\Parameter( + * name="username", + * in="query", + * description="The username for the practitioner.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Retrieves a list of practitioners" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/practitioner" => function () { RestConfig::authorization_check("admin", "users"); $return = (new PractitionerRestController())->getAll($_GET); RestConfig::apiLog($return); return $return; }, - "GET /api/practitioner/:prid" => function ($prid) { + + /** + * @OA\Get( + * path="/api/practitioner/{pruuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pruuid", + * in="path", + * description="The uuid for the practitioner.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a single practitioner by their uuid" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /api/practitioner/:pruuid" => function ($pruuid) { RestConfig::authorization_check("admin", "users"); - $return = (new PractitionerRestController())->getOne($prid); + $return = (new PractitionerRestController())->getOne($pruuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/practitioner", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new practitioner" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/practitioner" => function () { RestConfig::authorization_check("admin", "users"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -196,37 +1326,175 @@ RestConfig::apiLog($return, $data); return $return; }, - "PUT /api/practitioner/:prid" => function ($prid) { + + /** + * @OA\Put( + * path="/api/practitioner/{pruuid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a practitioner" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ + "PUT /api/practitioner/:pruuid" => function ($pruuid) { RestConfig::authorization_check("admin", "users"); $data = (array) (json_decode(file_get_contents("php://input"))); - $return = (new PractitionerRestController())->patch($prid, $data); + $return = (new PractitionerRestController())->patch($pruuid, $data); RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/medical_problem", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="condition_uuid", + * in="query", + * description="The uuid for the medical problem.", + * required=false + * ), + * @OA\Parameter( + * name="title", + * in="query", + * description="The title for the medical problem.", + * required=false + * ), + * @OA\Parameter( + * name="begdate", + * in="query", + * description="The start date for the medical problem.", + * required=false + * ), + * @OA\Parameter( + * name="enddate", + * in="query", + * description="The end date for the medical problem.", + * required=false + * ), + * @OA\Parameter( + * name="diagnosis", + * in="query", + * description="The diagnosis for the medical problem.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Retrieves a list of medical problems" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/medical_problem" => function () { RestConfig::authorization_check("encounters", "notes"); $return = (new ConditionRestController())->getAll(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/medical_problem/{muuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="muuid", + * in="path", + * description="The uuid for the medical problem.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a single medical problem by their uuid" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/medical_problem/:muuid" => function ($muuid) { RestConfig::authorization_check("encounters", "notes"); $return = (new ConditionRestController())->getOne($muuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{puuid}/medical_problem", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all medical problems for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:puuid/medical_problem" => function ($puuid) { RestConfig::authorization_check("encounters", "notes"); $return = (new ConditionRestController())->getAll($puuid, "medical_problem"); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{puuid}/medical_problem/{muuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="muuid", + * in="path", + * description="The uuid for the medical problem.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a medical problem for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:puuid/medical_problem/:muuid" => function ($puuid, $muuid) { RestConfig::authorization_check("patients", "med"); $return = (new ConditionRestController())->getAll(['puuid' => $puuid, 'condition_uuid' => $muuid]); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{puuid}/medical_problem", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new medical problem" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:puuid/medical_problem" => function ($puuid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -234,6 +1502,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{puuid}/medical_problem/{muuid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a medical problem" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:puuid/medical_problem/:muuid" => function ($puuid, $muuid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -241,36 +1524,183 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Delete( + * path="/api/patient/{puuid}/medical_problem/{muuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="muuid", + * in="path", + * description="The uuid for the medical problem.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Delete a medical problem" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "DELETE /api/patient/:puuid/medical_problem/:muuid" => function ($puuid, $muuid) { RestConfig::authorization_check("patients", "med"); $return = (new ConditionRestController())->delete($puuid, $muuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/allergy", + * tags={"standard"}, + * @OA\Parameter( + * name="lists.pid", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="lists.id", + * in="query", + * description="The uuid for the allergy.", + * required=false + * ), + * @OA\Parameter( + * name="title", + * in="query", + * description="The title for the allergy.", + * required=false + * ), + * @OA\Parameter( + * name="begdate", + * in="query", + * description="The start date for the allergy.", + * required=false + * ), + * @OA\Parameter( + * name="enddate", + * in="query", + * description="The end date for the allergy.", + * required=false + * ), + * @OA\Parameter( + * name="diagnosis", + * in="query", + * description="The diagnosis for the allergy.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Retrieves a list of allergies" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/allergy" => function () { RestConfig::authorization_check("patients", "med"); $return = (new AllergyIntoleranceRestController())->getAll(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/allergy/{auuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="auuid", + * in="path", + * description="The uuid for the allergy.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a single allergy by their uuid" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/allergy/:auuid" => function ($auuid) { RestConfig::authorization_check("patients", "med"); $return = (new AllergyIntoleranceRestController())->getOne($auuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{puuid}/allergy", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all allergies for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:puuid/allergy" => function ($puuid) { RestConfig::authorization_check("patients", "med"); $return = (new AllergyIntoleranceRestController())->getAll(['lists.pid' => $puuid]); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{puuid}/allergy/{auuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="auuid", + * in="path", + * description="The uuid for the allergy.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a allergy for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:puuid/allergy/:auuid" => function ($puuid, $auuid) { RestConfig::authorization_check("patients", "med"); $return = (new AllergyIntoleranceRestController())->getAll(['lists.pid' => $puuid, 'lists.id' => $auuid]); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{puuid}/allergy", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new allergy" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:puuid/allergy" => function ($puuid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -278,6 +1708,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{puuid}/allergy/{auuid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a allergy" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:puuid/allergy/:auuid" => function ($puuid, $auuid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -285,18 +1730,75 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Delete( + * path="/api/patient/{puuid}/allergy/{auuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="puuid", + * in="path", + * description="The uuid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="auuid", + * in="path", + * description="The uuid for the allergy.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Delete a medical problem" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "DELETE /api/patient/:puuid/allergy/:auuid" => function ($puuid, $auuid) { RestConfig::authorization_check("patients", "med"); $return = (new AllergyIntoleranceRestController())->delete($puuid, $auuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/medication", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all medications for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/medication" => function ($pid) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->getAll($pid, "medication"); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/medication", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new medication" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/medication" => function ($pid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -304,6 +1806,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{pid}/medication/{mid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a medication" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:pid/medication/:mid" => function ($pid, $mid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -311,36 +1828,165 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/medication/{mid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="mid", + * in="path", + * description="The id for the medication.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a medication for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/medication/:mid" => function ($pid, $mid) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->getOne($pid, "medication", $mid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Delete( + * path="/api/patient/{pid}/medication/{mid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="mid", + * in="path", + * description="The id for the medication.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Delete a medication" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "DELETE /api/patient/:pid/medication/:mid" => function ($pid, $mid) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->delete($pid, $mid, "medication"); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/surgery", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all surgeries for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/surgery" => function ($pid) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->getAll($pid, "surgery"); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/surgery/{sid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="sid", + * in="path", + * description="The id for the surgery.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a surgery for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/surgery/:sid" => function ($pid, $sid) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->getOne($pid, "surgery", $sid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Delete( + * path="/api/patient/{pid}/surgery/{sid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="sid", + * in="path", + * description="The id for the surgery.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Delete a surgery" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "DELETE /api/patient/:pid/surgery/:sid" => function ($pid, $sid) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->delete($pid, $sid, "surgery"); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/surgery", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new surgery" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/surgery" => function ($pid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -348,6 +1994,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{pid}/surgery/{sid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a surgery" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:pid/surgery/:sid" => function ($pid, $sid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -355,24 +2016,105 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/dental_issue", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all dental issues for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/dental_issue" => function ($pid) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->getAll($pid, "dental"); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/dental_issue/{did}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="did", + * in="path", + * description="The id for the dental issue.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a dental issue for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/dental_issue/:did" => function ($pid, $did) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->getOne($pid, "dental", $did); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Delete( + * path="/api/patient/{pid}/dental_issue/{did}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="did", + * in="path", + * description="The id for the dental issue.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Delete a dental issue" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "DELETE /api/patient/:pid/dental_issue/:did" => function ($pid, $did) { RestConfig::authorization_check("patients", "med"); $return = (new ListRestController())->delete($pid, $did, "dental"); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/dental_issue", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new dental issue" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/dental_issue" => function ($pid) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -380,6 +2122,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{pid}/dental_issue/{did}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a dental issue" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:pid/dental_issue/:did" => function ($pid, $did) { RestConfig::authorization_check("patients", "med"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -387,12 +2144,45 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/appointment", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all appointments for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/appointment" => function ($pid) { RestConfig::authorization_check("patients", "appt"); $return = (new AppointmentRestController())->getAllForPatient($pid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/appointment", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new appointment" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/appointment" => function ($pid) { RestConfig::authorization_check("patients", "appt"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -400,110 +2190,452 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/api/appointment", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves all appointments" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/appointment" => function () { RestConfig::authorization_check("patients", "appt"); $return = (new AppointmentRestController())->getAll(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/appointment/{eid}", + * tags={"standard"}, + * @OA\Parameter( + * name="eid", + * in="path", + * description="The eid for the appointment.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves an appointment" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/appointment/:eid" => function ($eid) { RestConfig::authorization_check("patients", "appt"); $return = (new AppointmentRestController())->getOne($eid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Delete( + * path="/api/patient/{pid}/appointment/{eid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="eid", + * in="path", + * description="The eid for the appointment.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Delete a appointment" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "DELETE /api/patient/:pid/appointment/:eid" => function ($pid, $eid) { RestConfig::authorization_check("patients", "appt"); $return = (new AppointmentRestController())->delete($eid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/appointment/{eid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="eid", + * in="path", + * description="The eid for the appointment.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a appointment for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/appointment/:eid" => function ($pid, $eid) { RestConfig::authorization_check("patients", "appt"); $return = (new AppointmentRestController())->getOne($eid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/list/{list_name}", + * tags={"standard"}, + * @OA\Parameter( + * name="list_name", + * in="path", + * description="The list_id of the list.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a list" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/list/:list_name" => function ($list_name) { RestConfig::authorization_check("lists", "default"); $return = (new ListRestController())->getOptions($list_name); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/version", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves the OpenEMR version information" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/version" => function () { $return = (new VersionRestController())->getOne(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/product", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves the OpenEMR product registration information" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/product" => function () { $return = (new ProductRegistrationRestController())->getOne(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/insurance_company", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves all insurance companies" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/insurance_company" => function () { $return = (new InsuranceCompanyRestController())->getAll(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/insurance_company/{iid}", + * tags={"standard"}, + * @OA\Parameter( + * name="iid", + * in="path", + * description="The id of the insurance company.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves insurance company" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/insurance_company/:iid" => function ($iid) { $return = (new InsuranceCompanyRestController())->getOne($iid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/insurance_type", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves all insurance types" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/insurance_type" => function () { $return = (new InsuranceCompanyRestController())->getInsuranceTypes(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/insurance_company", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new insurance company" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/insurance_company" => function () { $data = (array) (json_decode(file_get_contents("php://input"))); $return = (new InsuranceCompanyRestController())->post($data); RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/insurance_company/{iid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a insurance company" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/insurance_company/:iid" => function ($iid) { $data = (array) (json_decode(file_get_contents("php://input"))); $return = (new InsuranceCompanyRestController())->put($iid, $data); RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/document", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new patient document" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/document" => function ($pid) { $return = (new DocumentRestController())->postWithPath($pid, $_GET['path'], $_FILES['document']); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/document", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="path", + * in="query", + * description="The category of the documents.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all file information of documents from a category for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/document" => function ($pid) { $return = (new DocumentRestController())->getAllAtPath($pid, $_GET['path']); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/document/{did}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="did", + * in="path", + * description="The id for the patient document.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a document for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/document/:did" => function ($pid, $did) { $return = (new DocumentRestController())->downloadFile($pid, $did); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/insurance", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves all insurances for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/insurance" => function ($pid) { $return = (new InsuranceRestController())->getAll($pid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/patient/{pid}/insurance/{type}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The pid for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="type", + * in="path", + * description="The insurance type for the patient.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a insurance (by type) for a patient" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/patient/:pid/insurance/:type" => function ($pid, $type) { $return = (new InsuranceRestController())->getOne($pid, $type); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/insurance/{type}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new patient insurance (with type)" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/insurance/:type" => function ($pid, $type) { $data = (array) (json_decode(file_get_contents("php://input"))); $return = (new InsuranceRestController())->post($pid, $type, $data); RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{pid}/insurance/{type}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a patient insurance (by type)" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:pid/insurance/:type" => function ($pid, $type) { $data = (array) (json_decode(file_get_contents("php://input"))); $return = (new InsuranceRestController())->put($pid, $type, $data); RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Post( + * path="/api/patient/{pid}/message", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a pnote message" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /api/patient/:pid/message" => function ($pid) { RestConfig::authorization_check("patients", "notes"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -511,6 +2643,21 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Put( + * path="/api/patient/{pid}/message/{mid}", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a pnote message" + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "PUT /api/patient/:pid/message/:mid" => function ($pid, $mid) { RestConfig::authorization_check("patients", "notes"); $data = (array) (json_decode(file_get_contents("php://input"))); @@ -518,54 +2665,366 @@ RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Delete( + * path="/api/patient/{pid}/message/{mid}", + * tags={"standard"}, + * @OA\Parameter( + * name="pid", + * in="path", + * description="The id for the patient.", + * required=true + * ), + * @OA\Parameter( + * name="eid", + * in="path", + * description="The id for the pnote message.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Delete a pnote message" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "DELETE /api/patient/:pid/message/:mid" => function ($pid, $mid) { RestConfig::authorization_check("patients", "notes"); $return = (new MessageRestController())->delete($pid, $mid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/immunization", + * tags={"standard"}, + * @OA\Parameter( + * name="patient_id", + * in="query", + * description="The pid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="id", + * in="query", + * description="The id for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="uuid", + * in="query", + * description="The uuid for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="administered_date", + * in="query", + * description="The administered date for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="immunization_id", + * in="query", + * description="The immunization list_id for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="cvx_code", + * in="query", + * description="The cvx code for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="manufacturer", + * in="query", + * description="The manufacturer for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="lot_number", + * in="query", + * description="The lot number for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="administered_by_id", + * in="query", + * description="The administered by id for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="administered_by", + * in="query", + * description="The administered by for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="education_date", + * in="query", + * description="The education date for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="vis_date", + * in="query", + * description="The vis date for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="note", + * in="query", + * description="The note for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="create_date", + * in="query", + * description="The create date for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="update_date", + * in="query", + * description="The update date for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="created_by", + * in="query", + * description="The created_by for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="updated_by", + * in="query", + * description="The updated_by for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="amount_administered", + * in="query", + * description="The amount administered for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="amount_administered_unit", + * in="query", + * description="The amount administered unit for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="expiration_date", + * in="query", + * description="The expiration date for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="route", + * in="query", + * description="The route for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="administration_site", + * in="query", + * description="The administration site for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="added_erroneously", + * in="query", + * description="The added_erroneously for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="external_id", + * in="query", + * description="The external_id for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="completion_status", + * in="query", + * description="The completion status for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="information_source", + * in="query", + * description="The information source for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="refusal_reason", + * in="query", + * description="The refusal reason for the immunization.", + * required=false + * ), + * @OA\Parameter( + * name="ordering_provider", + * in="query", + * description="The ordering provider for the immunization.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Retrieves a list of immunizations" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/immunization" => function () { RestConfig::authorization_check("patients", "med"); $return = (new ImmunizationRestController())->getAll($_GET); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/immunization/{uuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the immunization.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a immunization" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/immunization/:uuid" => function ($uuid) { RestConfig::authorization_check("patients", "med"); $return = (new ImmunizationRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/procedure", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves a list of all procedures" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/procedure" => function () { RestConfig::authorization_check("patients", "med"); $return = (new ProcedureRestController())->getAll(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/procedure/{uuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the procedure.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a procedure" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/procedure/:uuid" => function ($uuid) { RestConfig::authorization_check("patients", "med"); $return = (new ProcedureRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/drug", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves a list of all drugs" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/drug" => function () { RestConfig::authorization_check("patients", "med"); $return = (new DrugRestController())->getAll(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/drug/{uuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the drug.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a drug" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/drug/:uuid" => function ($uuid) { RestConfig::authorization_check("patients", "med"); $return = (new DrugRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/prescription", + * tags={"standard"}, + * @OA\Response( + * response="200", + * description="Retrieves a list of all prescriptions" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/prescription" => function () { RestConfig::authorization_check("patients", "med"); $return = (new PrescriptionRestController())->getAll(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/api/prescription/{uuid}", + * tags={"standard"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the prescription.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Retrieves a prescription" + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /api/prescription/:uuid" => function ($uuid) { RestConfig::authorization_check("patients", "med"); $return = (new PrescriptionRestController())->getOne($uuid); @@ -606,6 +3065,29 @@ // (there is a mechanism in place to ensure patient role is binded // to only see the data of the one patient) RestConfig::$FHIR_ROUTE_MAP = array( + /** + * @OA\Get( + * path="/fhir/AllergyIntolerance", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the AllergyIntolerance resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of AllergyIntolerance resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/AllergyIntolerance" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -618,17 +3100,66 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/AllergyIntolerance/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/AllergyIntolerance/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the AllergyIntolerance resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single AllergyIntolerance resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/AllergyIntolerance/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient - $return = (new FhirAllergyIntoleranceRestController($request))->getOne($id, $request->getPatientUUIDString()); + $return = (new FhirAllergyIntoleranceRestController($request))->getOne($uuid, $request->getPatientUUIDString()); } else { RestConfig::authorization_check("patients", "med"); - $return = (new FhirAllergyIntoleranceRestController($request))->getOne($id); + $return = (new FhirAllergyIntoleranceRestController($request))->getOne($uuid); } RestConfig::apiLog($return); return $return; - },"GET /fhir/CarePlan" => function (HttpRestRequest $request) { + }, + + /** + * @OA\Get( + * path="/fhir/CarePlan", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the CarePlan resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="category", + * in="query", + * description="The category of the CarePlan resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of CarePlan resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/CarePlan" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -640,6 +3171,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/CarePlan/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the CarePlan resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single CarePlan resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/CarePlan/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -651,6 +3200,36 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/CareTeam", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the CareTeam resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="status", + * in="query", + * description="The status of the CarePlan resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of CareTeam resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/CareTeam" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -663,6 +3242,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/CareTeam/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the CareTeam resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single CareTeam resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/CareTeam/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -674,6 +3271,30 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Condition", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Condition resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Condition resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Condition" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -686,7 +3307,25 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Condition/:id" => function ($uuid, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Condition/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Condition resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Condition resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Condition/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient $return = (new FhirConditionRestController())->getOne($uuid, $request->getPatientUUIDString()); @@ -697,18 +3336,90 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Coverage", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Coverage resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="payor", + * in="query", + * description="The payor of the Coverage resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Coverage resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Coverage" => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "super"); $return = (new FhirCoverageRestController())->getAll($request->getQueryParams()); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Coverage/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Coverage resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Coverage resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Coverage/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("admin", "super"); $return = (new FhirCoverageRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Device", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Device resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Device resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Device" => function (HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -720,6 +3431,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Device/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Device resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Device resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Device/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -731,6 +3460,48 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/DiagnosticReport", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the DiagnosticReport resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="code", + * in="query", + * description="The code of the DiagnosticReport resource.", + * required=false + * ), + * @OA\Parameter( + * name="category", + * in="query", + * description="The category of the DiagnosticReport resource.", + * required=false + * ), + * @OA\Parameter( + * name="date", + * in="query", + * description="The datetime of the DiagnosticReport resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of DiagnosticReport resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/DiagnosticReport" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -743,6 +3514,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/DiagnosticReport/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the DiagnosticReport resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single DiagnosticReport resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/DiagnosticReport/:uuid" => function ($uuid, HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -755,6 +3544,48 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/DocumentReference", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the DocumentReference resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="type", + * in="query", + * description="The type of the DocumentReference resource.", + * required=false + * ), + * @OA\Parameter( + * name="category", + * in="query", + * description="The category of the DocumentReference resource.", + * required=false + * ), + * @OA\Parameter( + * name="date", + * in="query", + * description="The datetime of the DocumentReference resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of DocumentReference resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ 'GET /fhir/DocumentReference' => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -767,6 +3598,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/DocumentReference/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the DocumentReference resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single DocumentReference resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/DocumentReference/:uuid" => function ($uuid, HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -779,6 +3628,21 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Document/{id}/Binary", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ 'GET /fhir/Document/:id/Binary' => function ($documentId, HttpRestRequest $request) { // currently only allow users with the same permissions as export to take a file out // this could be relaxed to allow other types of files ie such as patient access etc. @@ -789,6 +3653,36 @@ $response = $docController->downloadDocument($documentId, $request->getRequestUserId()); return $response; }, + + /** + * @OA\Get( + * path="/fhir/Encounter", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Encounter resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="date", + * in="query", + * description="The datetime of the Encounter resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Encounter resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Encounter" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -801,17 +3695,59 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Encounter/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Encounter/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Encounter resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Encounter resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Encounter/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient - $return = (new FhirEncounterRestController())->getOne($id, $request->getPatientUUIDString()); + $return = (new FhirEncounterRestController())->getOne($uuid, $request->getPatientUUIDString()); } else { RestConfig::authorization_check("admin", "super"); - $return = (new FhirEncounterRestController())->getOne($id); + $return = (new FhirEncounterRestController())->getOne($uuid); } RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Goal", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Goal resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Condition resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Goal" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -824,17 +3760,59 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Goal/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Goal/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Goal resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Goal resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Goal/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient - $return = (new FhirGoalRestController())->getOne($id, $request->getPatientUUIDString()); + $return = (new FhirGoalRestController())->getOne($uuid, $request->getPatientUUIDString()); } else { RestConfig::authorization_check("admin", "super"); - $return = (new FhirGoalRestController())->getOne($id); + $return = (new FhirGoalRestController())->getOne($uuid); } RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Group", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Group resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Group resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ 'GET /fhir/Group' => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $getParams = $request->getQueryParams(); @@ -847,17 +3825,50 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Group/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Group/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Group resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Group resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Group/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); if ($request->isPatientRequest()) { // only allow access to data of binded patient - $return = (new FhirGroupRestController())->getOne($id, $request->getPatientUUIDString()); + $return = (new FhirGroupRestController())->getOne($uuid, $request->getPatientUUIDString()); } else { - $return = (new FhirGroupRestController())->getOne($id); + $return = (new FhirGroupRestController())->getOne($uuid); } RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Group/{id}/$export", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ 'GET /fhir/Group/:id/$export' => function ($groupId, HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $fhirExportService = new FhirExportRestController($request); @@ -872,6 +3883,30 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Immunization", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Immunization resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Immunization resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Immunization" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -884,39 +3919,159 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Immunization/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Immunization/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Immunization resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Immunization resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Immunization/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient - $return = (new FhirImmunizationRestController())->getOne($id, $request->getPatientUUIDString()); + $return = (new FhirImmunizationRestController())->getOne($uuid, $request->getPatientUUIDString()); } else { RestConfig::authorization_check("patients", "med"); - $return = (new FhirImmunizationRestController())->getOne($id); + $return = (new FhirImmunizationRestController())->getOne($uuid); } RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Location", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Location resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Location resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Location" => function (HttpRestRequest $request) { $return = (new FhirLocationRestController())->getAll($request->getQueryParams(), $request->getPatientUUIDString()); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Location/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Location resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Location resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Location/:uuid" => function ($uuid, HttpRestRequest $request) { $return = (new FhirLocationRestController())->getOne($uuid, $request->getPatientUUIDString()); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Medication", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="Returns a list of Medication resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Medication" => function (HttpRestRequest $request) { RestConfig::authorization_check("patients", "med"); $return = (new FhirMedicationRestController())->getAll($request->getQueryParams()); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Medication/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Medication resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Medication resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Medication/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("patients", "med"); $return = (new FhirMedicationRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/MedicationRequest", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the MedicationRequest resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="intent", + * in="query", + * description="The intent of the MedicationRequest resource.", + * required=false + * ), + * @OA\Parameter( + * name="status", + * in="query", + * description="The status of the MedicationRequest resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of MedicationRequest resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/MedicationRequest" => function (HttpRestRequest $request) { $getParams = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -929,6 +4084,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/MedicationRequest/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the MedicationRequest resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single MedicationRequest resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/MedicationRequest/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -940,6 +4113,155 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Observation", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Observation resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="code", + * in="query", + * description="The code of the Observation resource.", + * required=false + * ), + * @OA\Parameter( + * name="category", + * in="query", + * description="The category of the Observation resource.", + * required=false + * ), + * @OA\Parameter( + * name="date", + * in="query", + * description="The datetime of the Observation resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Observation resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Observation" => function (HttpRestRequest $request) { + $getParams = $request->getQueryParams(); + if ($request->isPatientRequest()) { + // only allow access to data of binded patient + $return = (new FhirObservationRestController())->getAll($getParams, $request->getPatientUUIDString()); + } else { + RestConfig::authorization_check("patients", "med"); + $return = (new FhirObservationRestController())->getAll($getParams); + } + RestConfig::apiLog($return); + return $return; + }, + + /** + * @OA\Get( + * path="/fhir/Observation/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Observation resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Observation resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Observation/:uuid" => function ($uuid, HttpRestRequest $request) { + if ($request->isPatientRequest()) { + // only allow access to data of binded patient + $return = (new FhirObservationRestController())->getOne($uuid, $request->getPatientUUIDString()); + } else { + RestConfig::authorization_check("patients", "med"); + $return = (new FhirObservationRestController())->getOne($uuid); + } + RestConfig::apiLog($return); + return $return; + }, + + /** + * @OA\Get( + * path="/fhir/Organization", + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="name", + * in="query", + * description="The name of the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="email", + * in="query", + * description="The email of the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="phone", + * in="query", + * description="The phone of the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="telecom", + * in="query", + * description="The telecom of the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="address", + * in="query", + * description="The address of the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-city", + * in="query", + * description="The address-city of the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-postalcode", + * in="query", + * description="The address-postalcode of the Organization resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-state", + * in="query", + * description="The address-state of the Organization resource.", + * required=false + * ), + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="Returns a list of Organization resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Organization" => function (HttpRestRequest $request) { if (!$request->isPatientRequest()) { RestConfig::authorization_check("admin", "users"); @@ -948,18 +4270,51 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Organization/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Organization/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Organization resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Organization resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Organization/:uuid" => function ($uuid, HttpRestRequest $request) { $patientUUID = null; if (!$request->isPatientRequest()) { RestConfig::authorization_check("admin", "users"); } else { $patientUUID = $request->getPatientUUIDString(); } - $return = (new FhirOrganizationRestController())->getOne($id, $patientUUID); + $return = (new FhirOrganizationRestController())->getOne($uuid, $patientUUID); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/fhir/Organization", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Adds a Organization resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /fhir/Organization" => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "super"); $data = (array) (json_decode(file_get_contents("php://input"), true)); @@ -967,36 +4322,49 @@ RestConfig::apiLog($return, $data); return $return; }, - "PUT /fhir/Organization/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Put( + * path="/fhir/Organization/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the organization.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modifies a Organization resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ + "PUT /fhir/Organization/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("admin", "super"); $data = (array) (json_decode(file_get_contents("php://input"), true)); - $return = (new FhirOrganizationRestController())->patch($id, $data); + $return = (new FhirOrganizationRestController())->patch($uuid, $data); RestConfig::apiLog($return, $data); return $return; }, - "GET /fhir/Observation" => function (HttpRestRequest $request) { - $getParams = $request->getQueryParams(); - if ($request->isPatientRequest()) { - // only allow access to data of binded patient - $return = (new FhirObservationRestController())->getAll($getParams, $request->getPatientUUIDString()); - } else { - RestConfig::authorization_check("patients", "med"); - $return = (new FhirObservationRestController())->getAll($getParams); - } - RestConfig::apiLog($return); - return $return; - }, - "GET /fhir/Observation/:uuid" => function ($uuid, HttpRestRequest $request) { - if ($request->isPatientRequest()) { - // only allow access to data of binded patient - $return = (new FhirObservationRestController())->getOne($uuid, $request->getPatientUUIDString()); - } else { - RestConfig::authorization_check("patients", "med"); - $return = (new FhirObservationRestController())->getOne($uuid); - } - RestConfig::apiLog($return); - return $return; - }, + + /** + * @OA\Post( + * path="/fhir/Patient", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Adds a Patient resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /fhir/Patient" => function (HttpRestRequest $request) { RestConfig::authorization_check("patients", "demo"); $data = (array) (json_decode(file_get_contents("php://input"), true)); @@ -1004,13 +4372,130 @@ RestConfig::apiLog($return, $data); return $return; }, - "PUT /fhir/Patient/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Put( + * path="/fhir/Patient/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Patient resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modifies a Patient resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ + "PUT /fhir/Patient/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("patients", "demo"); $data = (array) (json_decode(file_get_contents("php://input"), true)); - $return = (new FhirPatientRestController())->put($id, $data); + $return = (new FhirPatientRestController())->put($uuid, $data); RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Patient", + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="identifier", + * in="query", + * description="The identifier of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="name", + * in="query", + * description="The name of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="birthdate", + * in="query", + * description="The birthdate of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="gender", + * in="query", + * description="The gender of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="address", + * in="query", + * description="The address of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-city", + * in="query", + * description="The address-city of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-postalcode", + * in="query", + * description="The address-postalcode of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-state", + * in="query", + * description="The address-state of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="email", + * in="query", + * description="The email of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="family", + * in="query", + * description="The family name of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="given", + * in="query", + * description="The given name of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="phone", + * in="query", + * description="The phone number of the Patient resource.", + * required=false + * ), + * @OA\Parameter( + * name="telecom", + * in="query", + * description="The fax number of the Patient resource.", + * required=false + * ), + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="Returns a list of Patient resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Patient" => function (HttpRestRequest $request) { $params = $request->getQueryParams(); if ($request->isPatientRequest()) { @@ -1026,6 +4511,21 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Patient/$export", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ // we have to have the bulk fhir export operation here otherwise it will match $export to the patient $id 'GET /fhir/Patient/$export' => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); @@ -1039,7 +4539,25 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Patient/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Patient/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Patient resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Patient resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Patient/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient if (empty($id) || ($id != $request->getPatientUUIDString())) { @@ -1049,22 +4567,202 @@ } else { RestConfig::authorization_check("patients", "demo"); } - $return = (new FhirPatientRestController())->getOne($id); + $return = (new FhirPatientRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Person", + * @OA\Parameter( + * name="name", + * in="query", + * description="The name of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="active", + * in="query", + * description="The active status of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="address", + * in="query", + * description="The address of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-city", + * in="query", + * description="The address-city of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-postalcode", + * in="query", + * description="The address-postalcode of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-state", + * in="query", + * description="The address-state of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="email", + * in="query", + * description="The email of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="family", + * in="query", + * description="The family name of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="given", + * in="query", + * description="The given name of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="phone", + * in="query", + * description="The phone number of the Person resource.", + * required=false + * ), + * @OA\Parameter( + * name="telecom", + * in="query", + * description="The fax number of the Person resource.", + * required=false + * ), + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="Returns a list of Person resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Person" => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $return = (new FhirPersonRestController())->getAll($request->getQueryParams()); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Person/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Person resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Person resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Person/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $return = (new FhirPersonRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Practitioner", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="name", + * in="query", + * description="The name of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="active", + * in="query", + * description="The active status of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="address", + * in="query", + * description="The address of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-city", + * in="query", + * description="The address-city of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-postalcode", + * in="query", + * description="The address-postalcode of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="address-state", + * in="query", + * description="The address-state of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="email", + * in="query", + * description="The email of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="family", + * in="query", + * description="The family name of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="given", + * in="query", + * description="The given name of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="phone", + * in="query", + * description="The phone number of the Practitioner resource.", + * required=false + * ), + * @OA\Parameter( + * name="telecom", + * in="query", + * description="The fax number of the Practitioner resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Practitioner resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Practitioner" => function (HttpRestRequest $request) { // TODO: @adunsulag talk with brady.miller about patients needing access to any practitioner resource @@ -1079,7 +4777,25 @@ RestConfig::apiLog($return); return $return; }, - "GET /fhir/Practitioner/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/Practitioner/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Practitioner resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Practitioner resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/Practitioner/:uuid" => function ($uuid, HttpRestRequest $request) { // TODO: @adunsulag talk with brady.miller about patients needing access to any practitioner resource // that is referenced in connected patient resources -- such as AllergyIntollerance. // I don't believe patients are assigned to a particular practitioner @@ -1088,10 +4804,25 @@ if (!$request->isPatientRequest()) { RestConfig::authorization_check("admin", "users"); } - $return = (new FhirPractitionerRestController())->getOne($id); + $return = (new FhirPractitionerRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Post( + * path="/fhir/Practitioner", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Adds a Practitioner resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "POST /fhir/Practitioner" => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $data = (array) (json_decode(file_get_contents("php://input"), true)); @@ -1099,25 +4830,118 @@ RestConfig::apiLog($return, $data); return $return; }, - "PUT /fhir/Practitioner/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Put( + * path="/fhir/Practitioner/{uuid}", + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Practitioner resource.", + * required=true + * ), + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modify a Practitioner resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ + "PUT /fhir/Practitioner/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $data = (array) (json_decode(file_get_contents("php://input"), true)); - $return = (new FhirPractitionerRestController())->patch($id, $data); + $return = (new FhirPractitionerRestController())->patch($uuid, $data); RestConfig::apiLog($return, $data); return $return; }, + + /** + * @OA\Get( + * path="/fhir/PractitionerRole", + * tags={"fhir"}, + * @OA\Parameter( + * name="specialty", + * in="query", + * description="The specialty of the PractitionerRole resource.", + * required=false + * ), + * @OA\Parameter( + * name="practitioner", + * in="query", + * description="The practitioner of the PractitionerRole resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of PractitionerRole resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/PractitionerRole" => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $return = (new FhirPractitionerRoleRestController())->getAll($request->getQueryParams()); RestConfig::apiLog($return); return $return; }, - "GET /fhir/PractitionerRole/:id" => function ($id, HttpRestRequest $request) { + + /** + * @OA\Get( + * path="/fhir/PractitionerRole/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the PractitionerRole resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single PractitionerRole resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + "GET /fhir/PractitionerRole/:uuid" => function ($uuid, HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); - $return = (new FhirPractitionerRoleRestController())->getOne($id); + $return = (new FhirPractitionerRoleRestController())->getOne($uuid); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Procedure", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Procedure resource.", + * required=false + * ), + * @OA\Parameter( + * name="patient", + * in="query", + * description="The uuid for the patient.", + * required=false + * ), + * @OA\Parameter( + * name="date", + * in="query", + * description="The datetime of the Procedure resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Procedure resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Procedure" => function (HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -1129,6 +4953,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Procedure/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Procedure resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Procedure resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Procedure/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -1140,6 +4982,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Provenance/{uuid}", + * tags={"fhir"}, + * @OA\Parameter( + * name="uuid", + * in="path", + * description="The uuid for the Provenance resource.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a single Provenance resource." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /fhir/Provenance/:uuid" => function ($uuid, HttpRestRequest $request) { if ($request->isPatientRequest()) { // only allow access to data of binded patient @@ -1151,6 +5011,24 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/Provenance", + * tags={"fhir"}, + * @OA\Parameter( + * name="_id", + * in="query", + * description="The uuid for the Provenance resource.", + * required=false + * ), + * @OA\Response( + * response="200", + * description="Returns a list of Provenance resources." + * ), + * security={{"openemr_auth":{}}} + * ) + */ // NOTE: this GET request only supports requests with an _id parameter. FHIR inferno test tool requires the 'search' // property to support which is why this endpoint exists. "GET /fhir/Provenance" => function (HttpRestRequest $request) { @@ -1165,12 +5043,39 @@ RestConfig::apiLog($return); return $return; }, + // other endpoints + + /** + * @OA\Get( + * path="/fhir/metadata", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="Returns metadata of the fhir server." + * ) + * ) + */ "GET /fhir/metadata" => function () { $return = (new FhirMetaDataRestController())->getMetaData(); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/fhir/.well-known/smart-configuration", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ "GET /fhir/.well-known/smart-configuration" => function () { $authController = new \OpenEMR\RestControllers\AuthorizationController(); $return = (new \OpenEMR\RestControllers\SMART\SMARTConfigurationController($authController))->getConfig(); @@ -1179,6 +5084,21 @@ }, // FHIR root level operations + + /** + * @OA\Get( + * path="/fhir/$export", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ 'GET /fhir/$export' => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $fhirExportService = new FhirExportRestController($request); @@ -1191,9 +5111,25 @@ RestConfig::apiLog($return); return $return; }, + // these two operations are adopted based on the documentation used in the IBM FHIR Server // we'd reference cerner or epic but we couldn't find any documentation about those (Jan 30th 2021) // @see https://ibm.github.io/FHIR/guides/FHIRBulkOperations/ + + /** + * @OA\Get( + * path="/fhir/$bulkdata-status", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ 'GET /fhir/$bulkdata-status' => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $jobUuidString = $request->getQueryParam('job'); @@ -1204,6 +5140,21 @@ RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Delete( + * path="/fhir/$bulkdata-status", + * tags={"fhir"}, + * @OA\Response( + * response="200", + * description="THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION." + * ), + * security={{"openemr_auth":{}}} + * ) + */ + /** + * TODO + */ 'DELETE /fhir/$bulkdata-status' => function (HttpRestRequest $request) { RestConfig::authorization_check("admin", "users"); $job = $request->getQueryParam('job'); @@ -1217,16 +5168,57 @@ // Note that the portal (api) route is only for patient role // (there is a mechanism in place to ensure only patient role can access the portal (api) route) RestConfig::$PORTAL_ROUTE_MAP = array( + /** + * @OA\Get( + * path="/portal/patient", + * tags={"standard-patient"}, + * @OA\Response( + * response="200", + * description="Returns the patient." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /portal/patient" => function (HttpRestRequest $request) { $return = (new PatientRestController())->getOne($request->getPatientUUIDString()); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/portal/patient/encounter", + * tags={"standard-patient"}, + * @OA\Response( + * response="200", + * description="Returns encounters for the patient." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /portal/patient/encounter" => function (HttpRestRequest $request) { $return = (new EncounterRestController())->getAll($request->getPatientUUIDString()); RestConfig::apiLog($return); return $return; }, + + /** + * @OA\Get( + * path="/portal/patient/encounter/{euuid}", + * tags={"standard-patient"}, + * @OA\Parameter( + * name="euuid", + * in="path", + * description="The uuid for the encounter.", + * required=true + * ), + * @OA\Response( + * response="200", + * description="Returns a selected encounter by its uuid." + * ), + * security={{"openemr_auth":{}}} + * ) + */ "GET /portal/patient/encounter/:euuid" => function ($euuid, HttpRestRequest $request) { $return = (new EncounterRestController())->getOne($request->getPatientUUIDString(), $euuid); RestConfig::apiLog($return); diff --git a/composer.json b/composer.json index 80e4e74189f..8ad732037d2 100644 --- a/composer.json +++ b/composer.json @@ -74,7 +74,8 @@ }, "require-dev": { "phpunit/phpunit": "9.*", - "symfony/panther": "1.*" + "symfony/panther": "1.*", + "zircote/swagger-php": "^3.2" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 3a0c80f32ed..8e15acfd49d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5c451c94db8f26a68f1f079d8bdc3fc4", + "content-hash": "4138d41d96893dd509fe7019de9d4dec", "packages": [ { "name": "academe/authorizenet-objects", @@ -9025,6 +9025,78 @@ } ], "packages-dev": [ + { + "name": "doctrine/annotations", + "version": "1.13.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.1" + }, + "time": "2021-05-16T18:07:53+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -9094,6 +9166,86 @@ ], "time": "2020-11-10T18:47:58+00:00" }, + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.1", @@ -11031,6 +11183,67 @@ ], "time": "2021-05-16T13:07:46+00:00" }, + { + "name": "symfony/finder", + "version": "v5.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-26T12:52:38+00:00" + }, { "name": "symfony/http-client", "version": "v5.2.9", @@ -11460,6 +11673,77 @@ "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, "time": "2021-03-09T10:59:23+00:00" + }, + { + "name": "zircote/swagger-php", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/zircote/swagger-php.git", + "reference": "eef1dd98e6f6071573908fd7007270510051e5f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/eef1dd98e6f6071573908fd7007270510051e5f9", + "reference": "eef1dd98e6f6071573908fd7007270510051e5f9", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.7", + "ext-json": "*", + "php": ">=7.2", + "symfony/finder": ">=2.2", + "symfony/yaml": ">=3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "phpunit/phpunit": ">=8" + }, + "bin": [ + "bin/openapi" + ], + "type": "library", + "autoload": { + "psr-4": { + "OpenApi\\": "src" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Robert Allen", + "email": "zircote@gmail.com" + }, + { + "name": "Bob Fanger", + "email": "bfanger@gmail.com", + "homepage": "https://bfanger.nl" + }, + { + "name": "Martin Rademacher", + "email": "mano@radebatz.net", + "homepage": "https://radebatz.net" + } + ], + "description": "swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations", + "homepage": "https://github.com/zircote/swagger-php/", + "keywords": [ + "api", + "json", + "rest", + "service discovery" + ], + "support": { + "issues": "https://github.com/zircote/swagger-php/issues", + "source": "https://github.com/zircote/swagger-php/tree/3.2.1" + }, + "time": "2021-05-20T21:46:24+00:00" } ], "aliases": [ diff --git a/docker/library/api-scope-listing b/docker/library/api-scope-listing new file mode 100644 index 00000000000..c8b95f76ca2 --- /dev/null +++ b/docker/library/api-scope-listing @@ -0,0 +1 @@ +openid offline_access api:fhir api:oemr api:port patient/AllergyIntolerance.read patient/CarePlan.read patient/CareTeam.read patient/Condition.read patient/Device.read patient/DiagnosticReport.read patient/DocumentReference.read patient/Encounter.read patient/Goal.read patient/Immunization.read patient/Location.read patient/Medication.read patient/MedicationRequest.read patient/Observation.read patient/Organization.read patient/Patient.read patient/Person.read patient/Practitioner.read patient/Procedure.read patient/Provenance.read user/AllergyIntolerance.read user/CarePlan.read user/CareTeam.read user/Condition.read user/Coverage.read user/Device.read user/DiagnosticReport.read user/DocumentReference.read user/Encounter.read user/Goal.read user/Immunization.read user/Location.read user/Medication.read user/MedicationRequest.read user/Observation.read user/Organization.read user/Organization.write user/Patient.read user/Patient.write user/Person.read user/Practitioner.read user/Practitioner.write user/PractitionerRole.read user/Procedure.read user/Provenance.read user/allergy.read user/allergy.write user/appointment.read user/appointment.write user/dental_issue.read user/dental_issue.write user/document.read user/document.write user/drug.read user/encounter.read user/encounter.write user/facility.read user/facility.write user/immunization.read user/insurance.read user/insurance.write user/insurance_company.read user/insurance_company.write user/insurance_type.read user/list.read user/medical_problem.read user/medical_problem.write user/medication.read user/medication.write user/message.write user/patient.read user/patient.write user/practitioner.read user/practitioner.write user/prescription.read user/procedure.read user/soap_note.read user/soap_note.write user/surgery.read user/surgery.write user/vital.read user/vital.write patient/encounter.read patient/patient.read diff --git a/src/Common/Auth/OpenIDConnect/Grant/CustomAuthCodeGrant.php b/src/Common/Auth/OpenIDConnect/Grant/CustomAuthCodeGrant.php index 657122fcdc0..a80e7904bec 100644 --- a/src/Common/Auth/OpenIDConnect/Grant/CustomAuthCodeGrant.php +++ b/src/Common/Auth/OpenIDConnect/Grant/CustomAuthCodeGrant.php @@ -36,21 +36,34 @@ public function __construct(AuthCodeRepositoryInterface $authCodeRepository, Ref public function validateAuthorizationRequest(ServerRequestInterface $request) { + // This function will force audience check if using launch scenario (ie. SMART). + // In non-launch scenario, it will only check audience if it has been provided in the request. $audience = $this->getQueryStringParameter( 'aud', $request ); - if ($audience != $this->expectedAudience) { - (new SystemLogger())->errorLogCaller("Aud parameter did not match authorized server", ['audience' => $audience, 'expected' => $this->expectedAudience]); - throw OAuthServerException::invalidRequest("aud", "Aud parameter did not match authorized server"); - } - - // let's validate the launch param $launch = $this->getQueryStringParameter( 'launch', $request ); + + // let's validate the aud param (if it exists) + // (note that this check is forced below if using launch scenario; so it is skipped here in the launch scenario) + if (!empty($audience) && empty($launch)) { + if (!in_array($audience, $this->expectedAudience)) { + (new SystemLogger())->errorLogCaller("Aud parameter did not match authorized server in non-launch scenario", ['audience' => $audience, 'expected' => $this->expectedAudience]); + throw OAuthServerException::invalidRequest("aud", "Aud parameter did not match authorized server"); + } + } else if (empty($audience) && empty($launch)) { + (new SystemLogger())->debug("Aud parameter not provided (and non-launch scenario), so not validating aud (audience)"); + } + + // let's validate the launch param if (!empty($launch)) { + if (!in_array($audience, $this->expectedAudience)) { + (new SystemLogger())->errorLogCaller("Aud parameter did not match authorized server in launch scenario", ['audience' => $audience, 'expected' => $this->expectedAudience]); + throw OAuthServerException::invalidRequest("aud", "Aud parameter did not match authorized server"); + } try { $launchToken = SMARTLaunchToken::deserializeToken($launch); if (empty($launchToken)) { diff --git a/src/Common/Command/CreateAPIDocumentationCommand.php b/src/Common/Command/CreateAPIDocumentationCommand.php new file mode 100644 index 00000000000..238aa986bee --- /dev/null +++ b/src/Common/Command/CreateAPIDocumentationCommand.php @@ -0,0 +1,61 @@ + + * @copyright Copyright (c) 2021 Stephen Nielson + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 + */ + +namespace OpenEMR\Common\Command; + +use OpenEMR\Common\Command\Runner\CommandContext; + +class CreateAPIDocumentationCommand implements IOpenEMRCommand +{ + + /** + * Prints the instructions on how to use this command + * @param CommandContext $context All the context about the command environment. + */ + public function printUsage(CommandContext $context) + { + echo "Command Usage: " . $context->getScriptName() . " -c CreateAPIDocumentation" . "\n"; + } + + /** + * Returns a description of the command + * @return string + */ + public function getDescription(CommandContext $context): string + { + return "Generates an OpenAPI swagger file that documents the OpenEMR API"; + } + + /** + * Execute the command and spit any output to STDOUT and errors to STDERR + * @param CommandContext $context All the context information needed for the CLI Command to execute + */ + public function execute(CommandContext $context) + { + $routesLocation = $context->getRootPath() . "_rest_routes.inc.php"; + $fileDestinationFolder = $context->getRootPath() . "swagger" . DIRECTORY_SEPARATOR; + $fileDestinationYaml = $fileDestinationFolder . "openemr-api.yaml"; + + $openapi = \OpenApi\Generator::scan([$routesLocation]); + + $resultYaml = file_put_contents($fileDestinationYaml, $openapi->toYaml()); + + if ($resultYaml === false) { + echo "No write access to " . $fileDestinationYaml . "\n"; + $this->printUsage($context); + return; + } else { + echo "API file generated at " . $fileDestinationYaml . "\n"; + echo "Your API documentation can now be viewed by going to /swagger/\n"; + echo "For example on the easy docker installation this would be https://localhost:9300/swagger/\n"; + } + } +} diff --git a/src/RestControllers/AuthorizationController.php b/src/RestControllers/AuthorizationController.php index 58e2e5a0bb5..0cfc6d61b3e 100644 --- a/src/RestControllers/AuthorizationController.php +++ b/src/RestControllers/AuthorizationController.php @@ -603,11 +603,15 @@ public function getAuthorizationServer($includeAuthGrantRefreshToken = true): Au $this->logger->debug("AuthorizationController->getAuthorizationServer() grantType is " . $this->grantType); if ($this->grantType === 'authorization_code') { - (new SystemLogger())->errorLogCaller( + $this->logger->debug( "logging global params", ['site_addr_oath' => $GLOBALS['site_addr_oath'], 'web_root' => $GLOBALS['web_root'], 'site_id' => $_SESSION['site_id']] ); - $expectedAudience = $GLOBALS['site_addr_oath'] . $GLOBALS['web_root'] . '/apis/' . $_SESSION['site_id'] . "/fhir"; + $expectedAudience = [ + $GLOBALS['site_addr_oath'] . $GLOBALS['web_root'] . '/apis/' . $_SESSION['site_id'] . "/fhir", + $GLOBALS['site_addr_oath'] . $GLOBALS['web_root'] . '/apis/' . $_SESSION['site_id'] . "/api", + $GLOBALS['site_addr_oath'] . $GLOBALS['web_root'] . '/apis/' . $_SESSION['site_id'] . "/portal", + ]; $grant = new CustomAuthCodeGrant( new AuthCodeRepository(), new RefreshTokenRepository($includeAuthGrantRefreshToken), diff --git a/src/Services/FHIR/FhirDiagnosticReportService.php b/src/Services/FHIR/FhirDiagnosticReportService.php index 663bc15e039..e8f5e57d8c2 100644 --- a/src/Services/FHIR/FhirDiagnosticReportService.php +++ b/src/Services/FHIR/FhirDiagnosticReportService.php @@ -9,18 +9,8 @@ * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ -/** - * FhirDiagnosticReportService - * @package openemr - * @link http://www.open-emr.org - * @author Stephen Nielson - * @copyright Copyright (c) 2021 Stephen Nielson - * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 - */ - namespace OpenEMR\Services\FHIR; - use OpenEMR\Common\Logging\SystemLogger; use OpenEMR\Services\FHIR\DiagnosticReport\FhirDiagnosticReportClinicalNotesService; use OpenEMR\Services\FHIR\DiagnosticReport\FhirDiagnosticReportLaboratoryService; diff --git a/swagger/favicon-16x16.png b/swagger/favicon-16x16.png new file mode 100644 index 00000000000..8b194e617af Binary files /dev/null and b/swagger/favicon-16x16.png differ diff --git a/swagger/favicon-32x32.png b/swagger/favicon-32x32.png new file mode 100644 index 00000000000..249737fe445 Binary files /dev/null and b/swagger/favicon-32x32.png differ diff --git a/swagger/index.html b/swagger/index.html new file mode 100644 index 00000000000..7fc8f01b579 --- /dev/null +++ b/swagger/index.html @@ -0,0 +1,56 @@ + + + + + + Swagger UI + + + + + + + +
+ + + + + + diff --git a/swagger/oauth2-redirect.html b/swagger/oauth2-redirect.html new file mode 100644 index 00000000000..64b171f7de5 --- /dev/null +++ b/swagger/oauth2-redirect.html @@ -0,0 +1,75 @@ + + + + Swagger UI: OAuth2 Redirect + + + + + diff --git a/swagger/openemr-api.yaml b/swagger/openemr-api.yaml new file mode 100644 index 00000000000..361e1519080 --- /dev/null +++ b/swagger/openemr-api.yaml @@ -0,0 +1,3261 @@ +openapi: 3.0.0 +info: + title: 'OpenEMR API' + version: 6.1.0 +servers: + - + url: /apis/default/ +paths: + /api/facility: + get: + tags: + - standard + parameters: + - + name: name + in: query + description: 'The name for the facility.' + required: false + - + name: facility_npi + in: query + description: 'The facility_npi for the facility.' + required: false + - + name: phone + in: query + description: 'The phone for the facility.' + required: false + - + name: fax + in: query + description: 'The fax for the facility.' + required: false + - + name: street + in: query + description: 'The street for the facility.' + required: false + - + name: city + in: query + description: 'The city for the facility.' + required: false + - + name: state + in: query + description: 'The state for the facility.' + required: false + - + name: postal_code + in: query + description: 'The postal_code for the facility.' + required: false + - + name: country_code + in: query + description: 'The country_code for the facility.' + required: false + - + name: federal_ein + in: query + description: 'The federal_ein for the facility.' + required: false + - + name: website + in: query + description: 'The website for the facility.' + required: false + - + name: email + in: query + description: 'The email for the facility.' + required: false + - + name: domain_identifier + in: query + description: 'The domain_identifier for the facility.' + required: false + - + name: facility_taxonomy + in: query + description: 'The facility_taxonomy for the facility.' + required: false + - + name: facility_code + in: query + description: 'The facility_code for the facility.' + required: false + - + name: billing_location + in: query + description: 'The billing_location setting for the facility.' + required: false + - + name: accepts_assignment + in: query + description: 'The accepts_assignment setting for the facility.' + required: false + - + name: oid + in: query + description: 'The oid for the facility.' + required: false + - + name: service_location + in: query + description: 'The service_location setting for the facility.' + required: false + responses: + '200': + description: 'Returns a list of facilities' + security: + - + openemr_auth: [] + post: + tags: + - standard + requestBody: + required: true + content: + application/json: + schema: + required: + - name + - facility_npi + properties: + name: + description: 'The name for the facility.' + facility_npi: + description: 'The facility_npi for the facility.' + phone: + description: 'The phone for the facility.' + fax: + description: 'The fax for the facility.' + street: + description: 'The street for the facility.' + city: + description: 'The city for the facility.' + state: + description: 'The state for the facility.' + postal_code: + description: 'The postal_code for the facility.' + country_code: + description: 'The country_code for the facility.' + federal_ein: + description: 'The federal_ein for the facility.' + website: + description: 'The website for the facility.' + email: + description: 'The email for the facility.' + domain_identifier: + description: 'The domain_identifier for the facility.' + facility_taxonomy: + description: 'The facility_taxonomy for the facility.' + facility_code: + description: 'The facility_code for the facility.' + billing_location: + description: 'The billing_location setting for the facility.' + accepts_assignment: + description: 'The accepts_assignment setting for the facility.' + oid: + description: 'The oid for the facility.' + service_location: + description: 'The service_location setting for the facility.' + type: object + example: + name: Aquaria + facility_npi: '123456789123' + phone: 808-606-3030 + fax: 808-606-3031 + street: '1337 Bit Shifter Ln' + city: 'San Lorenzo' + state: ZZ + postal_code: '54321' + country_code: US + federal_ein: '4343434' + website: 'https://example.com' + email: foo@bar.com + domain_identifier: '' + facility_taxonomy: '' + facility_code: '' + billing_location: '1' + accepts_assignment: '1' + oid: '' + service_location: '1' + responses: + '200': + description: 'Creates a facility in the system' + security: + - + openemr_auth: [] + '/api/facility/{fuuid}': + get: + tags: + - standard + parameters: + - + name: fuuid + in: path + description: 'The uuid for the facility.' + required: true + responses: + '200': + description: 'Returns a single facility.' + security: + - + openemr_auth: [] + put: + tags: + - standard + parameters: + - + name: fuuid + in: path + description: 'The uuid for the facility.' + required: true + requestBody: + required: true + content: + application/json: + schema: + properties: + name: + description: 'The name for the facility.' + facility_npi: + description: 'The facility_npi for the facility.' + phone: + description: 'The phone for the facility.' + fax: + description: 'The fax for the facility.' + street: + description: 'The street for the facility.' + city: + description: 'The city for the facility.' + state: + description: 'The state for the facility.' + postal_code: + description: 'The postal_code for the facility.' + country_code: + description: 'The country_code for the facility.' + federal_ein: + description: 'The federal_ein for the facility.' + website: + description: 'The website for the facility.' + email: + description: 'The email for the facility.' + domain_identifier: + description: 'The domain_identifier for the facility.' + facility_taxonomy: + description: 'The facility_taxonomy for the facility.' + facility_code: + description: 'The facility_code for the facility.' + billing_location: + description: 'The billing_location setting for the facility.' + accepts_assignment: + description: 'The accepts_assignment setting for the facility.' + oid: + description: 'The oid for the facility.' + service_location: + description: 'The service_location setting for the facility.' + type: object + example: + name: Aquaria + facility_npi: '123456789123' + phone: 808-606-3030 + fax: 808-606-3031 + street: '1337 Bit Shifter Ln' + city: 'San Lorenzo' + state: ZZ + postal_code: '54321' + country_code: US + federal_ein: '4343434' + website: 'https://example.com' + email: foo@bar.com + domain_identifier: '' + facility_taxonomy: '' + facility_code: '' + billing_location: '1' + accepts_assignment: '1' + oid: '' + service_location: '1' + responses: + '200': + description: 'Updates a facility in the system' + security: + - + openemr_auth: [] + /api/patient: + get: + tags: + - standard + parameters: + - + name: fname + in: query + description: 'The first name for the patient.' + required: false + - + name: lname + in: query + description: 'The last name for the patient.' + required: false + - + name: ss + in: query + description: 'The social security number for the patient.' + required: false + - + name: street + in: query + description: 'The street for the patient.' + required: false + - + name: postal_code + in: query + description: 'The postal code for the patient.' + required: false + - + name: city + in: query + description: 'The city for the patient.' + required: false + - + name: state + in: query + description: 'The state for the patient.' + required: false + - + name: phone_home + in: query + description: 'The home phone for the patient.' + required: false + - + name: phone_biz + in: query + description: 'The business phone for the patient.' + required: false + - + name: phone_cell + in: query + description: 'The cell phone for the patient.' + required: false + - + name: postal_contact + in: query + description: 'The postal_contact for the patient.' + required: false + - + name: sex + in: query + description: 'The gender for the patient.' + required: false + - + name: country_code + in: query + description: 'The country code for the patient.' + required: false + - + name: email + in: query + description: 'The email for the patient.' + required: false + - + name: DOB + in: query + description: 'The DOB for the patient.' + required: false + responses: + '200': + description: 'Retrieves a list of patients' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Creates a new patient' + security: + - + openemr_auth: [] + '/api/patient/{puuid}': + get: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + responses: + '200': + description: 'Retrieves a single patient by their uuid' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Updates a patient' + security: + - + openemr_auth: [] + '/api/patient/{puuid}/encounter': + get: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + responses: + '200': + description: 'Retrieves a list of encounters for a single patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Creates a new encounter' + security: + - + openemr_auth: [] + '/api/patient/{puuid}/encounter/{euuid}': + get: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + - + name: euuid + in: path + description: 'The uuid for the encounter.' + required: true + responses: + '200': + description: 'Retrieves a single encounter for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modify a encounter' + security: + - + openemr_auth: [] + '/api/patient/{pid}/encounter/{eid}/soap_note': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + - + name: eid + in: path + description: 'The id for the encounter.' + required: true + responses: + '200': + description: 'Retrieves soap notes from an encounter for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new soap note' + security: + - + openemr_auth: [] + '/api/patient/{pid}/encounter/{eid}/vital': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + - + name: eid + in: path + description: 'The id for the encounter.' + required: true + responses: + '200': + description: 'Retrieves all vitals from an encounter for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new vitals form' + security: + - + openemr_auth: [] + '/api/patient/{pid}/encounter/{eid}/vital/:vid': + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a vitals form' + security: + - + openemr_auth: [] + '/api/patient/{pid}/encounter/{eid}/vital/{vid}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + - + name: eid + in: path + description: 'The id for the encounter.' + required: true + - + name: vid + in: path + description: 'The id for the vitals form.' + required: true + responses: + '200': + description: 'Retrieves a vitals form from an encounter for a patient' + security: + - + openemr_auth: [] + '/api/patient/{pid}/encounter/{eid}/soap_note/{sid}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + - + name: eid + in: path + description: 'The id for the encounter.' + required: true + - + name: sid + in: path + description: 'The id for the soap note.' + required: true + responses: + '200': + description: 'Retrieves a soap note from an encounter for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a soap note' + security: + - + openemr_auth: [] + /api/practitioner: + get: + tags: + - standard + parameters: + - + name: title + in: query + description: 'The title for the practitioner.' + required: false + - + name: fname + in: query + description: 'The first name for the practitioner.' + required: false + - + name: lname + in: query + description: 'The last name for the practitioner.' + required: false + - + name: mname + in: query + description: 'The middle name for the practitioner.' + required: false + - + name: federaltaxid + in: query + description: 'The federal tax id for the practitioner.' + required: false + - + name: federaldrugid + in: query + description: 'The federal drug id for the practitioner.' + required: false + - + name: upin + in: query + description: 'The upin for the practitioner.' + required: false + - + name: facility_id + in: query + description: 'The facility id for the practitioner.' + required: false + - + name: facility + in: query + description: 'The facility for the practitioner.' + required: false + - + name: npi + in: query + description: 'The npi for the practitioner.' + required: false + - + name: email + in: query + description: 'The email for the practitioner.' + required: false + - + name: specialty + in: query + description: 'The specialty for the practitioner.' + required: false + - + name: billname + in: query + description: 'The billname for the practitioner.' + required: false + - + name: url + in: query + description: 'The url for the practitioner.' + required: false + - + name: assistant + in: query + description: 'The assistant for the practitioner.' + required: false + - + name: organization + in: query + description: 'The organization for the practitioner.' + required: false + - + name: valedictory + in: query + description: 'The valedictory for the practitioner.' + required: false + - + name: street + in: query + description: 'The street for the practitioner.' + required: false + - + name: streetb + in: query + description: 'The street (line 2) for the practitioner.' + required: false + - + name: city + in: query + description: 'The city for the practitioner.' + required: false + - + name: state + in: query + description: 'The state for the practitioner.' + required: false + - + name: zip + in: query + description: 'The zip for the practitioner.' + required: false + - + name: phone + in: query + description: 'The phone for the practitioner.' + required: false + - + name: fax + in: query + description: 'The fax for the practitioner.' + required: false + - + name: phonew1 + in: query + description: 'The phonew1 for the practitioner.' + required: false + - + name: phonecell + in: query + description: 'The phonecell for the practitioner.' + required: false + - + name: notes + in: query + description: 'The notes for the practitioner.' + required: false + - + name: state_license_number2 + in: query + description: 'The state license number for the practitioner.' + required: false + - + name: username + in: query + description: 'The username for the practitioner.' + required: false + responses: + '200': + description: 'Retrieves a list of practitioners' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new practitioner' + security: + - + openemr_auth: [] + '/api/practitioner/{pruuid}': + get: + tags: + - standard + parameters: + - + name: pruuid + in: path + description: 'The uuid for the practitioner.' + required: true + responses: + '200': + description: 'Retrieves a single practitioner by their uuid' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a practitioner' + security: + - + openemr_auth: [] + /api/medical_problem: + get: + tags: + - standard + parameters: + - + name: puuid + in: query + description: 'The uuid for the patient.' + required: false + - + name: condition_uuid + in: query + description: 'The uuid for the medical problem.' + required: false + - + name: title + in: query + description: 'The title for the medical problem.' + required: false + - + name: begdate + in: query + description: 'The start date for the medical problem.' + required: false + - + name: enddate + in: query + description: 'The end date for the medical problem.' + required: false + - + name: diagnosis + in: query + description: 'The diagnosis for the medical problem.' + required: false + responses: + '200': + description: 'Retrieves a list of medical problems' + security: + - + openemr_auth: [] + '/api/medical_problem/{muuid}': + get: + tags: + - standard + parameters: + - + name: muuid + in: path + description: 'The uuid for the medical problem.' + required: true + responses: + '200': + description: 'Retrieves a single medical problem by their uuid' + security: + - + openemr_auth: [] + '/api/patient/{puuid}/medical_problem': + get: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + responses: + '200': + description: 'Retrieves all medical problems for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new medical problem' + security: + - + openemr_auth: [] + '/api/patient/{puuid}/medical_problem/{muuid}': + get: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + - + name: muuid + in: path + description: 'The uuid for the medical problem.' + required: true + responses: + '200': + description: 'Retrieves a medical problem for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a medical problem' + security: + - + openemr_auth: [] + delete: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + - + name: muuid + in: path + description: 'The uuid for the medical problem.' + required: true + responses: + '200': + description: 'Delete a medical problem' + security: + - + openemr_auth: [] + /api/allergy: + get: + tags: + - standard + parameters: + - + name: lists.pid + in: query + description: 'The uuid for the patient.' + required: false + - + name: lists.id + in: query + description: 'The uuid for the allergy.' + required: false + - + name: title + in: query + description: 'The title for the allergy.' + required: false + - + name: begdate + in: query + description: 'The start date for the allergy.' + required: false + - + name: enddate + in: query + description: 'The end date for the allergy.' + required: false + - + name: diagnosis + in: query + description: 'The diagnosis for the allergy.' + required: false + responses: + '200': + description: 'Retrieves a list of allergies' + security: + - + openemr_auth: [] + '/api/allergy/{auuid}': + get: + tags: + - standard + parameters: + - + name: auuid + in: path + description: 'The uuid for the allergy.' + required: true + responses: + '200': + description: 'Retrieves a single allergy by their uuid' + security: + - + openemr_auth: [] + '/api/patient/{puuid}/allergy': + get: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + responses: + '200': + description: 'Retrieves all allergies for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new allergy' + security: + - + openemr_auth: [] + '/api/patient/{puuid}/allergy/{auuid}': + get: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + - + name: auuid + in: path + description: 'The uuid for the allergy.' + required: true + responses: + '200': + description: 'Retrieves a allergy for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a allergy' + security: + - + openemr_auth: [] + delete: + tags: + - standard + parameters: + - + name: puuid + in: path + description: 'The uuid for the patient.' + required: true + - + name: auuid + in: path + description: 'The uuid for the allergy.' + required: true + responses: + '200': + description: 'Delete a medical problem' + security: + - + openemr_auth: [] + '/api/patient/{pid}/medication': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + responses: + '200': + description: 'Retrieves all medications for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new medication' + security: + - + openemr_auth: [] + '/api/patient/{pid}/medication/{mid}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: mid + in: path + description: 'The id for the medication.' + required: true + responses: + '200': + description: 'Retrieves a medication for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a medication' + security: + - + openemr_auth: [] + delete: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: mid + in: path + description: 'The id for the medication.' + required: true + responses: + '200': + description: 'Delete a medication' + security: + - + openemr_auth: [] + '/api/patient/{pid}/surgery': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + responses: + '200': + description: 'Retrieves all surgeries for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new surgery' + security: + - + openemr_auth: [] + '/api/patient/{pid}/surgery/{sid}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: sid + in: path + description: 'The id for the surgery.' + required: true + responses: + '200': + description: 'Retrieves a surgery for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a surgery' + security: + - + openemr_auth: [] + delete: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: sid + in: path + description: 'The id for the surgery.' + required: true + responses: + '200': + description: 'Delete a surgery' + security: + - + openemr_auth: [] + '/api/patient/{pid}/dental_issue': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + responses: + '200': + description: 'Retrieves all dental issues for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new dental issue' + security: + - + openemr_auth: [] + '/api/patient/{pid}/dental_issue/{did}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: did + in: path + description: 'The id for the dental issue.' + required: true + responses: + '200': + description: 'Retrieves a dental issue for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a dental issue' + security: + - + openemr_auth: [] + delete: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: did + in: path + description: 'The id for the dental issue.' + required: true + responses: + '200': + description: 'Delete a dental issue' + security: + - + openemr_auth: [] + '/api/patient/{pid}/appointment': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + responses: + '200': + description: 'Retrieves all appointments for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new appointment' + security: + - + openemr_auth: [] + /api/appointment: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves all appointments' + security: + - + openemr_auth: [] + '/api/appointment/{eid}': + get: + tags: + - standard + parameters: + - + name: eid + in: path + description: 'The eid for the appointment.' + required: true + responses: + '200': + description: 'Retrieves an appointment' + security: + - + openemr_auth: [] + '/api/patient/{pid}/appointment/{eid}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: eid + in: path + description: 'The eid for the appointment.' + required: true + responses: + '200': + description: 'Retrieves a appointment for a patient' + security: + - + openemr_auth: [] + delete: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: eid + in: path + description: 'The eid for the appointment.' + required: true + responses: + '200': + description: 'Delete a appointment' + security: + - + openemr_auth: [] + '/api/list/{list_name}': + get: + tags: + - standard + parameters: + - + name: list_name + in: path + description: 'The list_id of the list.' + required: true + responses: + '200': + description: 'Retrieves a list' + security: + - + openemr_auth: [] + /api/version: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves the OpenEMR version information' + security: + - + openemr_auth: [] + /api/product: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves the OpenEMR product registration information' + security: + - + openemr_auth: [] + /api/insurance_company: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves all insurance companies' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new insurance company' + security: + - + openemr_auth: [] + '/api/insurance_company/{iid}': + get: + tags: + - standard + parameters: + - + name: iid + in: path + description: 'The id of the insurance company.' + required: true + responses: + '200': + description: 'Retrieves insurance company' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a insurance company' + security: + - + openemr_auth: [] + /api/insurance_type: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves all insurance types' + security: + - + openemr_auth: [] + '/api/patient/{pid}/document': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + - + name: path + in: query + description: 'The category of the documents.' + required: true + responses: + '200': + description: 'Retrieves all file information of documents from a category for a patient' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new patient document' + security: + - + openemr_auth: [] + '/api/patient/{pid}/document/{did}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + - + name: did + in: path + description: 'The id for the patient document.' + required: true + responses: + '200': + description: 'Retrieves a document for a patient' + security: + - + openemr_auth: [] + '/api/patient/{pid}/insurance': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + responses: + '200': + description: 'Retrieves all insurances for a patient' + security: + - + openemr_auth: [] + '/api/patient/{pid}/insurance/{type}': + get: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The pid for the patient.' + required: true + - + name: type + in: path + description: 'The insurance type for the patient.' + required: true + responses: + '200': + description: 'Retrieves a insurance (by type) for a patient' + security: + - + openemr_auth: [] + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a patient insurance (by type)' + security: + - + openemr_auth: [] + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a new patient insurance (with type)' + security: + - + openemr_auth: [] + '/api/patient/{pid}/message': + post: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Submits a pnote message' + security: + - + openemr_auth: [] + '/api/patient/{pid}/message/{mid}': + put: + tags: + - standard + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Edit a pnote message' + security: + - + openemr_auth: [] + delete: + tags: + - standard + parameters: + - + name: pid + in: path + description: 'The id for the patient.' + required: true + - + name: eid + in: path + description: 'The id for the pnote message.' + required: true + responses: + '200': + description: 'Delete a pnote message' + security: + - + openemr_auth: [] + /api/immunization: + get: + tags: + - standard + parameters: + - + name: patient_id + in: query + description: 'The pid for the patient.' + required: false + - + name: id + in: query + description: 'The id for the immunization.' + required: false + - + name: uuid + in: query + description: 'The uuid for the immunization.' + required: false + - + name: administered_date + in: query + description: 'The administered date for the immunization.' + required: false + - + name: immunization_id + in: query + description: 'The immunization list_id for the immunization.' + required: false + - + name: cvx_code + in: query + description: 'The cvx code for the immunization.' + required: false + - + name: manufacturer + in: query + description: 'The manufacturer for the immunization.' + required: false + - + name: lot_number + in: query + description: 'The lot number for the immunization.' + required: false + - + name: administered_by_id + in: query + description: 'The administered by id for the immunization.' + required: false + - + name: administered_by + in: query + description: 'The administered by for the immunization.' + required: false + - + name: education_date + in: query + description: 'The education date for the immunization.' + required: false + - + name: vis_date + in: query + description: 'The vis date for the immunization.' + required: false + - + name: note + in: query + description: 'The note for the immunization.' + required: false + - + name: create_date + in: query + description: 'The create date for the immunization.' + required: false + - + name: update_date + in: query + description: 'The update date for the immunization.' + required: false + - + name: created_by + in: query + description: 'The created_by for the immunization.' + required: false + - + name: updated_by + in: query + description: 'The updated_by for the immunization.' + required: false + - + name: amount_administered + in: query + description: 'The amount administered for the immunization.' + required: false + - + name: amount_administered_unit + in: query + description: 'The amount administered unit for the immunization.' + required: false + - + name: expiration_date + in: query + description: 'The expiration date for the immunization.' + required: false + - + name: route + in: query + description: 'The route for the immunization.' + required: false + - + name: administration_site + in: query + description: 'The administration site for the immunization.' + required: false + - + name: added_erroneously + in: query + description: 'The added_erroneously for the immunization.' + required: false + - + name: external_id + in: query + description: 'The external_id for the immunization.' + required: false + - + name: completion_status + in: query + description: 'The completion status for the immunization.' + required: false + - + name: information_source + in: query + description: 'The information source for the immunization.' + required: false + - + name: refusal_reason + in: query + description: 'The refusal reason for the immunization.' + required: false + - + name: ordering_provider + in: query + description: 'The ordering provider for the immunization.' + required: false + responses: + '200': + description: 'Retrieves a list of immunizations' + security: + - + openemr_auth: [] + '/api/immunization/{uuid}': + get: + tags: + - standard + parameters: + - + name: uuid + in: path + description: 'The uuid for the immunization.' + required: true + responses: + '200': + description: 'Retrieves a immunization' + security: + - + openemr_auth: [] + /api/procedure: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves a list of all procedures' + security: + - + openemr_auth: [] + '/api/procedure/{uuid}': + get: + tags: + - standard + parameters: + - + name: uuid + in: path + description: 'The uuid for the procedure.' + required: true + responses: + '200': + description: 'Retrieves a procedure' + security: + - + openemr_auth: [] + /api/drug: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves a list of all drugs' + security: + - + openemr_auth: [] + '/api/drug/{uuid}': + get: + tags: + - standard + parameters: + - + name: uuid + in: path + description: 'The uuid for the drug.' + required: true + responses: + '200': + description: 'Retrieves a drug' + security: + - + openemr_auth: [] + /api/prescription: + get: + tags: + - standard + responses: + '200': + description: 'Retrieves a list of all prescriptions' + security: + - + openemr_auth: [] + '/api/prescription/{uuid}': + get: + tags: + - standard + parameters: + - + name: uuid + in: path + description: 'The uuid for the prescription.' + required: true + responses: + '200': + description: 'Retrieves a prescription' + security: + - + openemr_auth: [] + /fhir/AllergyIntolerance: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the AllergyIntolerance resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + responses: + '200': + description: 'Returns a list of AllergyIntolerance resources.' + security: + - + openemr_auth: [] + '/fhir/AllergyIntolerance/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the AllergyIntolerance resource.' + required: true + responses: + '200': + description: 'Returns a single AllergyIntolerance resource.' + security: + - + openemr_auth: [] + /fhir/CarePlan: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the CarePlan resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: category + in: query + description: 'The category of the CarePlan resource.' + required: false + responses: + '200': + description: 'Returns a list of CarePlan resources.' + security: + - + openemr_auth: [] + '/fhir/CarePlan/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the CarePlan resource.' + required: true + responses: + '200': + description: 'Returns a single CarePlan resource.' + security: + - + openemr_auth: [] + /fhir/CareTeam: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the CareTeam resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: status + in: query + description: 'The status of the CarePlan resource.' + required: false + responses: + '200': + description: 'Returns a list of CareTeam resources.' + security: + - + openemr_auth: [] + '/fhir/CareTeam/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the CareTeam resource.' + required: true + responses: + '200': + description: 'Returns a single CareTeam resource.' + security: + - + openemr_auth: [] + /fhir/Condition: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Condition resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + responses: + '200': + description: 'Returns a list of Condition resources.' + security: + - + openemr_auth: [] + '/fhir/Condition/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Condition resource.' + required: true + responses: + '200': + description: 'Returns a single Condition resource.' + security: + - + openemr_auth: [] + /fhir/Coverage: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Coverage resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: payor + in: query + description: 'The payor of the Coverage resource.' + required: false + responses: + '200': + description: 'Returns a list of Coverage resources.' + security: + - + openemr_auth: [] + '/fhir/Coverage/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Coverage resource.' + required: true + responses: + '200': + description: 'Returns a single Coverage resource.' + security: + - + openemr_auth: [] + /fhir/Device: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Device resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + responses: + '200': + description: 'Returns a list of Device resources.' + security: + - + openemr_auth: [] + '/fhir/Device/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Device resource.' + required: true + responses: + '200': + description: 'Returns a single Device resource.' + security: + - + openemr_auth: [] + /fhir/DiagnosticReport: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the DiagnosticReport resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: code + in: query + description: 'The code of the DiagnosticReport resource.' + required: false + - + name: category + in: query + description: 'The category of the DiagnosticReport resource.' + required: false + - + name: date + in: query + description: 'The datetime of the DiagnosticReport resource.' + required: false + responses: + '200': + description: 'Returns a list of DiagnosticReport resources.' + security: + - + openemr_auth: [] + '/fhir/DiagnosticReport/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the DiagnosticReport resource.' + required: true + responses: + '200': + description: 'Returns a single DiagnosticReport resource.' + security: + - + openemr_auth: [] + /fhir/DocumentReference: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the DocumentReference resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: type + in: query + description: 'The type of the DocumentReference resource.' + required: false + - + name: category + in: query + description: 'The category of the DocumentReference resource.' + required: false + - + name: date + in: query + description: 'The datetime of the DocumentReference resource.' + required: false + responses: + '200': + description: 'Returns a list of DocumentReference resources.' + security: + - + openemr_auth: [] + '/fhir/DocumentReference/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the DocumentReference resource.' + required: true + responses: + '200': + description: 'Returns a single DocumentReference resource.' + security: + - + openemr_auth: [] + '/fhir/Document/{id}/Binary': + get: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION.' + security: + - + openemr_auth: [] + /fhir/Encounter: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Encounter resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: date + in: query + description: 'The datetime of the Encounter resource.' + required: false + responses: + '200': + description: 'Returns a list of Encounter resources.' + security: + - + openemr_auth: [] + '/fhir/Encounter/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Encounter resource.' + required: true + responses: + '200': + description: 'Returns a single Encounter resource.' + security: + - + openemr_auth: [] + /fhir/Goal: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Goal resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + responses: + '200': + description: 'Returns a list of Condition resources.' + security: + - + openemr_auth: [] + '/fhir/Goal/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Goal resource.' + required: true + responses: + '200': + description: 'Returns a single Goal resource.' + security: + - + openemr_auth: [] + /fhir/Group: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Group resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + responses: + '200': + description: 'Returns a list of Group resources.' + security: + - + openemr_auth: [] + '/fhir/Group/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Group resource.' + required: true + responses: + '200': + description: 'Returns a single Group resource.' + security: + - + openemr_auth: [] + '/fhir/Group/{id}/$export': + get: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION.' + security: + - + openemr_auth: [] + /fhir/Immunization: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Immunization resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + responses: + '200': + description: 'Returns a list of Immunization resources.' + security: + - + openemr_auth: [] + '/fhir/Immunization/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Immunization resource.' + required: true + responses: + '200': + description: 'Returns a single Immunization resource.' + security: + - + openemr_auth: [] + /fhir/Location: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Location resource.' + required: false + responses: + '200': + description: 'Returns a list of Location resources.' + security: + - + openemr_auth: [] + '/fhir/Location/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Location resource.' + required: true + responses: + '200': + description: 'Returns a single Location resource.' + security: + - + openemr_auth: [] + /fhir/Medication: + get: + tags: + - fhir + responses: + '200': + description: 'Returns a list of Medication resources.' + security: + - + openemr_auth: [] + '/fhir/Medication/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Medication resource.' + required: true + responses: + '200': + description: 'Returns a single Medication resource.' + security: + - + openemr_auth: [] + /fhir/MedicationRequest: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the MedicationRequest resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: intent + in: query + description: 'The intent of the MedicationRequest resource.' + required: false + - + name: status + in: query + description: 'The status of the MedicationRequest resource.' + required: false + responses: + '200': + description: 'Returns a list of MedicationRequest resources.' + security: + - + openemr_auth: [] + '/fhir/MedicationRequest/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the MedicationRequest resource.' + required: true + responses: + '200': + description: 'Returns a single MedicationRequest resource.' + security: + - + openemr_auth: [] + /fhir/Observation: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Observation resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: code + in: query + description: 'The code of the Observation resource.' + required: false + - + name: category + in: query + description: 'The category of the Observation resource.' + required: false + - + name: date + in: query + description: 'The datetime of the Observation resource.' + required: false + responses: + '200': + description: 'Returns a list of Observation resources.' + security: + - + openemr_auth: [] + '/fhir/Observation/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Observation resource.' + required: true + responses: + '200': + description: 'Returns a single Observation resource.' + security: + - + openemr_auth: [] + /fhir/Organization: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Organization resource.' + required: false + - + name: name + in: query + description: 'The name of the Organization resource.' + required: false + - + name: email + in: query + description: 'The email of the Organization resource.' + required: false + - + name: phone + in: query + description: 'The phone of the Organization resource.' + required: false + - + name: telecom + in: query + description: 'The telecom of the Organization resource.' + required: false + - + name: address + in: query + description: 'The address of the Organization resource.' + required: false + - + name: address-city + in: query + description: 'The address-city of the Organization resource.' + required: false + - + name: address-postalcode + in: query + description: 'The address-postalcode of the Organization resource.' + required: false + - + name: address-state + in: query + description: 'The address-state of the Organization resource.' + required: false + responses: + '200': + description: 'Returns a list of Organization resources.' + security: + - + openemr_auth: [] + post: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Adds a Organization resource.' + security: + - + openemr_auth: [] + '/fhir/Organization/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Organization resource.' + required: true + responses: + '200': + description: 'Returns a single Organization resource.' + security: + - + openemr_auth: [] + put: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the organization.' + required: true + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modifies a Organization resource.' + security: + - + openemr_auth: [] + /fhir/Patient: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Patient resource.' + required: false + - + name: identifier + in: query + description: 'The identifier of the Patient resource.' + required: false + - + name: name + in: query + description: 'The name of the Patient resource.' + required: false + - + name: birthdate + in: query + description: 'The birthdate of the Patient resource.' + required: false + - + name: gender + in: query + description: 'The gender of the Patient resource.' + required: false + - + name: address + in: query + description: 'The address of the Patient resource.' + required: false + - + name: address-city + in: query + description: 'The address-city of the Patient resource.' + required: false + - + name: address-postalcode + in: query + description: 'The address-postalcode of the Patient resource.' + required: false + - + name: address-state + in: query + description: 'The address-state of the Patient resource.' + required: false + - + name: email + in: query + description: 'The email of the Patient resource.' + required: false + - + name: family + in: query + description: 'The family name of the Patient resource.' + required: false + - + name: given + in: query + description: 'The given name of the Patient resource.' + required: false + - + name: phone + in: query + description: 'The phone number of the Patient resource.' + required: false + - + name: telecom + in: query + description: 'The fax number of the Patient resource.' + required: false + responses: + '200': + description: 'Returns a list of Patient resources.' + security: + - + openemr_auth: [] + post: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Adds a Patient resource.' + security: + - + openemr_auth: [] + '/fhir/Patient/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Patient resource.' + required: true + responses: + '200': + description: 'Returns a single Patient resource.' + security: + - + openemr_auth: [] + put: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Patient resource.' + required: true + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modifies a Patient resource.' + security: + - + openemr_auth: [] + /fhir/Patient/$export: + get: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION.' + security: + - + openemr_auth: [] + /fhir/Person: + get: + tags: + - fhir + parameters: + - + name: name + in: query + description: 'The name of the Person resource.' + required: false + - + name: active + in: query + description: 'The active status of the Person resource.' + required: false + - + name: address + in: query + description: 'The address of the Person resource.' + required: false + - + name: address-city + in: query + description: 'The address-city of the Person resource.' + required: false + - + name: address-postalcode + in: query + description: 'The address-postalcode of the Person resource.' + required: false + - + name: address-state + in: query + description: 'The address-state of the Person resource.' + required: false + - + name: email + in: query + description: 'The email of the Person resource.' + required: false + - + name: family + in: query + description: 'The family name of the Person resource.' + required: false + - + name: given + in: query + description: 'The given name of the Person resource.' + required: false + - + name: phone + in: query + description: 'The phone number of the Person resource.' + required: false + - + name: telecom + in: query + description: 'The fax number of the Person resource.' + required: false + responses: + '200': + description: 'Returns a list of Person resources.' + security: + - + openemr_auth: [] + '/fhir/Person/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Person resource.' + required: true + responses: + '200': + description: 'Returns a single Person resource.' + security: + - + openemr_auth: [] + /fhir/Practitioner: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Practitioner resource.' + required: false + - + name: name + in: query + description: 'The name of the Practitioner resource.' + required: false + - + name: active + in: query + description: 'The active status of the Practitioner resource.' + required: false + - + name: address + in: query + description: 'The address of the Practitioner resource.' + required: false + - + name: address-city + in: query + description: 'The address-city of the Practitioner resource.' + required: false + - + name: address-postalcode + in: query + description: 'The address-postalcode of the Practitioner resource.' + required: false + - + name: address-state + in: query + description: 'The address-state of the Practitioner resource.' + required: false + - + name: email + in: query + description: 'The email of the Practitioner resource.' + required: false + - + name: family + in: query + description: 'The family name of the Practitioner resource.' + required: false + - + name: given + in: query + description: 'The given name of the Practitioner resource.' + required: false + - + name: phone + in: query + description: 'The phone number of the Practitioner resource.' + required: false + - + name: telecom + in: query + description: 'The fax number of the Practitioner resource.' + required: false + responses: + '200': + description: 'Returns a list of Practitioner resources.' + security: + - + openemr_auth: [] + post: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Adds a Practitioner resources.' + security: + - + openemr_auth: [] + '/fhir/Practitioner/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Practitioner resource.' + required: true + responses: + '200': + description: 'Returns a single Practitioner resource.' + security: + - + openemr_auth: [] + put: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Practitioner resource.' + required: true + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION. Modify a Practitioner resource.' + security: + - + openemr_auth: [] + /fhir/PractitionerRole: + get: + tags: + - fhir + parameters: + - + name: specialty + in: query + description: 'The specialty of the PractitionerRole resource.' + required: false + - + name: practitioner + in: query + description: 'The practitioner of the PractitionerRole resource.' + required: false + responses: + '200': + description: 'Returns a list of PractitionerRole resources.' + security: + - + openemr_auth: [] + '/fhir/PractitionerRole/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the PractitionerRole resource.' + required: true + responses: + '200': + description: 'Returns a single PractitionerRole resource.' + security: + - + openemr_auth: [] + /fhir/Procedure: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Procedure resource.' + required: false + - + name: patient + in: query + description: 'The uuid for the patient.' + required: false + - + name: date + in: query + description: 'The datetime of the Procedure resource.' + required: false + responses: + '200': + description: 'Returns a list of Procedure resources.' + security: + - + openemr_auth: [] + '/fhir/Procedure/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Procedure resource.' + required: true + responses: + '200': + description: 'Returns a single Procedure resource.' + security: + - + openemr_auth: [] + '/fhir/Provenance/{uuid}': + get: + tags: + - fhir + parameters: + - + name: uuid + in: path + description: 'The uuid for the Provenance resource.' + required: true + responses: + '200': + description: 'Returns a single Provenance resource.' + security: + - + openemr_auth: [] + /fhir/Provenance: + get: + tags: + - fhir + parameters: + - + name: _id + in: query + description: 'The uuid for the Provenance resource.' + required: false + responses: + '200': + description: 'Returns a list of Provenance resources.' + security: + - + openemr_auth: [] + /fhir/metadata: + get: + tags: + - fhir + responses: + '200': + description: 'Returns metadata of the fhir server.' + /fhir/.well-known/smart-configuration: + get: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION.' + security: + - + openemr_auth: [] + /fhir/$export: + get: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION.' + security: + - + openemr_auth: [] + /fhir/$bulkdata-status: + get: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION.' + security: + - + openemr_auth: [] + delete: + tags: + - fhir + responses: + '200': + description: 'THIS ENDPOINT DOCUMENTATION IS UNDER CONSTRUCTION.' + security: + - + openemr_auth: [] + /portal/patient: + get: + tags: + - standard-patient + responses: + '200': + description: 'Returns the patient.' + security: + - + openemr_auth: [] + /portal/patient/encounter: + get: + tags: + - standard-patient + responses: + '200': + description: 'Returns encounters for the patient.' + security: + - + openemr_auth: [] + '/portal/patient/encounter/{euuid}': + get: + tags: + - standard-patient + parameters: + - + name: euuid + in: path + description: 'The uuid for the encounter.' + required: true + responses: + '200': + description: 'Returns a selected encounter by its uuid.' + security: + - + openemr_auth: [] +components: + securitySchemes: + openemr_auth: + type: oauth2 + flows: + authorizationCode: + authorizationUrl: /oauth2/default/authorize + tokenUrl: /oauth2/default/token + scopes: + openid: 'Generic mandatory scope' + offline_access: 'Will signal server to provide a refresh token' + 'api:fhir': 'FHIR R4 API' + patient/AllergyIntolerance.read: 'Read allergy intolerance resources for the current patient (api:fhir)' + patient/CarePlan.read: 'Read care plan resources for the current patient (api:fhir)' + patient/CareTeam.read: 'Read care team resources for the current patient (api:fhir)' + patient/Condition.read: 'Read condition resources for the current patient (api:fhir)' + patient/Device.read: 'Read device resources for the current patient (api:fhir)' + patient/DiagnosticReport.read: 'Read diagnostic report resources for the current patient (api:fhir)' + patient/DocumentReference.read: 'Read document reference resources for the current patient (api:fhir)' + patient/Encounter.read: 'Read encounter resources for the current patient (api:fhir)' + patient/Goal.read: 'Read goal resources for the current patient (api:fhir)' + patient/Immunization.read: 'Read immunization resources for the current patient (api:fhir)' + patient/Location.read: 'Read location resources for the current patient (api:fhir)' + patient/Medication.read: 'Read medication resources for the current patient (api:fhir)' + patient/MedicationRequest.read: 'Read medication request resources for the current patient (api:fhir)' + patient/Observation.read: 'Read observation resources for the current patient (api:fhir)' + patient/Organization.read: 'Read organization resources for the current patient (api:fhir)' + patient/Patient.read: 'Read patient resource for the current patient (api:fhir)' + patient/Person.read: 'Read person resources for the current patient (api:fhir)' + patient/Practitioner.read: 'Read practitioner resources for the current patient (api:fhir)' + patient/Procedure.read: 'Read procedure resources for the current patient (api:fhir)' + patient/Provenance.read: 'Read provenance resources for the current patient (api:fhir)' + system/AllergyIntolerance.read: 'Read all allergy intolerance resources in the system (api:fhir)' + system/CarePlan.read: 'Read all care plan resources in the system (api:fhir)' + system/CareTeam.read: 'Read all care team resources in the system (api:fhir)' + system/Condition.read: 'Read all condition resources in the system (api:fhir)' + system/Coverage.read: 'Read all coverage resources in the system (api:fhir)' + system/Device.read: 'Read all device resources in the system (api:fhir)' + system/DiagnosticReport.read: 'Read all diagnostic report resources in the system (api:fhir)' + system/Document.read: 'Read all document resources in the system (api:fhir)' + system/DocumentReference.read: 'Read all document reference resources in the system (api:fhir)' + system/Encounter.read: 'Read all encounter resources in the system (api:fhir)' + system/Goal.read: 'Read all goal resources in the system (api:fhir)' + system/Group.read: 'Read all group resources in the system (api:fhir)' + system/Immunization.read: 'Read all immunization resources in the system (api:fhir)' + system/Location.read: 'Read all location resources in the system (api:fhir)' + system/Medication.read: 'Read all medication resources in the system (api:fhir)' + system/MedicationRequest.read: 'Read all medication request resources in the system (api:fhir)' + system/Observation.read: 'Read all observation resources in the system (api:fhir)' + system/Organization.read: 'Read all organization resources in the system (api:fhir)' + system/Patient.read: 'Read all patient resources in the system (api:fhir)' + system/Person.read: 'Read all person resources in the system (api:fhir)' + system/Practitioner.read: 'Read all practitioner resources in the system (api:fhir)' + system/PractitionerRole.read: 'Read all practitioner role resources in the system (api:fhir)' + system/Procedure.read: 'Read all procedure resources in the system (api:fhir)' + system/Provenance.read: 'Read all provenance resources in the system (api:fhir)' + user/AllergyIntolerance.read: 'Read all allergy intolerance resources the user has access to (api:fhir)' + user/CarePlan.read: 'Read all care plan resources the user has access to (api:fhir)' + user/CareTeam.read: 'Read all care team resources the user has access to (api:fhir)' + user/Condition.read: 'Read all condition resources the user has access to (api:fhir)' + user/Coverage.read: 'Read all coverage resources the user has access to (api:fhir)' + user/Device.read: 'Read all device resources the user has access to (api:fhir)' + user/DiagnosticReport.read: 'Read all diagnostic report resources the user has access to (api:fhir)' + user/DocumentReference.read: 'Read all document reference resources the user has access to (api:fhir)' + user/Encounter.read: 'Read all encounter resources the user has access to (api:fhir)' + user/Goal.read: 'Read all goal resources the user has access to (api:fhir)' + user/Immunization.read: 'Read all immunization resources the user has access to (api:fhir)' + user/Location.read: 'Read all location resources the user has access to (api:fhir)' + user/Medication.read: 'Read all medication resources the user has access to (api:fhir)' + user/MedicationRequest.read: 'Read all medication request resources the user has access to (api:fhir)' + user/Observation.read: 'Read all observation resources the user has access to (api:fhir)' + user/Organization.read: 'Read all organization resources the user has access to (api:fhir)' + user/Organization.write: 'Write all organization resources the user has access to (api:fhir)' + user/Patient.read: 'Read all patient resources the user has access to (api:fhir)' + user/Patient.write: 'Write all patient resources the user has access to (api:fhir)' + user/Person.read: 'Read all person resources the user has access to (api:fhir)' + user/Practitioner.read: 'Read all practitioner resources the user has access to (api:fhir)' + user/Practitioner.write: 'Write all practitioner resources the user has access to (api:fhir)' + user/PractitionerRole.read: 'Read all practitioner role resources the user has access to (api:fhir)' + user/Procedure.read: 'Read all procedure resources the user has access to (api:fhir)' + user/Provenance.read: 'Read all provenance resources the user has access to (api:fhir)' + 'api:oemr': 'Standard OpenEMR API' + user/allergy.read: 'Read allergies the user has access to (api:oemr)' + user/allergy.write: 'Write allergies the user has access to for (api:oemr)' + user/appointment.read: 'Read appointments the user has access to (api:oemr)' + user/appointment.write: 'Write appointments the user has access to for (api:oemr)' + user/dental_issue.read: 'Read dental issues the user has access to (api:oemr)' + user/dental_issue.write: 'Write dental issues the user has access to (api:oemr)' + user/document.read: 'Read documents the user has access to (api:oemr)' + user/document.write: 'Write documents the user has access to (api:oemr)' + user/drug.read: 'Read drugs the user has access to (api:oemr)' + user/encounter.read: 'Read encounters the user has access to (api:oemr)' + user/encounter.write: 'Write encounters the user has access to (api:oemr)' + user/facility.read: 'Read facilities the user has access to (api:oemr)' + user/facility.write: 'Write facilities the user has access to (api:oemr)' + user/immunization.read: 'Read immunizations the user has access to (api:oemr)' + user/insurance.read: 'Read insurances the user has access to (api:oemr)' + user/insurance.write: 'Write insurances the user has access to (api:oemr)' + user/insurance_company.read: 'Read insurance companies the user has access to (api:oemr)' + user/insurance_company.write: 'Write insurance companies the user has access to (api:oemr)' + user/insurance_type.read: 'Read insurance types the user has access to (api:oemr)' + user/list.read: 'Read lists the user has access to (api:oemr)' + user/medical_problem.read: 'Read medical problems the user has access to (api:oemr)' + user/medical_problem.write: 'Write medical problems the user has access to (api:oemr)' + user/medication.read: 'Read medications the user has access to (api:oemr)' + user/medication.write: 'Write medications the user has access to (api:oemr)' + user/message.write: 'Read messages the user has access to (api:oemr)' + user/patient.read: 'Read patients the user has access to (api:oemr)' + user/patient.write: 'Write patients the user has access to (api:oemr)' + user/practitioner.read: 'Read practitioners the user has access to (api:oemr)' + user/practitioner.write: 'Write practitioners the user has access to (api:oemr)' + user/prescription.read: 'Read prescriptions the user has access to (api:oemr)' + user/procedure.read: 'Read procedures the user has access to (api:oemr)' + user/soap_note.read: 'Read soap notes the user has access to (api:oemr)' + user/soap_note.write: 'Write soap notes the user has access to (api:oemr)' + user/surgery.read: 'Read surgeries the user has access to (api:oemr)' + user/surgery.write: 'Write surgeries the user has access to (api:oemr)' + user/vital.read: 'Read vitals the user has access to (api:oemr)' + user/vital.write: 'Write vitals the user has access to (api:oemr)' + 'api:port': 'Standard Patient Portal OpenEMR API' + patient/encounter.read: 'Read encounters the patient has access to (api:port)' + patient/patient.read: 'Write encounters the patient has access to (api:port)' +tags: + - + name: fhir + description: 'FHIR R4 API' + - + name: standard + description: 'Standard OpenEMR API' + - + name: standard-patient + description: 'Standard Patient Portal OpenEMR API' diff --git a/swagger/swagger-ui-bundle.js b/swagger/swagger-ui-bundle.js new file mode 100644 index 00000000000..56af1c93105 --- /dev/null +++ b/swagger/swagger-ui-bundle.js @@ -0,0 +1,3 @@ +/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=543)}([function(e,t,n){"use strict";e.exports=n(132)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function O(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return P(e,t,0)}function I(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function U(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function q(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:ue(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=N,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Z,X,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Z||(Z=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():z(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ue(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=le(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function le(e){return $(e)?new te(e):V(e)?new oe(e):z(e)?new re(e):void 0}function pe(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[n?a-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new F((function(){var e=o[n?a-i:i];return i++>a?q():U(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function he(e,t){return t?de(t,e,"",{"":e}):me(e)}function de(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return de(e,n,r,t)}))):ve(t)?e.call(r,n,K(t).map((function(n,r){return de(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?Y(e).map(me).toList():ve(e)?K(e).map(me).toMap():e}function ve(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||u(e)!==u(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ge(o[1],e)&&(n||ge(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var p=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):o?!ge(t,e.get(r,b)):!ge(e.get(r,b),t))return p=!1,!1}));return p&&e.size===f}function be(e,t){if(!(this instanceof be))return new be(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(X)return X;X=this}}function _e(e,t){if(!e)throw new Error(t)}function we(e,t,n){if(!(this instanceof we))return new we(e,t,n);if(_e(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?q():U(e,o,n[t?r-o++:o++])}))},t(ne,K),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new F((function(){var i=r[t?o-a:a];return a++>o?q():U(e,i,n[i])}))},ne.prototype[d]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=W(this._iterable),r=0;if(V(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=W(this._iterable);if(!V(n))return new F(q);var r=0;return new F((function(){var t=n.next();return t.done?t:U(e,r++,t.value)}))},t(oe,Y),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return U(e,o,r[o++])}))},t(be,Y),be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},be.prototype.get=function(e,t){return this.has(e)?this._value:t},be.prototype.includes=function(e){return ge(this._value,e)},be.prototype.slice=function(e,t){var n=this.size;return j(e,t,n)?this:new be(this._value,I(t,n)-T(e,n))},be.prototype.reverse=function(){return this},be.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},be.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},be.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?q():U(e,a++,i)}))},we.prototype.equals=function(e){return e instanceof we?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(xe,n),t(Ee,xe),t(Se,xe),t(Ce,xe),xe.Keyed=Ee,xe.Indexed=Se,xe.Set=Ce;var Ae="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ke(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ke(n)}if("string"===t)return e.length>Fe?je(e):Te(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ie(e);if("function"==typeof e.toString)return Te(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function je(e){var t=ze[e];return void 0===t&&(t=Te(e),qe===Ue&&(qe=0,ze={}),qe++,ze[e]=t),t}function Te(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Re,De="function"==typeof WeakMap;De&&(Re=new WeakMap);var Le=0,Be="__immutablehash__";"function"==typeof Symbol&&(Be=Symbol(Be));var Fe=16,Ue=255,qe=0,ze={};function Ve(e){_e(e!==1/0,"Cannot perform this action with an infinite size.")}function We(e){return null==e?ot():He(e)&&!l(e)?e:ot().withMutations((function(t){var n=r(e);Ve(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function He(e){return!(!e||!e[Je])}t(We,Ee),We.of=function(){var t=e.call(arguments,0);return ot().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},We.prototype.toString=function(){return this.__toString("Map {","}")},We.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},We.prototype.set=function(e,t){return at(this,e,t)},We.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},We.prototype.remove=function(e){return at(this,e,b)},We.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},We.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},We.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=vt(this,xn(e),t,n);return r===b?void 0:r},We.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},We.prototype.merge=function(){return ft(this,void 0,arguments)},We.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},We.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},We.prototype.mergeDeep=function(){return ft(this,ht,arguments)},We.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,dt(t),n)},We.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},We.prototype.sort=function(e){return zt(pn(this,e))},We.prototype.sortBy=function(e,t){return zt(pn(this,t,e))},We.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},We.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},We.prototype.asImmutable=function(){return this.__ensureOwner()},We.prototype.wasAltered=function(){return this.__altered},We.prototype.__iterator=function(e,t){return new et(this,e,t)},We.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},We.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},We.isMap=He;var $e,Je="@@__IMMUTABLE_MAP__@@",Ke=We.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return U(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(Ke);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return $e||($e=rt(0))}function at(e,t,n){var r,o;if(e._root){var a=x(_),i=x(w);if(r=it(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===b?-1:1:0)}else{if(n===b)return e;o=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function it(e,t,n,r,o,a,i,s){return e?e.update(t,n,r,o,a,i,s):a===b?e:(E(s),E(i),new Qe(t,r,[o,a]))}function st(e){return e.constructor===Qe||e.constructor===Xe}function ut(e,t,n,r,o){if(e.keyHash===r)return new Xe(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Ge(t,1<>>=1)i[s]=1&n?t[a++]:void 0;return i[r]=o,new Ze(e,a+1,i)}function ft(e,t,n){for(var o=[],a=0;a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var o=r?e:C(e);return o[t]=n,o}function bt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,s=0;s=wt)return ct(e,u,r,o);var f=e&&e===this.ownerID,h=f?u:C(u);return p?s?c===l-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),f?(this.entries=h,this):new Ye(e,h)}},Ge.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[gt(a&o-1)].get(e+v,t,n,r)},Ge.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&y,u=1<=xt)return pt(e,f,c,s,d);if(l&&!d&&2===f.length&&st(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&st(d))return d;var m=e&&e===this.ownerID,g=l?d?c:c^u:c|u,_=l?d?yt(f,p,d,m):_t(f,p,m):bt(f,p,d,m);return m?(this.bitmap=g,this.nodes=_,this):new Ge(e,g,_)},Ze.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+v,t,n,r):r},Ze.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&y,u=o===b,c=this.nodes,l=c[s];if(u&&!l)return this;var p=it(l,e,t+v,n,r,o,a,i);if(p===l)return this;var f=this.count;if(l){if(!p&&--f0&&r=0&&e>>t&y;if(r>=this.array.length)return new Ot([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-v,n))===i&&a)return this}if(a&&!o)return this;var s=Lt(this,e);if(!a)for(var u=0;u>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-v,n))===a&&o===this.array.length-1)return this}var i=Lt(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var jt,Tt,It={};function Pt(e,t){var n=e._origin,r=e._capacity,o=qt(r),a=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?s(e,n):u(e,t,n)}function s(e,i){var s=i===o?a&&a.array:e&&e.array,u=i>n?0:n-i,c=r-i;return c>g&&(c=g),function(){if(u===c)return It;var e=t?--c:u++;return s&&s[e]}}function u(e,o,a){var s,u=e&&e.array,c=a>n?0:n-a>>o,l=1+(r-a>>o);return l>g&&(l=g),function(){for(;;){if(s){var e=s();if(e!==It)return e;s=null}if(c===l)return It;var n=t?--l:c++;s=i(u&&u[n],o-v,a+(n<=e.size||t<0)return e.withMutations((function(e){t<0?Ft(e,t).set(0,n):Ft(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=x(w);return t>=qt(e._capacity)?r=Dt(r,e.__ownerID,0,t,n,a):o=Dt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Nt(e._origin,e._capacity,e._level,o,r):e}function Dt(e,t,n,r,o,a){var i,s=r>>>n&y,u=e&&s0){var c=e&&e.array[s],l=Dt(c,t,n-v,r,o,a);return l===c?e:((i=Lt(e,t)).array[s]=l,i)}return u&&e.array[s]===o?e:(E(a),i=Lt(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new Ot(e?e.array.slice():[],t)}function Bt(e,t){if(t>=qt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&y],r-=v;return n}}function Ft(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,o=e._origin,a=e._capacity,i=o+t,s=void 0===n?a:n<0?a+n:o+n;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var u=e._level,c=e._root,l=0;i+l<0;)c=new Ot(c&&c.array.length?[void 0,c]:[],r),l+=1<<(u+=v);l&&(i+=l,o+=l,s+=l,a+=l);for(var p=qt(a),f=qt(s);f>=1<p?new Ot([],r):h;if(h&&f>p&&iv;g-=v){var b=p>>>g&y;m=m.array[b]=Lt(m.array[b],r)}m.array[p>>>v&y]=h}if(s=f)i-=f,s-=f,u=v,c=null,d=d&&d.removeBefore(r,0,i);else if(i>o||f>>u&y;if(_!==f>>>u&y)break;_&&(l+=(1<o&&(c=c.removeBefore(r,u,i-l)),c&&fa&&(a=c.size),i(u)||(c=c.map((function(e){return he(e)}))),r.push(c)}return a>e.size&&(e=e.setSize(a)),mt(e,t,r)}function qt(e){return e>>v<=g&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(u){if(n===i.get(s)[1])return e;r=a,o=i.set(s,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Wt(r,o)}function Jt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Zt(e){var t=bn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=_n,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===R){var r=e.__iterator(t,n);return new F((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===M?N:M,n)},t}function Xt(e,t,n){var r=bn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,b);return a===b?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(R,o);return new F((function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return U(r,s,t.call(n,i[1],s,e),o)}))},r}function Qt(e,t){var n=bn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Zt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=_n,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=bn(e);return r&&(o.has=function(r){var o=e.get(r,b);return o!==b&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,b);return a!==b&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate((function(e,a,u){if(t.call(n,e,a,u))return s++,o(e,r?a:s-1,i)}),a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(R,a),s=0;return new F((function(){for(;;){var a=i.next();if(a.done)return a;var u=a.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return U(o,r?c:s++,l,a)}}))},o}function tn(e,t,n){var r=We().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(l(e)?zt():We()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=yn(e);return o.map((function(t){return mn(e,a(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),j(t,n,o))return e;var a=T(t,o),i=I(n,o);if(a!=a||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var s,u=i-a;u==u&&(s=u<0?0:u);var c=bn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ae(e)&&s>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&ts)return q();var e=o.next();return r||t===M?e:U(t,u-1,t===N?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(R,o),s=!0;return new F((function(){if(!s)return q();var e=i.next();if(e.done)return e;var o=e.value,u=o[0],c=o[1];return t.call(n,c,u,a)?r===R?e:U(r,u,c,e):(s=!1,q())}))},r}function an(e,t,n,r){var o=bn(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,u=0;return e.__iterate((function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return u++,o(e,r?a:u-1,i)})),u},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(R,a),u=!0,c=0;return new F((function(){var e,a,l;do{if((e=s.next()).done)return r||o===M?e:U(o,c++,o===N?void 0:e.value[1],e);var p=e.value;a=p[0],l=p[1],u&&(u=t.call(n,l,a,i))}while(u);return o===R?e:U(o,a,l,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?se(e):ue(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&s(a)||u(e)&&u(a))return a}var c=new te(o);return n?c=c.toKeyedSeq():u(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function un(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=0,s=!1;function u(e,c){var l=this;e.__iterate((function(e,o){return(!t||c0}function dn(e,t,r){var o=bn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(M,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),W(o?e.reverse():e)})),i=0,s=!1;return new F((function(){var n;return s||(n=a.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?q():U(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function mn(e,t){return ae(e)?t:e.constructor(t)}function vn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Ve(e.size),A(e)}function yn(e){return s(e)?r:u(e)?o:a}function bn(e){return Object.create((s(e)?K:u(e)?Y:G).prototype)}function _n(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function wn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kn(e,t)},Vn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ve(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kn(t,n)},Vn.prototype.pop=function(){return this.slice(1)},Vn.prototype.unshift=function(){return this.push.apply(this,arguments)},Vn.prototype.unshiftAll=function(e){return this.pushAll(e)},Vn.prototype.shift=function(){return this.pop.apply(this,arguments)},Vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yn()},Vn.prototype.slice=function(e,t){if(j(e,t,this.size))return this;var n=T(e,this.size);if(I(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Kn(r,o)},Vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new F((function(){if(r){var t=r.value;return r=r.next,U(e,n++,t)}return q()}))},Vn.isStack=Wn;var Hn,$n="@@__IMMUTABLE_STACK__@@",Jn=Vn.prototype;function Kn(e,t,n,r){var o=Object.create(Jn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Yn(){return Hn||(Hn=Kn(0))}function Gn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Jn[$n]=!0,Jn.withMutations=Ke.withMutations,Jn.asMutable=Ke.asMutable,Jn.asImmutable=Ke.asImmutable,Jn.wasAltered=Ke.wasAltered,n.Iterator=F,Gn(n,{toArray:function(){Ve(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Jt(this,!0)},toMap:function(){return We(this.toKeyedSeq())},toObject:function(){Ve(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return zt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(s(this)?this.valueSeq():this)},toSet:function(){return jn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ge(t,e)}))},entries:function(){return this.__iterator(R)},every:function(e,t){Ve(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ve(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ve(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(N)},map:function(e,t){return mn(this,Xt(this,e,t))},reduce:function(e,t,n){var r,o;return Ve(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Qt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,pn(this,e))},values:function(){return this.__iterator(M)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return A(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,a){if(e.call(t,n,o,a))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(O)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,un(this,e,!0))},fromEntrySeq:function(){return new Gt(this)},get:function(e,t){return this.find((function(t,n){return ge(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=xn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,b):b)===b)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ge(t,e)}))},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):ar)},minBy:function(e,t){return fn(this,t?nr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,pn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var Zn=n.prototype;Zn[p]=!0,Zn[B]=Zn.values,Zn.__toJS=Zn.toArray,Zn.__toStringMapper=rr,Zn.inspect=Zn.toSource=function(){return this.toString()},Zn.chain=Zn.flatMap,Zn.contains=Zn.includes,Gn(r,{flip:function(){return mn(this,Zt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Xn=r.prototype;function Qn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return C(arguments)}function ar(e,t){return et?-1:0}function ir(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return sr(e.__iterate(n?t?function(e,t){r=31*r+ur(Oe(e),Oe(t))|0}:function(e,t){r=r+ur(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0}),r)}function sr(e,t){return t=Ae(t,3432918353),t=Ae(t<<15|t>>>-15,461845907),t=Ae(t<<13|t>>>-13,5),t=Ae((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ke((t=Ae(t^t>>>13,3266489909))^t>>>16)}function ur(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Xn[f]=!0,Xn[B]=Zn.entries,Xn.__toJS=Zn.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Gn(o,{toKeyedSeq:function(){return new Jt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Qt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(C(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,un(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function Pe(e){return t=e.replace(/\.[^./]*$/,""),Y()(J()(t));var t}function Ne(e,t,n,r,a){if(!t)return[];var s=[],u=t.get("nullable"),c=t.get("required"),p=t.get("maximum"),h=t.get("minimum"),d=t.get("type"),m=t.get("format"),g=t.get("maxLength"),b=t.get("minLength"),w=t.get("uniqueItems"),x=t.get("maxItems"),E=t.get("minItems"),S=t.get("pattern"),C=n||!0===c,A=null!=e;if(u&&null===e||!d||!(C||A&&"array"===d||!(!C&&!A)))return[];var k="string"===d&&e,O="array"===d&&l()(e)&&e.length,j="array"===d&&W.a.List.isList(e)&&e.count(),T=[k,O,j,"array"===d&&"string"==typeof e&&e,"file"===d&&e instanceof se.a.File,"boolean"===d&&(e||!1===e),"number"===d&&(e||0===e),"integer"===d&&(e||0===e),"object"===d&&"object"===i()(e)&&null!==e,"object"===d&&"string"==typeof e&&e],I=P()(T).call(T,(function(e){return!!e}));if(C&&!I&&!r)return s.push("Required field is not provided"),s;if("object"===d&&(null===a||"application/json"===a)){var N,M=e;if("string"==typeof e)try{M=JSON.parse(e)}catch(e){return s.push("Parameter string value must be valid JSON"),s}if(t&&t.has("required")&&Ee(c.isList)&&c.isList()&&y()(c).call(c,(function(e){void 0===M[e]&&s.push({propKey:e,error:"Required property not found"})})),t&&t.has("properties"))y()(N=t.get("properties")).call(N,(function(e,t){var n=Ne(M[t],e,!1,r,a);s.push.apply(s,o()(f()(n).call(n,(function(e){return{propKey:t,error:e}}))))}))}if(S){var R=function(e,t){if(!new RegExp(t).test(e))return"Value must follow pattern "+t}(e,S);R&&s.push(R)}if(E&&"array"===d){var D=function(e,t){var n;if(!e&&t>=1||e&&e.lengtht)return v()(n="Array must not contain more then ".concat(t," item")).call(n,1===t?"":"s")}(e,x);L&&s.push({needRemove:!0,error:L})}if(w&&"array"===d){var B=function(e,t){if(e&&("true"===t||!0===t)){var n=Object(V.fromJS)(e),r=n.toSet();if(e.length>r.size){var o=Object(V.Set)();if(y()(n).call(n,(function(e,t){_()(n).call(n,(function(t){return Ee(t.equals)?t.equals(e):t===e})).size>1&&(o=o.add(t))})),0!==o.size)return f()(o).call(o,(function(e){return{index:e,error:"No duplicates allowed."}})).toArray()}}}(e,w);B&&s.push.apply(s,o()(B))}if(g||0===g){var F=function(e,t){var n;if(e.length>t)return v()(n="Value must be no longer than ".concat(t," character")).call(n,1!==t?"s":"")}(e,g);F&&s.push(F)}if(b){var U=function(e,t){var n;if(e.lengtht)return"Value must be less than ".concat(t)}(e,p);q&&s.push(q)}if(h||0===h){var z=function(e,t){if(e2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,a=n.bypassRequiredCheck,i=void 0!==a&&a,s=e.get("required"),u=Object(le.a)(e,{isOAS3:o}),c=u.schema,l=u.parameterContentMediaType;return Ne(t,c,s,i,l)},Re=function(e,t,n){if(e&&(!e.xml||!e.xml.name)){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(ie.memoizedCreateXMLExample)(e,t,n)},De=[{when:/json/,shouldStringifyTypes:["string"]}],Le=["object"],Be=function(e,t,n,r){var a=Object(ie.memoizedSampleFromSchema)(e,t,r),s=i()(a),u=S()(De).call(De,(function(e,t){var r;return t.when.test(n)?v()(r=[]).call(r,o()(e),o()(t.shouldStringifyTypes)):e}),Le);return te()(u,(function(e){return e===s}))?M()(a,null,2):a},Fe=function(e,t,n,r){var o,a=Be(e,t,n,r);try{"\n"===(o=me.a.dump(me.a.load(a),{lineWidth:-1}))[o.length-1]&&(o=T()(o).call(o,0,o.length-1))}catch(e){return console.error(e),"error: could not generate yaml example"}return o.replace(/\t/g," ")},Ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return e&&Ee(e.toJS)&&(e=e.toJS()),r&&Ee(r.toJS)&&(r=r.toJS()),/xml/.test(t)?Re(e,n,r):/(yaml|yml)/.test(t)?Fe(e,n,t,r):Be(e,n,t,r)},qe=function(){var e={},t=se.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},ze=function(t){return(t instanceof e?t:e.from(t.toString(),"utf-8")).toString("base64")},Ve={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},We=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},He=function(e,t,n){return!!Q()(n,(function(n){return re()(e[n],t[n])}))};function $e(e){return"string"!=typeof e||""===e?"":Object(H.sanitizeUrl)(e)}function Je(e){return!(!e||D()(e).call(e,"localhost")>=0||D()(e).call(e,"127.0.0.1")>=0||"none"===e)}function Ke(e){if(!W.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=B()(e).call(e,(function(e,t){return U()(t).call(t,"2")&&x()(e.get("content")||{}).length>0})),n=e.get("default")||W.a.OrderedMap(),r=(n.get("content")||W.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var Ye=function(e){return"string"==typeof e||e instanceof String?z()(e).call(e).replace(/\s/g,"%20"):""},Ge=function(e){return ce()(Ye(e).replace(/%20/g,"_"))},Ze=function(e){return _()(e).call(e,(function(e,t){return/^x-/.test(t)}))},Xe=function(e){return _()(e).call(e,(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)}))};function Qe(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==i()(e)||l()(e)||null===e||!t)return e;var o=A()({},e);return y()(n=x()(o)).call(n,(function(e){e===t&&r(o[e],e)?delete o[e]:o[e]=Qe(o[e],t,r)})),o}function et(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===i()(e)&&null!==e)try{return M()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function tt(e){return"number"==typeof e?e.toString():e}function nt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,a=void 0===o||o;if(!W.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var i,s,u,c=e.get("name"),l=e.get("in"),p=[];e&&e.hashCode&&l&&c&&a&&p.push(v()(i=v()(s="".concat(l,".")).call(s,c,".hash-")).call(i,e.hashCode()));l&&c&&p.push(v()(u="".concat(l,".")).call(u,c));return p.push(c),r?p:p[0]||""}function rt(e,t){var n,r=nt(e,{returnAll:!0});return _()(n=f()(r).call(r,(function(e){return t[e]}))).call(n,(function(e){return void 0!==e}))[0]}function ot(){return it(fe()(32).toString("base64"))}function at(e){return it(de()("sha256").update(e).digest("base64"))}function it(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var st=function(e){return!e||!(!ge(e)||!e.isEmpty())}}).call(this,n(73).Buffer)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(240);function o(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,a=null;return function(){return o(t,n,arguments)||(a=e.apply(null,arguments)),n=arguments,a}}))},function(e,t,n){e.exports=n(668)},function(e,t,n){var r=n(175),o=n(572);function a(t){return"function"==typeof r&&"symbol"==typeof o?(e.exports=a=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),a(t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(598)},function(e,t,n){e.exports=n(596)},function(e,t,n){"use strict";var r=n(40),o=n(127).f,a=n(362),i=n(34),s=n(107),u=n(67),c=n(55),l=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,p,f,h,d,m,v,g,y=e.target,b=e.global,_=e.stat,w=e.proto,x=b?r:_?r[y]:(r[y]||{}).prototype,E=b?i:i[y]||(i[y]={}),S=E.prototype;for(f in t)n=!a(b?f:y+(_?".":"#")+f,e.forced)&&x&&c(x,f),d=E[f],n&&(m=e.noTargetGet?(g=o(x,f))&&g.value:x[f]),h=n&&m?m:t[f],n&&typeof d==typeof h||(v=e.bind&&n?s(h,r):e.wrap&&n?l(h):w&&"function"==typeof h?s(Function.call,h):h,(e.sham||h&&h.sham||d&&d.sham)&&u(v,"sham",!0),E[f]=v,w&&(c(i,p=y+"Prototype")||u(i,p,{}),i[p][f]=h,e.real&&S&&!S[f]&&u(S,f,h)))}},function(e,t,n){e.exports=n(601)},function(e,t,n){e.exports=n(401)},function(e,t,n){var r=n(448),o=n(449),a=n(854),i=n(856),s=n(860),u=n(862),c=n(867),l=n(240),p=n(3);function f(e,t){var n=r(e);if(o){var s=o(e);t&&(s=a(s).call(s,(function(t){return i(e,t).enumerable}))),n.push.apply(n,s)}return n}e.exports=function(e){for(var t=1;t>",i=function(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};i.isRequired=i;var s=function(){return i};function u(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof o.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function c(e){function t(t,n,r,o,i,s){for(var u=arguments.length,c=Array(u>6?u-6:0),l=6;l4)}function l(e){var t=e.get("swagger");return"string"==typeof t&&i()(t).call(t,"2.0")}function p(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?c(n.specSelectors.specJson())?u.a.createElement(e,o()({},r,n,{Ori:t})):u.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){e.exports=n(592)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=i(e),c=1;c0){var o=v()(n).call(n,(function(e){return console.error(e),e.line=e.fullPath?_(w,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e}));a.newThrownErrBatch(o)}return r.updateResolved(t)}))}},Se=[],Ce=Y()(u()(f.a.mark((function e(){var t,n,r,o,a,i,s,c,l,p,h,m,g,b,w,E,C,k;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Se.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,a=o.resolveSubtree,i=o.fetch,s=o.AST,c=void 0===s?{}:s,l=t.specSelectors,p=t.specActions,a){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return h=c.getLineNumberForPath?c.getLineNumberForPath:function(){},m=l.specStr(),g=t.getConfigs(),b=g.modelPropertyMacro,w=g.parameterMacro,E=g.requestInterceptor,C=g.responseInterceptor,e.prev=11,e.next=14,_()(Se).call(Se,function(){var e=u()(f.a.mark((function e(t,o){var s,c,p,g,_,k,j,T,I;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return s=e.sent,c=s.resultMap,p=s.specWithCurrentSubtrees,e.next=7,a(p,o,{baseDoc:l.url(),modelPropertyMacro:b,parameterMacro:w,requestInterceptor:E,responseInterceptor:C});case 7:if(g=e.sent,_=g.errors,k=g.spec,r.allErrors().size&&n.clearBy((function(e){var t;return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!x()(t=e.get("fullPath")).call(t,(function(e,t){return e===o[t]||void 0===o[t]}))})),d()(_)&&_.length>0&&(j=v()(_).call(_,(function(e){return e.line=e.fullPath?h(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e})),n.newThrownErrBatch(j)),!k||!l.isOAS3()||"components"!==o[0]||"securitySchemes"!==o[1]){e.next=15;break}return e.next=15,S.a.all(v()(T=A()(I=O()(k)).call(I,(function(e){return"openIdConnect"===e.type}))).call(T,function(){var e=u()(f.a.mark((function e(t){var n,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={url:t.openIdConnectUrl,requestInterceptor:E,responseInterceptor:C},e.prev=1,e.next=4,i(n);case 4:(r=e.sent)instanceof Error||r.status>=400?console.error(r.statusText+" "+n.url):t.openIdConnectData=JSON.parse(r.text),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()));case 15:return Z()(c,o,k),Z()(p,o,k),e.abrupt("return",{resultMap:c,specWithCurrentSubtrees:p});case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),S.a.resolve({resultMap:(l.specResolvedSubtree([])||Object(z.Map)()).toJS(),specWithCurrentSubtrees:l.specJson().toJS()}));case 14:k=e.sent,delete Se.system,Se=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:p.updateResolvedSubtree([],k.resultMap);case 23:case"end":return e.stop()}}),e,null,[[11,19]])}))),35),Ae=function(e){return function(t){var n;T()(n=v()(Se).call(Se,(function(e){return e.join("@@")}))).call(n,e.join("@@"))>-1||(Se.push(e),Se.system=t,Ce())}};function ke(e,t,n,r,o){return{type:re,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function Oe(e,t,n,r){return{type:re,payload:{path:e,param:t,value:n,isXml:r}}}var je=function(e,t){return{type:me,payload:{path:e,value:t}}},Te=function(){return{type:me,payload:{path:[],value:Object(z.Map)()}}},Ie=function(e,t){return{type:ae,payload:{pathMethod:e,isOAS3:t}}},Pe=function(e,t,n,r){return{type:oe,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Ne(e){return{type:fe,payload:{pathMethod:e}}}function Me(e,t){return{type:he,payload:{path:e,value:t,key:"consumes_value"}}}function Re(e,t){return{type:he,payload:{path:e,value:t,key:"produces_value"}}}var De=function(e,t,n){return{payload:{path:e,method:t,res:n},type:ie}},Le=function(e,t,n){return{payload:{path:e,method:t,req:n},type:se}},Be=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ue}},Fe=function(e){return{payload:e,type:ce}},Ue=function(e){return function(t){var n,r,o=t.fn,a=t.specActions,i=t.specSelectors,s=t.getConfigs,c=t.oas3Selectors,l=e.pathName,p=e.method,h=e.operation,m=s(),g=m.requestInterceptor,y=m.responseInterceptor,b=h.toJS();h&&h.get("parameters")&&P()(n=A()(r=h.get("parameters")).call(r,(function(e){return e&&!0===e.get("allowEmptyValue")}))).call(n,(function(t){if(i.parameterInclusionSettingFor([l,p],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(X.B)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}}));if(e.contextUrl=W()(i.url()).toString(),b&&b.operationId?e.operationId=b.operationId:b&&l&&p&&(e.operationId=o.opId(b,l,p)),i.isOAS3()){var _,w=M()(_="".concat(l,":")).call(_,p);e.server=c.selectedServer(w)||c.selectedServer();var x=c.serverVariables({server:e.server,namespace:w}).toJS(),E=c.serverVariables({server:e.server}).toJS();e.serverVariables=D()(x).length?x:E,e.requestContentType=c.requestContentType(l,p),e.responseContentType=c.responseContentType(l,p)||"*/*";var S,C=c.requestBodyValue(l,p),k=c.requestBodyInclusionSetting(l,p);if(C&&C.toJS)e.requestBody=A()(S=v()(C).call(C,(function(e){return z.Map.isMap(e)?e.get("value"):e}))).call(S,(function(e,t){return(d()(e)?0!==e.length:!Object(X.q)(e))||k.get(t)})).toJS();else e.requestBody=C}var O=B()({},e);O=o.buildRequest(O),a.setRequest(e.pathName,e.method,O);var j=function(){var t=u()(f.a.mark((function t(n){var r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g.apply(undefined,[n]);case 2:return r=t.sent,o=B()({},r),a.setMutatedRequest(e.pathName,e.method,o),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();e.requestInterceptor=j,e.responseInterceptor=y;var T=U()();return o.execute(e).then((function(t){t.duration=U()()-T,a.setResponse(e.pathName,e.method,t)})).catch((function(t){"Failed to fetch"===t.message&&(t.name="",t.message='**Failed to fetch.** \n**Possible Reasons:** \n - CORS \n - Network Failure \n - URL scheme must be "http" or "https" for CORS request.'),a.setResponse(e.pathName,e.method,{error:!0,err:Object(H.serializeError)(t)})}))}},qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=i()(e,Q);return function(e){var a=e.fn.fetch,i=e.specSelectors,s=e.specActions,u=i.specJsonWithResolvedSubtrees().toJS(),c=i.operationScheme(t,n),l=i.contentTypeValues([t,n]).toJS(),p=l.requestContentType,f=l.responseContentType,h=/xml/i.test(p),d=i.parameterValues([t,n],h).toJS();return s.executeRequest(o()(o()({},r),{},{fetch:a,spec:u,pathName:t,method:n,parameters:d,requestContentType:p,scheme:c,responseContentType:f}))}};function ze(e,t){return{type:le,payload:{path:e,method:t}}}function Ve(e,t){return{type:pe,payload:{path:e,method:t}}}function We(e,t,n){return{type:ve,payload:{scheme:e,path:t,method:n}}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(37);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(175),o=n(243),a=n(242),i=n(185);e.exports=function(e,t){var n=void 0!==r&&o(e)||e["@@iterator"];if(!n){if(a(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var s=0,u=function(){};return{s:u,n:function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,p=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){p=!0,c=e},f:function(){try{l||null==n.return||n.return()}finally{if(p)throw c}}}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(47);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(449),o=n(450),a=n(872);e.exports=function(e,t){if(null==e)return{};var n,i,s=a(e,t);if(r){var u=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SELECTED_SERVER",(function(){return r})),n.d(t,"UPDATE_REQUEST_BODY_VALUE",(function(){return o})),n.d(t,"UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG",(function(){return a})),n.d(t,"UPDATE_REQUEST_BODY_INCLUSION",(function(){return i})),n.d(t,"UPDATE_ACTIVE_EXAMPLES_MEMBER",(function(){return s})),n.d(t,"UPDATE_REQUEST_CONTENT_TYPE",(function(){return u})),n.d(t,"UPDATE_RESPONSE_CONTENT_TYPE",(function(){return c})),n.d(t,"UPDATE_SERVER_VARIABLE_VALUE",(function(){return l})),n.d(t,"SET_REQUEST_BODY_VALIDATE_ERROR",(function(){return p})),n.d(t,"CLEAR_REQUEST_BODY_VALIDATE_ERROR",(function(){return f})),n.d(t,"CLEAR_REQUEST_BODY_VALUE",(function(){return h})),n.d(t,"setSelectedServer",(function(){return d})),n.d(t,"setRequestBodyValue",(function(){return m})),n.d(t,"setRetainRequestBodyValueFlag",(function(){return v})),n.d(t,"setRequestBodyInclusion",(function(){return g})),n.d(t,"setActiveExamplesMember",(function(){return y})),n.d(t,"setRequestContentType",(function(){return b})),n.d(t,"setResponseContentType",(function(){return _})),n.d(t,"setServerVariableValue",(function(){return w})),n.d(t,"setRequestBodyValidateError",(function(){return x})),n.d(t,"clearRequestBodyValidateError",(function(){return E})),n.d(t,"initRequestBodyValidateError",(function(){return S})),n.d(t,"clearRequestBodyValue",(function(){return C}));var r="oas3_set_servers",o="oas3_set_request_body_value",a="oas3_set_request_body_retain_flag",i="oas3_set_request_body_inclusion",s="oas3_set_active_examples_member",u="oas3_set_request_content_type",c="oas3_set_response_content_type",l="oas3_set_server_variable_value",p="oas3_set_request_body_validate_error",f="oas3_clear_request_body_validate_error",h="oas3_clear_request_body_value";function d(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}}function m(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}}var v=function(e){var t=e.value,n=e.pathMethod;return{type:a,payload:{value:t,pathMethod:n}}};function g(e){var t=e.value,n=e.pathMethod,r=e.name;return{type:i,payload:{value:t,pathMethod:n,name:r}}}function y(e){var t=e.name,n=e.pathMethod,r=e.contextType,o=e.contextName;return{type:s,payload:{name:t,pathMethod:n,contextType:r,contextName:o}}}function b(e){var t=e.value,n=e.pathMethod;return{type:u,payload:{value:t,pathMethod:n}}}function _(e){var t=e.value,n=e.path,r=e.method;return{type:c,payload:{value:t,path:n,method:r}}}function w(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:l,payload:{server:t,namespace:n,key:r,val:o}}}var x=function(e){var t=e.path,n=e.method,r=e.validationErrors;return{type:p,payload:{path:t,method:n,validationErrors:r}}},E=function(e){var t=e.path,n=e.method;return{type:f,payload:{path:t,method:n}}},S=function(e){var t=e.pathMethod;return{type:f,payload:{path:t[0],method:t[1]}}},C=function(e){var t=e.pathMethod;return{type:h,payload:{pathMethod:t}}}},function(e,t,n){var r=n(60),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"a",(function(){return b})),n.d(t,"d",(function(){return _}));var r=n(49),o=n.n(r),a=n(18),i=n.n(a),s=n(2),u=n.n(s),c=n(57),l=n.n(c),p=n(356),f=n.n(p),h=function(e){return String.prototype.toLowerCase.call(e)},d=function(e){return e.replace(/[^\w]/gi,"_")};function m(e){var t=e.openapi;return!!t&&f()(t,"3")}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==i()(e))return null;var a=(e.operationId||"").replace(/\s/g,"");return a.length?d(e.operationId):g(t,n,{v2OperationIdCompatibilityMode:o})}function g(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var a,i,s=u()(a="".concat(t.toLowerCase(),"_")).call(a,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(s=s||u()(i="".concat(e.substring(1),"_")).call(i,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return u()(n="".concat(h(t))).call(n,d(e))}function y(e,t){var n;return u()(n="".concat(h(t),"-")).call(n,e)}function b(e,t){return e&&e.paths?function(e,t){return function(e,t,n){if(!e||"object"!==i()(e)||!e.paths||"object"!==i()(e.paths))return null;var r=e.paths;for(var o in r)for(var a in r[o])if("PARAMETERS"!==a.toUpperCase()){var s=r[o][a];if(s&&"object"===i()(s)){var u={spec:e,pathName:o,method:a.toUpperCase(),operation:s},c=t(u);if(n&&c)return u}}return}(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==i()(o))return!1;var a=o.operationId;return[v(o,n,r),y(n,r),a].some((function(e){return e&&e===t}))})):null}function _(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var a in n){var i=n[a];if(l()(i)){var s=i.parameters,c=function(e){var n=i[e];if(!l()(n))return"continue";var c=v(n,a,e);if(c){r[c]?r[c].push(n):r[c]=[n];var p=r[c];if(p.length>1)p.forEach((function(e,t){var n;e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=u()(n="".concat(c)).call(n,t+1)}));else if(void 0!==n.operationId){var f=p[0];f.__originalOperationId=f.__originalOperationId||n.operationId,f.operationId=c}}if("parameters"!==e){var h=[],d={};for(var m in t)"produces"!==m&&"consumes"!==m&&"security"!==m||(d[m]=t[m],h.push(d));if(s&&(d.parameters=s,h.push(d)),h.length){var g,y=o()(h);try{for(y.s();!(g=y.n()).done;){var b=g.value;for(var _ in b)if(n[_]){if("parameters"===_){var w,x=o()(b[_]);try{var E=function(){var e=w.value;n[_].some((function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e}))||n[_].push(e)};for(x.s();!(w=x.n()).done;)E()}catch(e){x.e(e)}finally{x.f()}}}else n[_]=b[_]}}catch(e){y.e(e)}finally{y.f()}}}};for(var p in i)c(p)}}return t.$$normalized=!0,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",(function(){return o})),n.d(t,"NEW_THROWN_ERR_BATCH",(function(){return a})),n.d(t,"NEW_SPEC_ERR",(function(){return i})),n.d(t,"NEW_SPEC_ERR_BATCH",(function(){return s})),n.d(t,"NEW_AUTH_ERR",(function(){return u})),n.d(t,"CLEAR",(function(){return c})),n.d(t,"CLEAR_BY",(function(){return l})),n.d(t,"newThrownErr",(function(){return p})),n.d(t,"newThrownErrBatch",(function(){return f})),n.d(t,"newSpecErr",(function(){return h})),n.d(t,"newSpecErrBatch",(function(){return d})),n.d(t,"newAuthErr",(function(){return m})),n.d(t,"clear",(function(){return v})),n.d(t,"clearBy",(function(){return g}));var r=n(145),o="err_new_thrown_err",a="err_new_thrown_err_batch",i="err_new_spec_err",s="err_new_spec_err_batch",u="err_new_auth_err",c="err_clear",l="err_clear_by";function p(e){return{type:o,payload:Object(r.serializeError)(e)}}function f(e){return{type:a,payload:e}}function h(e){return{type:i,payload:e}}function d(e){return{type:s,payload:e}}function m(e){return{type:u,payload:e}}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:l,payload:e}}},function(e,t,n){var r=n(106);e.exports=function(e){return Object(r(e))}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(73),o=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=i),a(o,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(34),o=n(40),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(407),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){"use strict";e.exports={debugTool:null}},function(e,t,n){"use strict";(function(e){var r=n(588),o=n(589),a=n(376);function i(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var a,i=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var p=!0,f=0;fo&&(r=o):r=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var i=0;i>8,o=n%256,a.push(o),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[o+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(u=(15&c)<<12|(63&a)<<6|63&i)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(a,i),c=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,o,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function D(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,a){return a||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,a=0;++a=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(51))},function(e,t,n){"use strict";function r(e){return null==e}var o={isNothing:r,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:r(e)?[]:[e]},repeat:function(e,t){var n,r="";for(n=0;ns&&(t=r-s+(a=" ... ").length),n-r>s&&(n=r+s-(i=" ...").length),{str:a+e.slice(t,n).replace(/\t/g,"→")+i,pos:r-t+a.length}}function c(e,t){return o.repeat(" ",t-e.length)+e}var l=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,a=[0],i=[],s=-1;n=r.exec(e.buffer);)i.push(n.index),a.push(n.index+n[0].length),e.position<=n.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var l,p,f="",h=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)p=u(e.buffer,a[s-l],i[s-l],e.position-(a[s]-a[s-l]),d),f=o.repeat(" ",t.indent)+c((e.line-l+1).toString(),h)+" | "+p.str+"\n"+f;for(p=u(e.buffer,a[s],i[s],e.position,d),f+=o.repeat(" ",t.indent)+c((e.line+1).toString(),h)+" | "+p.str+"\n",f+=o.repeat("-",t.indent+h+3+p.pos)+"^\n",l=1;l<=t.linesAfter&&!(s+l>=i.length);l++)p=u(e.buffer,a[s+l],i[s+l],e.position-(a[s]-a[s+l]),d),f+=o.repeat(" ",t.indent)+c((e.line+l+1).toString(),h)+" | "+p.str+"\n";return f.replace(/\n$/,"")},p=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],f=["scalar","sequence","mapping"];var h=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===p.indexOf(t))throw new s('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===f.indexOf(this.kind))throw new s('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function d(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)})),n[t]=e})),n}function m(e){return this.extend(e)}m.prototype.extend=function(e){var t=[],n=[];if(e instanceof h)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new s("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(m.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=d(r,"implicit"),r.compiledExplicit=d(r,"explicit"),r.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),A=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var k=/^[-+]?[0-9]+e/;var O=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!A.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return n=e.toString(10),k.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),j=_.extend({implicit:[w,x,C,O]}),T=j,I=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),P=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var N=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==I.exec(e)||null!==P.exec(e))},construct:function(e){var t,n,r,o,a,i,s,u,c=0,l=null;if(null===(t=I.exec(e))&&(t=P.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,r,o));if(a=+t[4],i=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(l=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(l=-l)),u=new Date(Date.UTC(n,r,o,a,i,s,c)),l&&u.setTime(u.getTime()-l),u},instanceOf:Date,represent:function(e){return e.toISOString()}});var M=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var D=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=R;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=R,i=0,s=[];for(t=0;t>16&255),s.push(i>>8&255),s.push(255&i)),i=i<<6|a.indexOf(r.charAt(t));return 0===(n=o%4*6)?(s.push(i>>16&255),s.push(i>>8&255),s.push(255&i)):18===n?(s.push(i>>10&255),s.push(i>>2&255)):12===n&&s.push(i>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",o=0,a=e.length,i=R;for(t=0;t>18&63],r+=i[o>>12&63],r+=i[o>>6&63],r+=i[63&o]),o=(o<<8)+e[t];return 0===(n=a%3)?(r+=i[o>>18&63],r+=i[o>>12&63],r+=i[o>>6&63],r+=i[63&o]):2===n?(r+=i[o>>10&63],r+=i[o>>4&63],r+=i[o<<2&63],r+=i[64]):1===n&&(r+=i[o>>2&63],r+=i[o<<4&63],r+=i[64],r+=i[64]),r}}),L=Object.prototype.hasOwnProperty,B=Object.prototype.toString;var F=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,o,a,i=[],s=e;for(t=0,n=s.length;t>10),56320+(e-65536&1023))}for(var ae=new Array(256),ie=new Array(256),se=0;se<256;se++)ae[se]=re(se)?1:0,ie[se]=re(se);function ue(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||W,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ce(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=l(n),new s(t,n)}function le(e,t){throw ce(e,t)}function pe(e,t){e.onWarning&&e.onWarning.call(null,ce(e,t))}var fe={YAML:function(e,t,n){var r,o,a;null!==e.version&&le(e,"duplication of %YAML directive"),1!==n.length&&le(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&le(e,"ill-formed argument of the YAML directive"),o=parseInt(r[1],10),a=parseInt(r[2],10),1!==o&&le(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&pe(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,o;2!==n.length&&le(e,"TAG directive accepts exactly two arguments"),r=n[0],o=n[1],Y.test(r)||le(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,r)&&le(e,'there is a previously declared suffix for "'+r+'" tag handle'),G.test(o)||le(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){le(e,"tag prefix is malformed: "+o)}e.tagMap[r]=o}};function he(e,t,n,r){var o,a,i,s;if(t1&&(e.result+=o.repeat("\n",t-1))}function _e(e,t){var n,r,o=e.tag,a=e.anchor,i=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,le(e,"tab characters must not be used in indentation")),45===r)&&ee(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)i.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,Ee(e,t,3,!1,!0),i.push(e.result),ge(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)le(e,"bad indentation of a sequence entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(g&&(i=e.line,s=e.lineStart,u=e.position),Ee(e,t,4,!0,o)&&(g?m=e.result:v=e.result),g||(me(e,f,h,d,m,v,i,s,u),d=m=v=null),ge(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)le(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===a?le(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?le(e,"repeat of an indentation width identifier"):(p=t+a-1,l=!0)}if(Q(i)){do{i=e.input.charCodeAt(++e.position)}while(Q(i));if(35===i)do{i=e.input.charCodeAt(++e.position)}while(!X(i)&&0!==i)}for(;0!==i;){for(ve(e),e.lineIndent=0,i=e.input.charCodeAt(e.position);(!l||e.lineIndentp&&(p=e.lineIndent),X(i))f++;else{if(e.lineIndent0){for(o=i,a=0;o>0;o--)(i=ne(s=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+i:le(e,"expected hexadecimal character");e.result+=oe(a),e.position++}else le(e,"unknown escape sequence");n=r=e.position}else X(s)?(he(e,n,r,!0),be(e,ge(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ye(e)?le(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}le(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?g=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!ee(r)&&!te(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&le(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),H.call(e.anchorMap,n)||le(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ge(e,!0,-1),!0}(e)?function(e,t,n){var r,o,a,i,s,u,c,l,p=e.kind,f=e.result;if(ee(l=e.input.charCodeAt(e.position))||te(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(ee(r=e.input.charCodeAt(e.position+1))||n&&te(r)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,i=!1;0!==l;){if(58===l){if(ee(r=e.input.charCodeAt(e.position+1))||n&&te(r))break}else if(35===l){if(ee(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ye(e)||n&&te(l))break;if(X(l)){if(s=e.line,u=e.lineStart,c=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){i=!0,l=e.input.charCodeAt(e.position);continue}e.position=a,e.line=s,e.lineStart=u,e.lineIndent=c;break}}i&&(he(e,o,a,!1),be(e,e.line-s),o=a=e.position,i=!1),Q(l)||(a=e.position+1),l=e.input.charCodeAt(++e.position)}return he(e,o,a,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,h,1===n)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||le(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(g=u&&_e(e,d))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&le(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c"),null!==e.result&&f.kind!==e.kind&&le(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):le(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function Se(e){var t,n,r,o,a=e.position,i=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(i=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&le(e,"directive name must not be less than one character in length");0!==o;){for(;Q(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!X(o));break}if(X(o))break;for(t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==o&&ve(e),H.call(fe,n)?fe[n](e,n,r):pe(e,'unknown document directive "'+n+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):i&&le(e,"directives end mark is expected"),Ee(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&J.test(e.input.slice(a,e.position))&&pe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ye(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&r<=56319&&t+1=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function ze(e){return/^\n* /.test(e)}function Ve(e,t,n,r,o,a,i,s){var u,c,l=0,p=null,f=!1,h=!1,d=-1!==r,m=-1,v=Be(c=qe(e,0))&&c!==je&&!Le(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!Le(e)&&58!==e}(qe(e,e.length-1));if(t||i)for(u=0;u=65536?u+=2:u++){if(!Be(l=qe(e,u)))return 5;v=v&&Ue(l,p,s),p=l}else{for(u=0;u=65536?u+=2:u++){if(10===(l=qe(e,u)))f=!0,d&&(h=h||u-m-1>r&&" "!==e[m+1],m=u);else if(!Be(l))return 5;v=v&&Ue(l,p,s),p=l}h=h||d&&u-m-1>r&&" "!==e[m+1]}return f||h?n>9&&ze(e)?5:i?2===a?5:2:h?4:3:!v||i||o(e)?2===a?5:2:1}function We(e,t,n,r,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Ie.indexOf(t)||Pe.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),i=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),u=r||e.flowLevel>-1&&n>=e.flowLevel;switch(Ve(t,u,e.indent,i,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+He(t,e.indent)+$e(Re(function(e,t){var n,r,o=/(\n+)([^\n]*)/g,a=(s=e.indexOf("\n"),s=-1!==s?s:e.length,o.lastIndex=s,Je(e.slice(0,s),t)),i="\n"===e[0]||" "===e[0];var s;for(;r=o.exec(e);){var u=r[1],c=r[2];n=" "===c[0],a+=u+(i||n||""===c?"":"\n")+Je(c,t),i=n}return a}(t,i),a));case 5:return'"'+function(e){for(var t,n="",r=0,o=0;o=65536?o+=2:o++)r=qe(e,o),!(t=Te[r])&&Be(r)?(n+=e[o],r>=65536&&(n+=e[o+1])):n+=t||Ne(r);return n}(t)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function He(e,t){var n=ze(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function $e(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Je(e,t){if(""===e||" "===e[0])return e;for(var n,r,o=/ [^ ]/g,a=0,i=0,s=0,u="";n=o.exec(e);)(s=n.index)-a>t&&(r=i>a?i:s,u+="\n"+e.slice(a,r),a=r+1),i=s;return u+="\n",e.length-a>t&&i>a?u+=e.slice(a,i)+"\n"+e.slice(i+1):u+=e.slice(a),u.slice(1)}function Ke(e,t,n,r){var o,a,i,s="",u=e.tag;for(o=0,a=n.length;o tag resolver accepts not "'+c+'" style');r=u.represent[c](t,c)}e.dump=r}return!0}return!1}function Ge(e,t,n,r,o,a,i){e.tag=null,e.dump=n,Ye(e,n,!1)||Ye(e,n,!0);var u,c=ke.call(e.dump),l=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var p,f,h="[object Object]"===c||"[object Array]"===c;if(h&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(o=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(h&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===c)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,a,i,u,c,l,p="",f=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new s("sortKeys must be a boolean or a function");for(o=0,a=h.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=De(e,t)),Ge(e,t+1,u,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",p+=l+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,o),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var r,o,a,i,s,u="",c=e.tag,l=Object.keys(n);for(r=0,o=l.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ge(e,t,i,!1,!1)&&(u+=s+=e.dump));e.tag=c,e.dump="{"+u+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===c)r&&0!==e.dump.length?(e.noArrayIndent&&!i&&t>0?Ke(e,t-1,e.dump,o):Ke(e,t,e.dump,o),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var r,o,a,i="",s=e.tag;for(r=0,o=n.length;r",e.dump=u+" "+e.dump)}return!0}function Ze(e,t){var n,r,o=[],a=[];for(Xe(e,o,a),n=0,r=a.length;n",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),p=["%","/","?",";","#"].concat(l),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(1077);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?N+="x":N+=P[M];if(!N.match(h)){var D=T.slice(0,k),L=T.slice(k+1),B=P.match(d);B&&(D.push(B[1]),L.unshift(B[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[x])for(k=0,I=l.length;k0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=E.slice(-1)[0],A=(n.host||e.host||E.length>1)&&("."===C||".."===C)||""===C,k=0,O=E.length;O>=0;O--)"."===(C=E[O])?E.splice(O,1):".."===C?(E.splice(O,1),k++):k&&(E.splice(O,1),k--);if(!w&&!x)for(;k--;k)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var j,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(n.hostname=n.host=T?"":E.length?E.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(w=w||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",(function(){return h})),n.d(t,"AUTHORIZE",(function(){return d})),n.d(t,"LOGOUT",(function(){return m})),n.d(t,"PRE_AUTHORIZE_OAUTH2",(function(){return v})),n.d(t,"AUTHORIZE_OAUTH2",(function(){return g})),n.d(t,"VALIDATE",(function(){return y})),n.d(t,"CONFIGURE_AUTH",(function(){return b})),n.d(t,"RESTORE_AUTHORIZATION",(function(){return _})),n.d(t,"showDefinitions",(function(){return w})),n.d(t,"authorize",(function(){return x})),n.d(t,"authorizeWithPersistOption",(function(){return E})),n.d(t,"logout",(function(){return S})),n.d(t,"logoutWithPersistOption",(function(){return C})),n.d(t,"preAuthorizeImplicit",(function(){return A})),n.d(t,"authorizeOauth2",(function(){return k})),n.d(t,"authorizeOauth2WithPersistOption",(function(){return O})),n.d(t,"authorizePassword",(function(){return j})),n.d(t,"authorizeApplication",(function(){return T})),n.d(t,"authorizeAccessCodeWithFormParams",(function(){return I})),n.d(t,"authorizeAccessCodeWithBasicAuthentication",(function(){return P})),n.d(t,"authorizeRequest",(function(){return N})),n.d(t,"configureAuth",(function(){return M})),n.d(t,"restoreAuthorization",(function(){return R})),n.d(t,"persistAuthorizationIfNeeded",(function(){return D}));var r=n(18),o=n.n(r),a=n(32),i=n.n(a),s=n(20),u=n.n(s),c=n(94),l=n.n(c),p=n(26),f=n(5),h="show_popup",d="authorize",m="logout",v="pre_authorize_oauth2",g="authorize_oauth2",y="validate",b="configure_auth",_="restore_authorization";function w(e){return{type:h,payload:e}}function x(e){return{type:d,payload:e}}var E=function(e){return function(t){var n=t.authActions;n.authorize(e),n.persistAuthorizationIfNeeded()}};function S(e){return{type:m,payload:e}}var C=function(e){return function(t){var n=t.authActions;n.logout(e),n.persistAuthorizationIfNeeded()}},A=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,u=o.schema,c=o.name,l=u.get("flow");delete p.a.swaggerUIRedirectOauth2,"accessCode"===l||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:i()(a)}):n.authorizeOauth2WithPersistOption({auth:o,token:a})}};function k(e){return{type:g,payload:e}}var O=function(e){return function(t){var n=t.authActions;n.authorizeOauth2(e),n.persistAuthorizationIfNeeded()}},j=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,a=e.username,i=e.password,s=e.passwordType,c=e.clientId,l=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" "),username:a,password:i},h={};switch(s){case"request-body":!function(e,t,n){t&&u()(e,{client_id:t});n&&u()(e,{client_secret:n})}(p,c,l);break;case"basic":h.Authorization="Basic "+Object(f.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(s," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(f.b)(p),url:r.get("tokenUrl"),name:o,headers:h,query:{},auth:e})}};var T=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,a=e.name,i=e.clientId,s=e.clientSecret,u={Authorization:"Basic "+Object(f.a)(i+":"+s)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(f.b)(c),name:a,url:r.get("tokenUrl"),auth:e,headers:u})}},I=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:i,client_secret:s,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(f.b)(c),name:a,url:o.get("tokenUrl"),auth:t})}},P=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={Authorization:"Basic "+Object(f.a)(i+":"+s)},l={grant_type:"authorization_code",code:t.code,client_id:i,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(f.b)(l),name:a,url:o.get("tokenUrl"),auth:t,headers:c})}},N=function(e){return function(t){var n,r=t.fn,a=t.getConfigs,s=t.authActions,c=t.errActions,p=t.oas3Selectors,f=t.specSelectors,h=t.authSelectors,d=e.body,m=e.query,v=void 0===m?{}:m,g=e.headers,y=void 0===g?{}:g,b=e.name,_=e.url,w=e.auth,x=(h.getConfigs()||{}).additionalQueryStringParams;if(f.isOAS3()){var E=p.serverEffectiveValue(p.selectedServer());n=l()(_,E,!0)}else n=l()(_,f.url(),!0);"object"===o()(x)&&(n.query=u()({},n.query,x));var S=n.toString(),C=u()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},y);r.fetch({url:S,method:"post",headers:C,query:v,body:d,requestInterceptor:a().requestInterceptor,responseInterceptor:a().responseInterceptor}).then((function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:i()(t)}):s.authorizeOauth2WithPersistOption({auth:w,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})})).catch((function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})}))}};function M(e){return{type:b,payload:e}}function R(e){return{type:_,payload:e}}var D=function(){return function(e){var t=e.authSelectors;if((0,e.getConfigs)().persistAuthorization){var n=t.authorized();localStorage.setItem("authorized",i()(n.toJS()))}}}},function(e,t,n){var r=n(1048);e.exports=function(e){for(var t=1;tS;S++)if((h||S in w)&&(b=x(y=w[S],S,_),e))if(t)A[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(A,y)}else switch(e){case 4:return!1;case 7:u.call(A,y)}return p?-1:c||l?l:A}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(e,t,n){n(157);var r=n(576),o=n(40),a=n(99),i=n(67),s=n(131),u=n(41)("toStringTag");for(var c in r){var l=o[c],p=l&&l.prototype;p&&a(p)!==u&&i(p,u,c),s[c]=s.Array}},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],l=!1,p=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n0&&"/"!==t[0]}));function Se(e,t,n){var r;t=t||[];var o=we.apply(void 0,u()(r=[e]).call(r,i()(t))).get("parameters",Object(I.List)());return x()(o).call(o,(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(T.A)(t,{allowHashes:!1}),r)}),Object(I.fromJS)({}))}function Ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("in")===t}))}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("type")===t}))}function ke(e,t){var n,r;t=t||[];var o=z(e).getIn(u()(n=["paths"]).call(n,i()(t)),Object(I.fromJS)({})),a=e.getIn(u()(r=["meta","paths"]).call(r,i()(t)),Object(I.fromJS)({})),s=Oe(e,t),c=o.get("parameters")||new I.List,l=a.get("consumes_value")?a.get("consumes_value"):Ae(c,"file")?"multipart/form-data":Ae(c,"formData")?"application/x-www-form-urlencoded":void 0;return Object(I.fromJS)({requestContentType:l,responseContentType:s})}function Oe(e,t){var n,r;t=t||[];var o=z(e).getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==o){var a=e.getIn(u()(r=["meta","paths"]).call(r,i()(t),["produces_value"]),null),s=o.getIn(["produces",0],null);return a||s||"application/json"}}function je(e,t){var n;t=t||[];var r=z(e),a=r.getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var s=t,c=o()(s,1)[0],l=a.get("produces",null),p=r.getIn(["paths",c,"produces"],null),f=r.getIn(["produces"],null);return l||p||f}}function Te(e,t){var n;t=t||[];var r=z(e),a=r.getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var s=t,c=o()(s,1)[0],l=a.get("consumes",null),p=r.getIn(["paths",c,"consumes"],null),f=r.getIn(["consumes"],null);return l||p||f}}var Ie=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),o=O()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""},Pe=function(e,t,n){var r;return d()(r=["http","https"]).call(r,Ie(e,t,n))>-1},Ne=function(e,t){var n;t=t||[];var r=e.getIn(u()(n=["meta","paths"]).call(n,i()(t),["parameters"]),Object(I.fromJS)([])),o=!0;return f()(r).call(r,(function(e){var t=e.get("errors");t&&t.count()&&(o=!1)})),o},Me=function(e,t){var n,r,o={requestBody:!1,requestContentType:{}},a=e.getIn(u()(n=["resolvedSubtrees","paths"]).call(n,i()(t),["requestBody"]),Object(I.fromJS)([]));return a.size<1||(a.getIn(["required"])&&(o.requestBody=a.getIn(["required"])),f()(r=a.getIn(["content"]).entrySeq()).call(r,(function(e){var t=e[0];if(e[1].getIn(["schema","required"])){var n=e[1].getIn(["schema","required"]).toJS();o.requestContentType[t]=n}}))),o},Re=function(e,t,n,r){var o;if((n||r)&&n===r)return!0;var a=e.getIn(u()(o=["resolvedSubtrees","paths"]).call(o,i()(t),["requestBody","content"]),Object(I.fromJS)([]));if(a.size<2||!n||!r)return!1;var s=a.getIn([n,"schema","properties"],Object(I.fromJS)([])),c=a.getIn([r,"schema","properties"],Object(I.fromJS)([]));return!!s.equals(c)};function De(e){return I.Map.isMap(e)?e:new I.Map}},function(e,t,n){"use strict";(function(t){var r=n(894),o=n(895),a=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,i=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,s=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(e){return(e||"").toString().replace(s,"")}var c=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function p(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||r);if("blob:"===e.protocol)o=new h(unescape(e.pathname),{});else if("string"===i)for(n in o=new h(e,{}),l)delete o[n];else if("object"===i){for(n in e)n in l||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function f(e){e=u(e);var t=i.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!(t[2]&&t[2].length>=2),rest:t[2]&&1===t[2].length?"/"+t[3]:t[3]}}function h(e,t,n){if(e=u(e),!(this instanceof h))return new h(e,t,n);var a,i,s,l,d,m,v=c.slice(),g=typeof t,y=this,b=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),t=p(t),a=!(i=f(e||"")).protocol&&!i.slashes,y.slashes=i.slashes||a&&t.slashes,y.protocol=i.protocol||t.protocol||"",e=i.rest,i.slashes||(v[3]=[/(.*)/,"pathname"]);b=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),g[r]}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),o=y(r);return o.reduce((function(e,t){return f()({},e,n[t])}),t)}function _(e){return e.join(" ")}function w(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,i=e.key,s=t.properties,u=t.type,c=t.tagName,l=t.value;if("text"===u)return l;if(c){var p,h=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return w({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a);if(a){var m=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=s.className&&s.className.includes("token")?["token"]:[],y=s.className&&g.concat(s.className.filter((function(e){return!m.includes(e)})));p=f()({},s,{className:_(y)||void 0,style:b(s.className,Object.assign({},s.style,o),n)})}else p=f()({},s,{className:_(s.className)});var x=h(t.children);return d.a.createElement(c,v()({key:i},p),x)}}var x=/\n/g;function E(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,o=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,i=void 0===a?{}:a,s=e.startingLineNumber;return d.a.createElement("code",{style:Object.assign({},n,o)},function(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map((function(e,t){var o=t+n;return d.a.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(o):r},"".concat(o,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:i,startingLineNumber:s}))}function S(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function C(e,t,n){var r,o={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return f()({},o,a)}function A(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,i=e.lineProps,s=void 0===i?{}:i,u=e.className,c=void 0===u?[]:u,l=e.showLineNumbers,p=e.wrapLongLines,h="function"==typeof s?s(n):s;if(h.className=c,n&&a){var d=C(r,n,o);t.unshift(S(n,d))}return p&l&&(h.style=f()({},h.style,{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function k(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return A({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:u})}function m(e,t){if(r&&t&&o){var n=C(s,t,i);e.unshift(S(t,n))}return e}function v(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?d(e,n,r):m(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(t.match(x)){var n=t.split("\n");n.forEach((function(t,o){var i=r&&p.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===o){var u=v(l.slice(f+1,h).concat(A({children:[s],className:e.properties.className})),i);p.push(u)}else if(o===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var c=A({children:[{type:"text",value:"".concat(t)}],className:e.properties.className});l.splice(h+1,0,c)}else{var d=v([s],i,e.properties.className);p.push(d)}}else{var m=v([s],i,e.properties.className);p.push(m)}})),f=h}h++};h .hljs-title":{color:"#88C0D0"},"hljs-keyword":{color:"#81A1C1"},"hljs-literal":{color:"#81A1C1"},"hljs-symbol":{color:"#81A1C1"},"hljs-number":{color:"#B48EAD"},"hljs-regexp":{color:"#EBCB8B"},"hljs-string":{color:"#A3BE8C"},"hljs-title":{color:"#8FBCBB"},"hljs-params":{color:"#D8DEE9"},"hljs-bullet":{color:"#81A1C1"},"hljs-code":{color:"#8FBCBB"},"hljs-emphasis":{fontStyle:"italic"},"hljs-formula":{color:"#8FBCBB"},"hljs-strong":{fontWeight:"bold"},"hljs-link:hover":{textDecoration:"underline"},"hljs-quote":{color:"#4C566A"},"hljs-comment":{color:"#4C566A"},"hljs-doctag":{color:"#8FBCBB"},"hljs-meta":{color:"#5E81AC"},"hljs-meta-keyword":{color:"#5E81AC"},"hljs-meta-string":{color:"#A3BE8C"},"hljs-attr":{color:"#8FBCBB"},"hljs-attribute":{color:"#D8DEE9"},"hljs-builtin-name":{color:"#81A1C1"},"hljs-name":{color:"#81A1C1"},"hljs-section":{color:"#88C0D0"},"hljs-tag":{color:"#81A1C1"},"hljs-variable":{color:"#D8DEE9"},"hljs-template-variable":{color:"#D8DEE9"},"hljs-template-tag":{color:"#5E81AC"},"abnf .hljs-attribute":{color:"#88C0D0"},"abnf .hljs-symbol":{color:"#EBCB8B"},"apache .hljs-attribute":{color:"#88C0D0"},"apache .hljs-section":{color:"#81A1C1"},"arduino .hljs-built_in":{color:"#88C0D0"},"aspectj .hljs-meta":{color:"#D08770"},"aspectj > .hljs-title":{color:"#88C0D0"},"bnf .hljs-attribute":{color:"#8FBCBB"},"clojure .hljs-name":{color:"#88C0D0"},"clojure .hljs-symbol":{color:"#EBCB8B"},"coq .hljs-built_in":{color:"#88C0D0"},"cpp .hljs-meta-string":{color:"#8FBCBB"},"css .hljs-built_in":{color:"#88C0D0"},"css .hljs-keyword":{color:"#D08770"},"diff .hljs-meta":{color:"#8FBCBB"},"ebnf .hljs-attribute":{color:"#8FBCBB"},"glsl .hljs-built_in":{color:"#88C0D0"},"groovy .hljs-meta:not(:first-child)":{color:"#D08770"},"haxe .hljs-meta":{color:"#D08770"},"java .hljs-meta":{color:"#D08770"},"ldif .hljs-attribute":{color:"#8FBCBB"},"lisp .hljs-name":{color:"#88C0D0"},"lua .hljs-built_in":{color:"#88C0D0"},"moonscript .hljs-built_in":{color:"#88C0D0"},"nginx .hljs-attribute":{color:"#88C0D0"},"nginx .hljs-section":{color:"#5E81AC"},"pf .hljs-built_in":{color:"#88C0D0"},"processing .hljs-built_in":{color:"#88C0D0"},"scss .hljs-keyword":{color:"#81A1C1"},"stylus .hljs-keyword":{color:"#81A1C1"},"swift .hljs-meta":{color:"#D08770"},"vim .hljs-built_in":{color:"#88C0D0",fontStyle:"italic"},"yaml .hljs-meta":{color:"#D08770"}},obsidian:{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#282b2e",color:"#e0e2e4"},"hljs-keyword":{color:"#93c763",fontWeight:"bold"},"hljs-selector-tag":{color:"#93c763",fontWeight:"bold"},"hljs-literal":{color:"#93c763",fontWeight:"bold"},"hljs-selector-id":{color:"#93c763"},"hljs-number":{color:"#ffcd22"},"hljs-attribute":{color:"#668bb0"},"hljs-code":{color:"white"},"hljs-class .hljs-title":{color:"white"},"hljs-section":{color:"white",fontWeight:"bold"},"hljs-regexp":{color:"#d39745"},"hljs-link":{color:"#d39745"},"hljs-meta":{color:"#557182"},"hljs-tag":{color:"#8cbbad"},"hljs-name":{color:"#8cbbad",fontWeight:"bold"},"hljs-bullet":{color:"#8cbbad"},"hljs-subst":{color:"#8cbbad"},"hljs-emphasis":{color:"#8cbbad"},"hljs-type":{color:"#8cbbad",fontWeight:"bold"},"hljs-built_in":{color:"#8cbbad"},"hljs-selector-attr":{color:"#8cbbad"},"hljs-selector-pseudo":{color:"#8cbbad"},"hljs-addition":{color:"#8cbbad"},"hljs-variable":{color:"#8cbbad"},"hljs-template-tag":{color:"#8cbbad"},"hljs-template-variable":{color:"#8cbbad"},"hljs-string":{color:"#ec7600"},"hljs-symbol":{color:"#ec7600"},"hljs-comment":{color:"#818e96"},"hljs-quote":{color:"#818e96"},"hljs-deletion":{color:"#818e96"},"hljs-selector-class":{color:"#A082BD"},"hljs-doctag":{fontWeight:"bold"},"hljs-title":{fontWeight:"bold"},"hljs-strong":{fontWeight:"bold"}},"tomorrow-night":{"hljs-comment":{color:"#969896"},"hljs-quote":{color:"#969896"},"hljs-variable":{color:"#cc6666"},"hljs-template-variable":{color:"#cc6666"},"hljs-tag":{color:"#cc6666"},"hljs-name":{color:"#cc6666"},"hljs-selector-id":{color:"#cc6666"},"hljs-selector-class":{color:"#cc6666"},"hljs-regexp":{color:"#cc6666"},"hljs-deletion":{color:"#cc6666"},"hljs-number":{color:"#de935f"},"hljs-built_in":{color:"#de935f"},"hljs-builtin-name":{color:"#de935f"},"hljs-literal":{color:"#de935f"},"hljs-type":{color:"#de935f"},"hljs-params":{color:"#de935f"},"hljs-meta":{color:"#de935f"},"hljs-link":{color:"#de935f"},"hljs-attribute":{color:"#f0c674"},"hljs-string":{color:"#b5bd68"},"hljs-symbol":{color:"#b5bd68"},"hljs-bullet":{color:"#b5bd68"},"hljs-addition":{color:"#b5bd68"},"hljs-title":{color:"#81a2be"},"hljs-section":{color:"#81a2be"},"hljs-keyword":{color:"#b294bb"},"hljs-selector-tag":{color:"#b294bb"},hljs:{display:"block",overflowX:"auto",background:"#1d1f21",color:"#c5c8c6",padding:"0.5em"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}}},Q=o()(X),ee=function(e){return i()(Q).call(Q,e)?X[e]:(console.warn("Request style '".concat(e,"' is not available, returning default instead")),Z)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(237),o=n(68).f,a=n(67),i=n(55),s=n(548),u=n(41)("toStringTag");e.exports=function(e,t,n,c){if(e){var l=n?e:e.prototype;i(l,u)||o(l,u,{configurable:!0,value:t}),c&&!r&&a(l,"toString",s)}}},function(e,t,n){var r=n(237),o=n(151),a=n(41)("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:i?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){e.exports=n(679)},function(e,t,n){"use strict";function r(e){return function(e){try{return!!JSON.parse(e)}catch(e){return null}}(e)?"json":null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",(function(){return o})),n.d(t,"UPDATE_FILTER",(function(){return a})),n.d(t,"UPDATE_MODE",(function(){return i})),n.d(t,"SHOW",(function(){return s})),n.d(t,"updateLayout",(function(){return u})),n.d(t,"updateFilter",(function(){return c})),n.d(t,"show",(function(){return l})),n.d(t,"changeMode",(function(){return p}));var r=n(5),o="layout_update_layout",a="layout_update_filter",i="layout_update_mode",s="layout_show";function u(e){return{type:o,payload:e}}function c(e){return{type:a,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.v)(e),{type:s,payload:{thing:e,shown:t}}}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.v)(e),{type:i,payload:{thing:e,mode:t}}}},function(e,t,n){var r=n(421),o=n(161),a=n(192),i=n(50),s=n(115),u=n(193),c=n(160),l=n(249),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(77);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(70);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r,o=n(52),a=n(230),i=n(233),s=n(156),u=n(366),c=n(225),l=n(181),p=l("IE_PROTO"),f=function(){},h=function(e){return"