{"openapi":"3.0.0","info":{"title":"1upHealth API Collection - All endpoints","contact":{},"version":"1.0-oas3"},"servers":[{"url":"https://api.1up.health/"},{"url":"https://auth.1up.health/"},{"url":"https://system-search.1up.health/"},{"url":"https://analytics.1up.health/"}],"tags":[{"name":"Auth"},{"name":"Connect (Patient)"},{"name":"User Management"},{"name":"Analytics (Bulk Data)"},{"name":"Providers"},{"name":"Clinical"},{"name":"Direct (EHR) Connect Reference"},{"name":"Subscription"},{"name":"Practitioners"}],"paths":{"/user-management/v1/user":{"get":{"tags":["User Management"],"summary":"Get Users","description":"Get the list of all the users that exist inside your 1up Developer Application, with the option of filtering by specific users","operationId":"GetUsers","parameters":[{"name":"client_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"client_secret","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false},"put":{"tags":["User Management"],"summary":"Update User","description":"Can be used to modify an existing user object. It is possible to modify the app_user_id, but the oneup_user_id is assigned when the user is created and cannot be changed.","operationId":"UpdateUser","parameters":[{"name":"oneup_user_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"integer","format":"int32"}},{"name":"client_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"client_secret","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"app_user_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false},"post":{"tags":["Auth"],"summary":"Create New User","description":"An application can create users via the following call. You will need to replace clientid and clientsecret with the values you obtained when you registered and created your 1upHealth application (visit https://1up.health/dev/quick-start).\n\nEach response will contain the new user's oneup_user_id, access_token, refresh_token, and app_user_id. The app_user_id helps you keep track of users between the 1up API and your own user management system. This must be a unique value for your application.","operationId":"CreateNewUser","parameters":[{"name":"app_user_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"client_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"client_secret","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false}},"/user-management/v1/user/auth-code":{"post":{"tags":["Auth"],"summary":"Generate New Authorization Code for Existing User","description":"If you need a new auth code for a user you already created on 1upHealth, you can make a request via the following method with clientid and clientsecret values replaced with your registered application's values via the environment variables in the upper right corner.\n\nThe code variable is the OAuth2 access code. You must exchange that to get the OAuth2 access token by following the the OAuth2 token grant steps. The access_token and refresh_token will be used to gain access to user data. Keep those secure via HIPAA compliant means of transmission and storage, along with all other patient data. The auth token expires after 7200 seconds (2 hours).","operationId":"GenerateNewAuthorizationCodeforExistingUser","parameters":[{"name":"app_user_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"client_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"client_secret","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false}},"/oauth2/token":{"post":{"tags":["Auth"],"summary":"Exchange Authorization Code for Access Token","description":"Use the following API call to exchange the OAuth Access Code received in \"1. Create New User\" or \"2. Generate New Auth Code for Existing User\".\n\nThe code variable is the OAuth2 access code. You must exchange that to get the OAuth2 access token by following the the OAuth2 token grant steps. The access_token and refresh_token will be used to gain access to user data. Keep those secure via HIPAA compliant means of transmission and storage, along with all other patient data. The auth token expires after 7200 seconds (2 hours).\n\nYou must also replace the values for clientid and clientsecret with values obtained when registering your application (visit https://1up.health/dev/quick-start).","operationId":"ExchangeAuthorizationCodeforAccessToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/body"}}},"required":true},"responses":{"200":{"description":"OK"}},"deprecated":false},"servers":[{"url":"https://auth.1up.health","description":"Override base path for the POST Token operation to auth.1up.health"}]},"/r4/Patient":{"get":{"tags":["Connect (Patient)"],"summary":"Get Patient Resource","description":"You will need to include your OAuth Access Token as a Bearer Token in the Authorization Header. To obtain a Access Token, follow steps 1, 2, and 3 (if you are creating under a new user), or steps 2 and 3 (if creating under an existing user). Of if you have a Refresh Token you can follow Step 4.\n\nOnce you have your OAuth Access Token, you can make the following call to obtain a bundle of available FHIR Resources (in this case Patient, but you can also obtain other resources as listed here - https://1up.health/dev/reference/fhir-resources). You can also include https://api.1up.health/fhir/dstu2/Patient/{{resource_id}} when you know the resource id.","operationId":"GetPatientResource","parameters":[{"name":"query-param","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]},"post":{"tags":["Connect (Patient)"],"summary":"Create Patient Resource","description":"You will need to include your OAuth Access Token as a Bearer Token in the Authorization Header which you can store as an environment variables in the upper right corner. To obtain a Access Token, follow steps 1, 2, and 3 (if you are creating under a new user), or steps 2 and 3 (if creating under an existing user). Of if you have a Refresh Token you can follow Step 4.\n\nOnce you have your OAuth Access Token, you can make the following call to create a FHIR Resource (in this case a Patient resource, but you can also obtain other resources as listed here - https://1up.health/dev/reference/fhir-resources) by including the resource elements in the Body of the request","operationId":"CreatePatientResource","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientResourceRequest"}}},"required":true},"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]}},"/{FHIRVersion}/Patient/{patientID}/$everything":{"get":{"tags":["Connect (Patient)"],"summary":"Get all Patient data (everything query)","description":"This endpoint returns a list of all known FHIR® resources for a given patient. This is useful when transmitting batch data or getting the full patient history.","operationId":"GetallPatientdata(everythingquery)","parameters":[{"name":"FHIRVersion","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"patientID","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]},"delete":{"tags":["Connect (Patient)"],"summary":"Delete all Patient data (everything query)","description":"This endpoint returns an OperationOutcome resource stating that all the resources for the patient are deleted successfully. This is useful when deleting multiple resource types for a patient at once.","operationId":"DeleteallPatientdata(everythingquery)","parameters":[{"name":"FHIRVersion","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"patientID","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]}},"/bulk-data/r4/$export":{"get":{"tags":["Analytics (Bulk Data)"],"summary":"Bulk Data Export","description":"Request the analytics bulk-data endpoint with the FHIR® $export operator to retrieve a list of bulk data files for your client application to download.\n\nhttps://1up.health/dev/doc/fhir-bulk-data-export\n\nThis will return at least one bulk data download file for each resource type for which resources exist. This will only return resources that your given application client id and user id have access to. Optionally include a _type query parameter with a comma-separated list of FHIR® resources to limit the types of resources that you want to export, e.g.\n\nhttps://analytics.1up.health/bulk-data/dstu2/$export?_type=Patient,Observation","operationId":"BulkDataExport","responses":{"200":{"description":"OK"}},"deprecated":false,"servers":[{"url":"https://analytics.1up.health"}],"security":[{"bearerAuth":[]}]}},"/api/search":{"post":{"tags":["Providers"],"summary":"Provider Search API","description":"The Provider Search API can be used to make custom provider search interface for patients or retrieve results returned by the above iframe. Plug your access_token (Check out our Quick Start Guide - https://1up.health/dev/quick-start - on how to get access tokens) generated with the client_id and client_secret for the applicaton in the header as a Bearer Token and search term as a query parameter in the url.\n\nhttps://1up.health/dev/doc/provider-search-ui\n\nResult is a list a health systems, clinics, hospitals or doctors for the searched term with 1uphealth system id which can be used to direct an user to a quick connect page or a patient portal (using the same access token) to initiate the login process. Check out our Quick Connect Documentation on how to quick connect.","operationId":"ProviderSearchAPI","parameters":[{"name":"query","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false,"servers":[{"url":"https://system-search.1up.health"}],"security":[{"bearerAuth":[]}]}},"/connect/system/provider/search":{"get":{"tags":["Providers"],"summary":"Provider Search","description":"Used to run a text search on health systems, often for the purpose of allowing the user to find their health system's authorization portal.","operationId":"ProviderSearch","parameters":[{"name":"query","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]}},"/connect/system/clinical":{"get":{"tags":["Clinical"],"summary":"Get All Connected Health Systems","description":"Currently 1upHealth supports 1000s of health systems(https://1up.health/health-systems). You can find the full list by querying the endpoint here.\n\nYou will need the client_id and client_secret environment variables configured in the upper right corner.","operationId":"GetAllConnectedHealthSystems","parameters":[{"name":"client_id","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"client_secret","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]}},"/stu3/DocumentReference":{"get":{"tags":["Direct (EHR) Connect Reference"],"summary":"Get Document Reference","description":"This endpoint allows you to retrieve Document References.","operationId":"GetDocumentReference","responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]}},"/dstu2/Subscription":{"post":{"tags":["Subscription"],"summary":"Subscription","description":"Allows developers to \"subscribe\" to a query using a FHIR Subscription Resource. This means that you can be notified for a creation or update event for any FHIR Resource that matches a FHIR query. You can make the FHIR query anything acceptable by FHIR APIs. Periodically (currently in 15 minute intervals), 1upHealth will check for any new or updated resources matching any FHIR Subscription for a user and post that data to a secure endpoint of your choice.","operationId":"Subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]}},"/fhir/dstu2/Practitioner":{"get":{"tags":["Practitioners"],"summary":"Practitioner Search","description":"This endpoint enables you to get available Practitioners.","operationId":"PractitionerSearch","parameters":[{"name":"_public","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"boolean"}},{"name":"name","in":"query","required":true,"style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"deprecated":false,"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"CreatePatientResourceRequest":{"title":"CreatePatientResourceRequest","required":["active","address","birthDate","deceasedBoolean","gender","id","identifier","name","resourceType","telecom"],"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string"},"identifier":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"active":{"type":"boolean"},"name":{"type":"array","items":{"$ref":"#/components/schemas/Name"}},"telecom":{"type":"array","items":{"$ref":"#/components/schemas/Telecom"}},"gender":{"type":"string"},"birthDate":{"type":"string"},"deceasedBoolean":{"type":"boolean"},"address":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}},"example":{"resourceType":"Patient","id":"johnson","identifier":[{"use":"usual","type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"MR"}]},"system":"urn:oid:1.2.36.146.595.217.0.1","value":"4567890","period":{"start":"2001-05-06"},"assigner":{"display":"Acme Healthcare"}}],"active":true,"name":[{"use":"official","family":"Johnson","given":["Angela"]}],"telecom":[{"use":"home"},{"system":"phone","value":"(512) 123-4567","use":"home","rank":1},{"system":"email","value":"angela.johnson@email.com","use":"home"},{"system":"email","value":"angelaj@work.com","use":"work"}],"gender":"female","birthDate":"1986-09-28","deceasedBoolean":false,"address":[{"use":"home","type":"both","text":"789 Kahakee St. Apt 121 Honolulu, HI 97812","line":["789 Kahakee St. Apt 121"],"city":"Honolulu","state":"HI","postalCode":"97812"}]}},"Identifier":{"title":"Identifier","required":["assigner","period","system","type","use","value"],"type":"object","properties":{"use":{"type":"string"},"type":{"$ref":"#/components/schemas/Type"},"system":{"type":"string"},"value":{"type":"string"},"period":{"$ref":"#/components/schemas/Period"},"assigner":{"$ref":"#/components/schemas/Assigner"}},"example":{"use":"usual","type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"MR"}]},"system":"urn:oid:1.2.36.146.595.217.0.1","value":"4567890","period":{"start":"2001-05-06"},"assigner":{"display":"Acme Healthcare"}}},"Type":{"title":"Type","required":["coding"],"type":"object","properties":{"coding":{"type":"array","items":{"$ref":"#/components/schemas/Coding"}}},"example":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"MR"}]}},"Coding":{"title":"Coding","required":["code","system"],"type":"object","properties":{"system":{"type":"string"},"code":{"type":"string"}},"example":{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"MR"}},"Period":{"title":"Period","required":["start"],"type":"object","properties":{"start":{"type":"string"}},"example":{"start":"2001-05-06"}},"Assigner":{"title":"Assigner","required":["display"],"type":"object","properties":{"display":{"type":"string"}},"example":{"display":"Acme Healthcare"}},"Name":{"title":"Name","required":["family","given","use"],"type":"object","properties":{"use":{"type":"string"},"family":{"type":"string"},"given":{"type":"array","items":{"type":"string"}}},"example":{"use":"official","family":"Johnson","given":["Angela"]}},"Telecom":{"title":"Telecom","required":["use"],"type":"object","properties":{"use":{"type":"string"},"system":{"type":"string"},"value":{"type":"string"},"rank":{"type":"integer","format":"int32"}},"example":{"use":"home"}},"Address":{"title":"Address","required":["city","line","postalCode","state","text","type","use"],"type":"object","properties":{"use":{"type":"string"},"type":{"type":"string"},"text":{"type":"string"},"line":{"type":"array","items":{"type":"string"}},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"}},"example":{"use":"home","type":"both","text":"789 Kahakee St. Apt 121 Honolulu, HI 97812","line":["789 Kahakee St. Apt 121"],"city":"Honolulu","state":"HI","postalCode":"97812"}},"CreateaFHIRResourceRequest":{"title":"CreateaFHIRResourceRequest","required":["active","address","birthDate","deceasedBoolean","gender","id","identifier","name","resourceType","telecom"],"type":"object","properties":{"resourceType":{"type":"string"},"id":{"type":"string"},"identifier":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"active":{"type":"boolean"},"name":{"type":"array","items":{"$ref":"#/components/schemas/Name"}},"telecom":{"type":"array","items":{"$ref":"#/components/schemas/Telecom"}},"gender":{"type":"string"},"birthDate":{"type":"string"},"deceasedBoolean":{"type":"boolean"},"address":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}},"example":{"resourceType":"Patient","id":"johnson","identifier":[{"use":"usual","type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"MR"}]},"system":"urn:oid:1.2.36.146.595.217.0.1","value":"4567890","period":{"start":"2001-05-06"},"assigner":{"display":"Acme Healthcare"}}],"active":true,"name":[{"use":"official","family":"Johnson","given":["Angela"]}],"telecom":[{"use":"home"},{"system":"phone","value":"(512) 123-4567","use":"home","rank":1},{"system":"email","value":"angela.johnson@email.com","use":"home"},{"system":"email","value":"angelaj@work.com","use":"work"}],"gender":"female","birthDate":"1986-09-28","deceasedBoolean":false,"address":[{"use":"home","type":"both","text":"789 Kahakee St. Apt 121 Honolulu, HI 97812","line":["789 Kahakee St. Apt 121"],"city":"Honolulu","state":"HI","postalCode":"97812"}]}},"SubscriptionRequest":{"title":"SubscriptionRequest","required":["channel","contact","criteria","id","reason","resourceType","status"],"type":"object","properties":{"id":{"type":"string"},"resourceType":{"type":"string"},"contact":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"criteria":{"type":"string"},"reason":{"type":"string"},"status":{"type":"string"},"channel":{"$ref":"#/components/schemas/Channel"}},"example":{"id":"a1dbd476-b706-418a-b93a-7a9cbdb9df72","resourceType":"Subscription","contact":[{"system":"email","value":"email@example.com"}],"criteria":"Observation?patient_id=","reason":"Get updates on a patient's Observations","status":"requested","channel":{"endpoint":"https://www.example.com/v1/hives/1b25ec53-7752-4cb2-8fad-72bec036771f/integrations/a1dbd476-b706-418a-b93a-7a9cbdb9df72/one_up/fhir/dstu2","payload":"application/json","type":"rest-hook","header":"Authorization: Bearer 8e2ff3b4f2395cdbac62a1ebb6beb821176618f7"}}},"Contact":{"title":"Contact","required":["system","value"],"type":"object","properties":{"system":{"type":"string"},"value":{"type":"string"}},"example":{"system":"email","value":"email@example.com"}},"Channel":{"title":"Channel","required":["endpoint","header","payload","type"],"type":"object","properties":{"endpoint":{"type":"string"},"payload":{"type":"string"},"type":{"type":"string"},"header":{"type":"string"}},"example":{"endpoint":"https://www.example.com/v1/hives/1b25ec53-7752-4cb2-8fad-72bec036771f/integrations/a1dbd476-b706-418a-b93a-7a9cbdb9df72/one_up/fhir/dstu2","payload":"application/json","type":"rest-hook","header":"Authorization: Bearer 8e2ff3b4f2395cdbac62a1ebb6beb821176618f7"}},"body":{"required":["client_id","client_secret","code","grant_type"],"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"code":{"type":"string"},"grant_type":{"type":"string"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}