openapi: 3.2.0 info: version: 1.0.1 title: AdvancedMD Application Access C CDA API description: 'A collection of RESTful APIs that can be used to interact with AdvancedMD data. All APIs return JSON, with the exception of the Episode Summaries API, which returns an HL7 C-CDA v3 (XML) document. Supported Version: AdvancedMD v12.6 ' servers: - url: https://ptapi.advancedmd.com/pt-api tags: - name: C-CDA paths: /clinical/episodesummaries: get: description: This API returns a C-CDA document in HL7 v3 (XML) format. If the Accept header is set to "application/xml", it will return raw XML instead of JSON. Otherwise, it will wrap the XML document in a JSON wrapper. security: - API Key: [] Bearer Token: [] tags: - C-CDA parameters: - $ref: '#/components/parameters/patientId' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' responses: '200': $ref: '#/components/responses/CcdaXmlSuccess' '401': $ref: '#/components/responses/Unauthorized_Xml' '429': $ref: '#/components/responses/Too_many_requests_Xml' components: responses: CcdaXmlSuccess: description: Successful API call. Contains the patient’s episode summaries (C-CDA document) for the specified date range. content: application/json: schema: type: object properties: xml: type: string example: "{\n \"xml\": \"\n \n \n \n ...\n \"\n}\n" Too_many_requests_Xml: description: 'Too many requests: More details are provided in the response.' content: application/json: schema: type: object properties: title: type: string example: QuotaViolation detail: type: string example: Too many requests: Please wait and try your request again in about a minute. example: "{\n \"title\": \"QuotaViolation\",\n \"detail\": \"Too many requests: Please wait and try your request again in about a minute.\"\n}\n" Unauthorized_Xml: description: 'Unauthorized: More details are provided in the response.' content: application/json: schema: type: object properties: title: type: string example: Unauthorized detail: type: string example: Invalid API key or bearer token. example: "{\n \"title\": \"Unauthorized\",\n \"detail\": \"Invalid API key or bearer token.\"\n}\n" parameters: startDate: name: startDate description: The beginning (m/d/yyyy) of the date range to return data for. in: query required: true x-example: 1/1/2017 or 01/01/2017 schema: type: string patientId: name: patientid description: The patient's unique identifier ("patientid") returned by the authenticate API. in: query required: true x-example: '32745' schema: type: string endDate: name: endDate description: The end (m/d/yyyy) of the date range to return data for. in: query required: true x-example: 5/16/2018 or 05/16/2018 schema: type: string securitySchemes: API_Key: type: apiKey in: header name: apikey Bearer_Token: type: apiKey in: header name: Authorization