openapi: 3.0.1
info:
  title: Innowell API
  description: Innowell API for EMR Integration
  termsOfService: https://innowell.org/terms-of-use
  version: 1.0.0
paths:
  /CareTeam:
    get:
      tags:
        - CareTeams
      summary: List Care teams
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/CareTeam' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/CareTeam"); 
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>"); 
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>"); 
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>"); 
             var content = new StringContent(string.Empty); 
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); 
             request.Content = content; 
             var response = await client.SendAsync(request); 
             response.EnsureSuccessStatusCode(); 
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CareTeamsList'
    post:
      tags:
        - CareTeams
      summary: Create Care Team
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/CareTeam' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>' \ 
             --data '{ 
                 "resourceType": "CareTeam", 
                 "status": "active", 
                 "name": "Primary Care Team", 
                 "subject": { 
                     "reference": "Patient/<patient_id>", 
                     "display": "Patient Ref" 
                 }, 
                 "period": { 
                     "start": "2024-12-05T14:30:00+00:00", 
                     "end": "2024-12-05T14:30:00+00:00" 
                 }, 
                 "participant": [ 
                     { 
                         "role": [ 
                             { 
                                 "coding": [ 
                                     { 
                                         "system": "http://innowell.org/fhir/care/staff_roles", 
                                         "display": "Clinician" 
                                     } 
                                 ] 
                             } 
                         ], 
                         "member": { 
                             "reference": "Practitioner/<practitioner_id>", 
                             "display": "Dr. Jane Doe" 
                         }, 
                         "period": { 
                             "start": "2025-05-21T14:30:00+00:00" 
                         } 
                     } 
                 ] 
             }'
        - lang: C# Http Client
          source: "var client = new HttpClient(); \n var request = new HttpRequestMessage(HttpMethod.Post, \"<INTEGRATION_ENDPOINT_URL>/CareTeam\"); \n request.Headers.Add(\"Innowell-SubscriptionKey\", \"<ADD_API_KEY>\"); \n request.Headers.Add(\"Innowell-EmrId\", \"<ADD_INNOWELL_EMR_ID>\"); \n request.Headers.Add(\"Innowell-TenantId\", \"<ADD_INNOWELL_TENANT_ID>\"); \n var content = new StringContent(\"{\r\n    \"resourceType\": \"CareTeam\",\r\n    \"status\": \"active\",\r\n    \"name\": \"Primary Care Team\",\r\n    \"subject\": {\r\n        \"reference\": \"Patient/<patient_id>\",\r\n        \"display\": \"Patient Ref\"\r\n    },\r\n    \"period\": {\r\n        \"start\": \"2024-12-05T14:30:00+00:00\",\r\n        \"end\": \"2024-12-05T14:30:00+00:00\"\r\n    },\r\n    \"participant\": [\r\n        {\r\n            \"role\": [\r\n                {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://innowell.org/fhir/care/staff_roles\",\r\n                            \"display\": \"Clinician\"\r\n                        }\r\n                    ]\r\n                }\r\n            ],\r\n            \"member\": {\r\n                \"reference\": \"Practitioner/<practitioner_id>\",\r\n                \"display\": \"Dr. Jane Doe\"\r\n            },\r\n            \"period\": {\r\n                \"start\": \"2025-05-21T14:30:00+00:00\"\r\n            }\r\n        }\r\n    ]\r\n}\", null, \"application/json\"); \n request.Content = content; \n var response = await client.SendAsync(request); \n response.EnsureSuccessStatusCode(); \n Console.WriteLine(await response.Content.ReadAsStringAsync());"
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CareTeamCreateRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CareTeamResponse'
        '400':
          description: Invalid CareTeams payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /CareTeam/{care_team_id}:
    get:
      tags:
        - CareTeams
      summary: Get Care Team by Id
      x-codeSamples:
        - lang: Curl
          source: >-
            curl --location '<INTEGRATION_ENDPOINT_URL>/CareTeam/<care_team_id>'
            \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/CareTeam/<care_team_id>"); 
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>"); 
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>"); 
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>"); 
             var content = new StringContent(string.Empty); 
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); 
             request.Content = content; 
             var response = await client.SendAsync(request); 
             response.EnsureSuccessStatusCode(); 
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
        - name: care_team_id
          in: path
          description: Care Team Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CareTeamResponse'
        '404':
          description: CareTeam.subject with this ID not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - CareTeams
      summary: Update Care Team
      x-codeSamples:
        - lang: Curl
          source: >-
            curl --location --request PUT
            '<INTEGRATION_ENDPOINT_URL>/CareTeam/<care_team_id>' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>' \ 
             --data '{ 
                 "resourceType": "CareTeam", 
                 "id": "<care_team_id>", 
                 "status": "active", 
                 "name": "Primary Care Team", 
                 "subject": { 
                     "reference": "Patient/<patient_id>", 
                     "display": "Patient Ref" 
                 }, 
                 "period": { 
                     "start": "2024-12-05T14:30:00+00:00", 
                     "end": "2024-12-05T14:30:00+00:00" 
                 }, 
                 "participant": [ 
                     { 
                         "role": [ 
                             { 
                                 "coding": [ 
                                     { 
                                         "system": "http://innowell.org/fhir/care/staff_roles", 
                                         "display": "Clinician" 
                                     } 
                                 ] 
                             } 
                         ], 
                         "member": { 
                             "reference": "Practitioner/<practitioner_id>", 
                             "display": "Dr. Jane Doe" 
                         }, 
                         "period": { 
                             "start": "2024-12-05T14:30:00+00:00" 
                         } 
                     } 
                 ] 
             }'
        - lang: C# Http Client
          source: "var client = new HttpClient(); \n var request = new HttpRequestMessage(HttpMethod.Put, \"<INTEGRATION_ENDPOINT_URL>/CareTeam/<care_team_id>\"); \n request.Headers.Add(\"Innowell-SubscriptionKey\", \"<ADD_API_KEY>\"); \n request.Headers.Add(\"Innowell-EmrId\", \"<ADD_INNOWELL_EMR_ID>\"); \n request.Headers.Add(\"Innowell-TenantId\", \"<ADD_INNOWELL_TENANT_ID>\"); \n var content = new StringContent(\"{\r\n    \"resourceType\": \"CareTeam\",\r\n    \"id\": \"<care_team_id>\",\r\n    \"status\": \"active\",\r\n    \"name\": \"Primary Care Team\",\r\n    \"subject\": {\r\n        \"reference\": \"Patient/<patient_id>\",\r\n        \"display\": \"Patient Ref\"\r\n    },\r\n    \"period\": {\r\n        \"start\": \"2024-12-05T14:30:00+00:00\",\r\n        \"end\": \"2024-12-05T14:30:00+00:00\"\r\n    },\r\n    \"participant\": [\r\n        {\r\n            \"role\": [\r\n                {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://innowell.org/fhir/care/staff_roles\",\r\n                            \"display\": \"Clinician\"\r\n                        }\r\n                    ]\r\n                }\r\n            ],\r\n            \"member\": {\r\n                \"reference\": \"Practitioner/<practitioner_id>\",\r\n                \"display\": \"Dr. Jane Doe\"\r\n            },\r\n            \"period\": {\r\n                \"start\": \"2024-12-05T14:30:00+00:00\"\r\n            }\r\n        }\r\n    ]\r\n}\", null, \"application/json\"); \n request.Content = content; \n var response = await client.SendAsync(request); \n response.EnsureSuccessStatusCode(); \n Console.WriteLine(await response.Content.ReadAsStringAsync());"
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
        - name: care_team_id
          in: path
          description: Care Team Id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CareTeamUpdateRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CareTeamResponse'
        '400':
          description: Invalid CareTeams payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /Observation:
    get:
      tags:
        - Observations
      summary: List Observations
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/Observation' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/Observation"); 
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>"); 
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>"); 
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>"); 
             var content = new StringContent(string.Empty); 
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); 
             request.Content = content; 
             var response = await client.SendAsync(request); 
             response.EnsureSuccessStatusCode(); 
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObservationList'
  /Observation/{observation_id}:
    get:
      tags:
        - Observations
      summary: Get Observation By Id
      x-codeSamples:
        - lang: Curl
          source: >-
            curl --location
            '<INTEGRATION_ENDPOINT_URL>/Observation/<observation_id>' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/Observation/<observation_id>"); 
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>"); 
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>"); 
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>"); 
             var content = new StringContent(string.Empty); 
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); 
             request.Content = content; 
             var response = await client.SendAsync(request); 
             response.EnsureSuccessStatusCode(); 
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
        - name: observation_id
          in: path
          description: Observation Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Observation'
        '404':
          description: Observation with this ID not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /Patient:
    get:
      tags:
        - Patient
      summary: List Patients
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/Patient' \ 
            --header 'Content-Type: application/json' \ 
            --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
            --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
            --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/Patient");
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>");
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>");
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>");
             var content = new StringContent(string.Empty);
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
             request.Content = content;
             var response = await client.SendAsync(request);
             response.EnsureSuccessStatusCode();
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientList'
    post:
      tags:
        - Patient
      summary: Create Patient
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/Patient' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>' \ 
             --data-raw '{ 
                 "resourceType": "Patient", 
                 "active": true, 
                 "name": [ 
                     { 
                         "use": "official", 
                         "family": "Doe", 
                         "given": [ 
                             "John" 
                         ] 
                     }
                 ], 
                 "telecom": [ 
                     { 
                         "system": "email", 
                         "value": "email1@myorg.com" 
                     }, 
                     { 
                         "system": "phone", 
                         "value": "0491570110", 
                         "use": "mobile" 
                     } 
                 ], 
                 "birthDate": "2010-09-15", 
                 "extension": [ 
                     { 
                         "url": "http://innowell.org/fhir/care/gender", 
                         "valueString": "male" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/sexual_identity", 
                         "valueString": "questioning" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/indigenous_status", 
                         "valueString": "neither" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/level_of_education", 
                         "valueString": "certificate_diploma" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/student", 
                         "valueString": "yes" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/employed", 
                         "valueString": "yes" 
                     }         
                 ] 
             }'
        - lang: C# Http Client
          source: "var client = new HttpClient(); \n var request = new HttpRequestMessage(HttpMethod.Post, \"<INTEGRATION_ENDPOINT_URL>/Patient\"); \n request.Headers.Add(\"Innowell-SubscriptionKey\", \"<ADD_API_KEY>\"); \n request.Headers.Add(\"Innowell-EmrId\", \"<ADD_INNOWELL_EMR_ID>\"); \n request.Headers.Add(\"Innowell-TenantId\", \"<ADD_INNOWELL_TENANT_ID>\"); \n var content = new StringContent(\"{\r\n    \"resourceType\": \"Patient\",\r\n    \"active\": true,\r\n    \"name\": [\r\n        {\r\n            \"use\": \"official\",\r\n            \"family\": \"Doe\",\r\n            \"given\": [\r\n                \"John\"\r\n            ]\r\n        }\r\n    ],\r\n    \"telecom\": [\r\n        {\r\n            \"system\": \"email\",\r\n            \"value\": \"email1@myorg.com\"\r\n        },\r\n        {\r\n            \"system\": \"phone\",\r\n            \"value\": \"0491570110\",\r\n            \"use\": \"mobile\"\r\n        }\r\n    ],\r\n    \"birthDate\": \"2010-09-15\",\r\n    \"extension\": [\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/gender\",\r\n            \"valueString\": \"male\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/sexual_identity\",\r\n            \"valueString\": \"questioning\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/indigenous_status\",\r\n            \"valueString\": \"neither\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/level_of_education\",\r\n            \"valueString\": \"certificate_diploma\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/student\",\r\n            \"valueString\": \"yes\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/employed\",\r\n            \"valueString\": \"yes\"\r\n        }        \r\n    ]\r\n}\", null, \"application/json\"); \n request.Content = content; \n var response = await client.SendAsync(request); \n response.EnsureSuccessStatusCode(); \n Console.WriteLine(await response.Content.ReadAsStringAsync());"
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientCreateRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientResponse'
        '400':
          description: Invalid Patient payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /Patient/{patient_id}:
    get:
      tags:
        - Patient
      summary: Get Patient By Id
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/Patient/{patient_id}' \ 
            --header 'Content-Type: application/json' \ 
            --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
            --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
            --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/Patient/{patient_id}");
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>");
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>");
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>");
             var content = new StringContent(string.Empty);
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
             request.Content = content;
             var response = await client.SendAsync(request);
             response.EnsureSuccessStatusCode();
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
        - name: patient_id
          in: path
          description: Patient Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientResponse'
        '404':
          description: Patient with this ID not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - Patient
      summary: Update Patient
      x-codeSamples:
        - lang: Curl
          source: >-
            curl --location --request PUT
            '<INTEGRATION_ENDPOINT_URL>/Patient/<patient_id>' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>' \ 
             --data-raw '{ 
                 "resourceType": "Patient", 
                 "id": "<patient_id>", 
                 "active": true, 
                 "name": [ 
                     { 
                         "use": "official", 
                         "family": "Doe", 
                         "given": [ 
                             "John" 
                         ] 
                     } 
                 ], 
                 "telecom": [ 
                     { 
                         "system": "email", 
                         "value": "email1@myorg.com" 
                     }, 
                     { 
                         "system": "phone", 
                         "value": "0491570110", 
                         "use": "mobile" 
                     } 
                 ], 
                 "birthDate": "2010-09-15", 
                 "extension": [ 
                     { 
                         "url": "http://innowell.org/fhir/care/gender", 
                         "valueString": "male" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/sexual_identity", 
                         "valueString": "questioning" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/indigenous_status", 
                         "valueString": "neither" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/level_of_education", 
                         "valueString": "certificate_diploma" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/student", 
                         "valueString": "yes" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/employed", 
                         "valueString": "yes" 
                     }         
                 ] 
             }'
        - lang: C# Http Client
          source: "var client = new HttpClient(); \n var request = new HttpRequestMessage(HttpMethod.Put, \"<INTEGRATION_ENDPOINT_URL>/Patient/<patient_id>\"); \n request.Headers.Add(\"Innowell-SubscriptionKey\", \"<ADD_API_KEY>\"); \n request.Headers.Add(\"Innowell-EmrId\", \"<ADD_INNOWELL_EMR_ID>\"); \n request.Headers.Add(\"Innowell-TenantId\", \"<ADD_INNOWELL_TENANT_ID>\"); \n var content = new StringContent(\"{\r\n    \"resourceType\": \"Patient\",\r\n    \"id\": \"<patient_id>\",\r\n    \"active\": true,\r\n    \"name\": [\r\n        {\r\n            \"use\": \"official\",\r\n            \"family\": \"Doe\",\r\n            \"given\": [\r\n                \"John\"\r\n            ]\r\n        }\r\n    ],\r\n    \"telecom\": [\r\n        {\r\n            \"system\": \"email\",\r\n            \"value\": \"email1@myorg.com\"\r\n        },\r\n        {\r\n            \"system\": \"phone\",\r\n            \"value\": \"0491570110\",\r\n            \"use\": \"mobile\"\r\n        }\r\n    ],\r\n    \"birthDate\": \"2010-09-15\",\r\n    \"extension\": [\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/gender\",\r\n            \"valueString\": \"male\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/sexual_identity\",\r\n            \"valueString\": \"questioning\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/indigenous_status\",\r\n            \"valueString\": \"neither\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/level_of_education\",\r\n            \"valueString\": \"certificate_diploma\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/student\",\r\n            \"valueString\": \"yes\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/employed\",\r\n            \"valueString\": \"yes\"\r\n        }        \r\n    ]\r\n}\", null, \"application/json\"); \n request.Content = content; \n var response = await client.SendAsync(request); \n response.EnsureSuccessStatusCode(); \n Console.WriteLine(await response.Content.ReadAsStringAsync());"
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
        - name: patient_id
          in: path
          description: Patient Id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientUpdateRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientResponse'
        '400':
          description: Invalid Patient payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /Practitioner:
    get:
      tags:
        - Practitioner
      summary: List Practitioners
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/Practitioner' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/Practitioner"); 
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>"); 
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>"); 
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>"); 
             var content = new StringContent(string.Empty); 
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); 
             request.Content = content; 
             var response = await client.SendAsync(request); 
             response.EnsureSuccessStatusCode(); 
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PractitionerList'
    post:
      tags:
        - Practitioner
      summary: Create Practitioner
      x-codeSamples:
        - lang: Curl
          source: |-
            curl --location '<INTEGRATION_ENDPOINT_URL>/Practitioner' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>' \ 
             --data-raw '{ 
                 "resourceType": "Practitioner", 
                 "active": true, 
                 "name": [ 
                     { 
                         "family": "Doe", 
                         "given": [ 
                             "Jane" 
                         ] 
                     } 
                 ], 
                 "telecom": [ 
                     { 
                         "system": "email", 
                         "value": "email@myorg.org", 
                         "use": "work" 
                     } 
                 ], 
                 "qualification": [ 
                     { 
                         "code": { 
                             "text": "doctorate" 
                         } 
                     } 
                 ], 
                 "extension": [ 
                     { 
                         "url": "http://innowell.org/fhir/care/staff_roles", 
                         "valueString": "Clinician" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/profession", 
                         "valueString": "school_based_counsellor" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/years_practicing_discipline", 
                         "valueString": "2" 
                     } 
                 ] 
             }'
        - lang: C# Http Client
          source: "var client = new HttpClient(); \n var request = new HttpRequestMessage(HttpMethod.Post, \"<INTEGRATION_ENDPOINT_URL>/Practitioner\"); \n request.Headers.Add(\"Innowell-SubscriptionKey\", \"<ADD_API_KEY>\"); \n request.Headers.Add(\"Innowell-EmrId\", \"<ADD_INNOWELL_EMR_ID>\"); \n request.Headers.Add(\"Innowell-TenantId\", \"<ADD_INNOWELL_TENANT_ID>\"); \n var content = new StringContent(\"{\r\n    \"resourceType\": \"Practitioner\",\r\n    \"active\": true,\r\n    \"name\": [\r\n        {\r\n            \"family\": \"Doe\",\r\n            \"given\": [\r\n                \"Jane\"\r\n            ]\r\n        }\r\n    ],\r\n    \"telecom\": [\r\n        {\r\n            \"system\": \"email\",\r\n            \"value\": \"email@myorg.org\",\r\n            \"use\": \"work\"\r\n        }\r\n    ],\r\n    \"qualification\": [\r\n        {\r\n            \"code\": {\r\n                \"text\": \"doctorate\"\r\n            }\r\n        }\r\n    ],\r\n    \"extension\": [\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/staff_roles\",\r\n            \"valueString\": \"Clinician\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/profession\",\r\n            \"valueString\": \"school_based_counsellor\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/years_practicing_discipline\",\r\n            \"valueString\": \"2\"\r\n        }\r\n    ]\r\n}\", null, \"application/json\"); \n request.Content = content; \n var response = await client.SendAsync(request); \n response.EnsureSuccessStatusCode(); \n Console.WriteLine(await response.Content.ReadAsStringAsync());"
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PractitionerCreateRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PractitionerResponse'
        '400':
          description: Invalid Practitioner payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /Practitioner/{practitioner_id}:
    get:
      tags:
        - Practitioner
      summary: Get Practitioner By Id
      x-codeSamples:
        - lang: Curl
          source: >-
            curl --location
            '<INTEGRATION_ENDPOINT_URL>/Practitioner/<practitioner_id>' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>'
        - lang: C# Http Client
          source: |-
            var client = new HttpClient(); 
             var request = new HttpRequestMessage(HttpMethod.Get, "<INTEGRATION_ENDPOINT_URL>/Practitioner/<practitioner_id>"); 
             request.Headers.Add("Innowell-SubscriptionKey", "<ADD_API_KEY>"); 
             request.Headers.Add("Innowell-EmrId", "<ADD_INNOWELL_EMR_ID>"); 
             request.Headers.Add("Innowell-TenantId", "<ADD_INNOWELL_TENANT_ID>"); 
             var content = new StringContent(string.Empty); 
             content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); 
             request.Content = content; 
             var response = await client.SendAsync(request); 
             response.EnsureSuccessStatusCode(); 
             Console.WriteLine(await response.Content.ReadAsStringAsync());
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
        - name: practitioner_id
          in: path
          description: Practitioner Id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PractitionerResponse'
        '404':
          description: Practitioner with this ID not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
        - Practitioner
      summary: Update Practitioner
      x-codeSamples:
        - lang: Curl
          source: >-
            curl --location --request PUT
            '<INTEGRATION_ENDPOINT_URL>/Practitioner/<practitioner_id>' \ 
             --header 'Content-Type: application/json' \ 
             --header 'Innowell-SubscriptionKey: <ADD_API_KEY>' \ 
             --header 'Innowell-EmrId: <ADD_INNOWELL_EMR_ID>' \ 
             --header 'Innowell-TenantId: <ADD_INNOWELL_TENANT_ID>' \ 
             --data-raw '{ 
                 "resourceType": "Practitioner", 
                 "id": "<practitioner_id>", 
                 "active": true, 
                 "name": [ 
                     { 
                         "family": "Doe", 
                         "given": [ 
                             "Jane" 
                         ] 
                     } 
                 ], 
                 "telecom": [ 
                     { 
                         "system": "email", 
                         "value": "email@myorg.org", 
                         "use": "work" 
                     } 
                 ], 
                 "qualification": [ 
                     { 
                         "code": { 
                             "text": "doctorate" 
                         } 
                     } 
                 ], 
                 "extension": [ 
                     { 
                         "url": "http://innowell.org/fhir/care/staff_roles", 
                         "valueString": "Clinician" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/profession", 
                         "valueString": "school_based_counsellor" 
                     }, 
                     { 
                         "url": "http://innowell.org/fhir/care/years_practicing_discipline", 
                         "valueString": "2" 
                     } 
                 ] 
             }'
        - lang: C# Http Client
          source: "var client = new HttpClient(); \n var request = new HttpRequestMessage(HttpMethod.Put, \"<INTEGRATION_ENDPOINT_URL>/Practitioner/<practitioner_id>\"); \n request.Headers.Add(\"Innowell-SubscriptionKey\", \"<ADD_API_KEY>\"); \n request.Headers.Add(\"Innowell-EmrId\", \"<ADD_INNOWELL_EMR_ID>\"); \n request.Headers.Add(\"Innowell-TenantId\", \"<ADD_INNOWELL_TENANT_ID>\"); \n var content = new StringContent(\"{\r\n    \"resourceType\": \"Practitioner\",\r\n    \"id\": \"<practitioner_id>\",\r\n    \"active\": true,\r\n    \"name\": [\r\n        {\r\n            \"family\": \"Doe\",\r\n            \"given\": [\r\n                \"Jane\"\r\n            ]\r\n        }\r\n    ],\r\n    \"telecom\": [\r\n        {\r\n            \"system\": \"email\",\r\n            \"value\": \"email@myorg.org\",\r\n            \"use\": \"work\"\r\n        }\r\n    ],\r\n    \"qualification\": [\r\n        {\r\n            \"code\": {\r\n                \"text\": \"doctorate\"\r\n            }\r\n        }\r\n    ],\r\n    \"extension\": [\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/staff_roles\",\r\n            \"valueString\": \"Clinician\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/profession\",\r\n            \"valueString\": \"school_based_counsellor\"\r\n        },\r\n        {\r\n            \"url\": \"http://innowell.org/fhir/care/years_practicing_discipline\",\r\n            \"valueString\": \"2\"\r\n        }\r\n    ]\r\n}\", null, \"application/json\"); \n request.Content = content; \n var response = await client.SendAsync(request); \n response.EnsureSuccessStatusCode(); \n Console.WriteLine(await response.Content.ReadAsStringAsync());"
      parameters:
        - name: Innowell-SubscriptionKey
          in: header
          description: Your unique Innowell API key. The API key is required.
          required: true
          schema:
            type: string
        - name: Innowell-EmrId
          in: header
          description: EMR/PMS Id that is provided by Innowell. The EMR Id is required.
          required: true
          schema:
            type: string
        - name: Innowell-TenantId
          in: header
          description: >-
            Tenant Id provided by Innowell uniquely identifies the Innowell
            tenant this request is targeting. The Tenant Id is required.
          required: true
          schema:
            type: string
        - name: practitioner_id
          in: path
          description: Practitioner Id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PractitionerUpdateRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PractitionerResponse'
        '400':
          description: Invalid Practitioner payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CareTeamResponse:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/Meta'
        status:
          type: string
        name:
          type: string
        subject:
          $ref: '#/components/schemas/Subject'
        period:
          $ref: '#/components/schemas/Period'
        participant:
          type: array
          items:
            $ref: '#/components/schemas/UpdateParticipant'
    CareTeamCreateRequest:
      type: object
      properties:
        resourceType:
          type: string
        status:
          type: string
        name:
          type: string
        subject:
          $ref: '#/components/schemas/Subject'
        period:
          $ref: '#/components/schemas/Period'
        participant:
          type: array
          items:
            $ref: '#/components/schemas/CreateParticipant'
    CareTeamUpdateRequest:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        status:
          type: string
        name:
          type: string
        subject:
          $ref: '#/components/schemas/Subject'
        period:
          $ref: '#/components/schemas/Period'
        participant:
          type: array
          items:
            $ref: '#/components/schemas/UpdateParticipant'
    CreateParticipant:
      type: object
      properties:
        role:
          type: array
          items:
            $ref: '#/components/schemas/Role'
        member:
          $ref: '#/components/schemas/Member'
        period:
          $ref: '#/components/schemas/ParticipantPeriod'
    UpdateParticipant:
      type: object
      properties:
        role:
          type: array
          items:
            $ref: '#/components/schemas/Role'
        member:
          $ref: '#/components/schemas/Member'
        period:
          $ref: '#/components/schemas/Period'
    Member:
      type: object
      properties:
        reference:
          type: string
        display:
          type: string
    Role:
      type: object
      properties:
        coding:
          type: array
          items:
            $ref: '#/components/schemas/Coding'
    Coding:
      type: object
      properties:
        system:
          type: string
        code:
          type: string
        display:
          type: string
    Period:
      type: object
      properties:
        start:
          format: date-time
          type: string
        end:
          format: date-time
          type: string
    ParticipantPeriod:
      type: object
      properties:
        start:
          format: date-time
          type: string
    Subject:
      type: object
      properties:
        reference:
          type: string
        display:
          type: string
    MetaForList:
      type: object
      properties:
        lastUpdated:
          type: string
    Meta:
      type: object
      properties:
        versionId:
          type: string
        lastUpdated:
          type: string
        source:
          type: string
    CareTeamsList:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/MetaForList'
        type:
          type: string
        link:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        entry:
          type: array
          items:
            $ref: '#/components/schemas/CareTeamEntry'
    CareTeamEntry:
      type: object
      properties:
        fullUrl:
          type: string
        resource:
          $ref: '#/components/schemas/CareTeamResponse'
    Link:
      type: object
      properties:
        relation:
          type: string
        url:
          type: string
    ErrorResponse:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/Meta'
        issue:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
    Issue:
      type: object
      properties:
        severity:
          type: string
        code:
          type: string
        diagnostics:
          type: string
        location:
          type: array
          items:
            type: string
        expression:
          type: array
          items:
            type: string
    ObservationList:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/MetaForList'
        type:
          type: string
        link:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        entry:
          type: array
          items:
            $ref: '#/components/schemas/ObservationEntry'
    ObservationEntry:
      type: object
      properties:
        fullUrl:
          type: string
        resource:
          $ref: '#/components/schemas/Observation'
    Observation:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/Meta'
        status:
          type: string
        category:
          type: array
          items:
            $ref: '#/components/schemas/CodeableConcept'
        code:
          $ref: '#/components/schemas/CodeableConceptText'
        subject:
          $ref: '#/components/schemas/Subject'
        effectiveDateTime:
          format: date-time
          type: string
        performer:
          type: array
          items:
            $ref: '#/components/schemas/Performer'
    Performer:
      type: object
      properties:
        reference:
          type: string
        display:
          type: string
    CodeableConceptText:
      type: object
      properties:
        text:
          type: string
    CodeableConcept:
      type: object
      properties:
        coding:
          type: array
          items:
            $ref: '#/components/schemas/Coding'
        text:
          type: string
    PatientList:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/MetaForList'
        type:
          type: string
        link:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        entry:
          type: array
          items:
            $ref: '#/components/schemas/PatientEntry'
    PatientEntry:
      type: object
      properties:
        fullUrl:
          type: string
        resource:
          $ref: '#/components/schemas/PatientResponse'
    PatientResponse:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/Meta'
        identifier:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        active:
          type: boolean
        name:
          type: array
          items:
            $ref: '#/components/schemas/HumanName'
        telecom:
          type: array
          items:
            $ref: '#/components/schemas/ContactPoint'
        birthDate:
          type: string
        address:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        extension:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
        managingOrganization:
          $ref: '#/components/schemas/ManagingOrganization'
    PatientCreateRequest:
      type: object
      properties:
        resourceType:
          type: string
        identifier:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        active:
          type: boolean
        name:
          type: array
          items:
            $ref: '#/components/schemas/HumanName'
        telecom:
          type: array
          items:
            $ref: '#/components/schemas/ContactPoint'
        birthDate:
          type: string
        address:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        extension:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
        managingOrganization:
          $ref: '#/components/schemas/ManagingOrganization'
    PatientUpdateRequest:
      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/HumanName'
        telecom:
          type: array
          items:
            $ref: '#/components/schemas/ContactPoint'
        birthDate:
          type: string
        address:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        extension:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
        managingOrganization:
          $ref: '#/components/schemas/ManagingOrganization'
    HumanName:
      type: object
      properties:
        use:
          type: string
        family:
          type: string
        given:
          type: array
          items:
            type: string
    ContactPoint:
      type: object
      properties:
        system:
          type: string
        value:
          type: string
        use:
          type: string
    Address:
      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
        period:
          $ref: '#/components/schemas/Period'
        country:
          type: string
    QualificationBackboneElement:
      type: object
      properties:
        language:
          $ref: '#/components/schemas/CodeableConcept'
        preferred:
          type: boolean
    ManagingOrganization:
      type: object
      properties:
        identifier:
          $ref: '#/components/schemas/Identifier'
    Identifier:
      type: object
      properties:
        system:
          type: string
        value:
          type: string
    PractitionerList:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/MetaForList'
        type:
          type: string
        link:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        entry:
          type: array
          items:
            $ref: '#/components/schemas/PractitionerEntry'
    PractitionerEntry:
      type: object
      properties:
        fullUrl:
          type: string
        resource:
          $ref: '#/components/schemas/PractitionerResponse'
    PractitionerResponse:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        meta:
          $ref: '#/components/schemas/Meta'
        extension:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
        identifier:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        active:
          type: boolean
        name:
          type: array
          items:
            $ref: '#/components/schemas/HumanName'
        telecom:
          type: array
          items:
            $ref: '#/components/schemas/ContactPoint'
        qualification:
          type: array
          items:
            $ref: '#/components/schemas/QualificationBackboneElement'
    PractitionerCreateRequest:
      type: object
      properties:
        resourceType:
          type: string
        extension:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
        identifier:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        active:
          type: boolean
        name:
          type: array
          items:
            $ref: '#/components/schemas/HumanName'
        telecom:
          type: array
          items:
            $ref: '#/components/schemas/ContactPoint'
        qualification:
          type: array
          items:
            $ref: '#/components/schemas/QualificationBackboneElement'
    PractitionerUpdateRequest:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
        extension:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
        identifier:
          type: array
          items:
            $ref: '#/components/schemas/Identifier'
        active:
          type: boolean
        name:
          type: array
          items:
            $ref: '#/components/schemas/HumanName'
        telecom:
          type: array
          items:
            $ref: '#/components/schemas/ContactPoint'
        qualification:
          type: array
          items:
            $ref: '#/components/schemas/QualificationBackboneElement'
    Extension:
      type: object
      properties:
        url:
          type: string
        valueString:
          type: string
