diff --git a/api-reference/user-app/records/constraints.mdx b/api-reference/user-app/records/constraints.mdx
new file mode 100644
index 00000000..d9d495ca
--- /dev/null
+++ b/api-reference/user-app/records/constraints.mdx
@@ -0,0 +1,29 @@
+
+ Constraints for File Upload:
+ 1. A client can create a maximum of 20 batches at a time.
+ 2. Each batch can include up to 10 files.
+ 3. All files in a batch must have the same content type.
+
+ Valid Content Types:
+ - Images:
+ - `contentTypeJpg` = "image/jpg"
+ - `contentTypePng` = "image/png"
+ - Documents:
+ - `contentTypePdf` = "application/pdf"
+
+ Valid File Sizes:
+ - Maximum size for PDF files: `pdfMaxSizeMb` = 25 MB
+ - Maximum size for image files: `imageMaxSizeMb` = 10 MB
+
+ Valid Document Types:
+ - The following values are allowed:
+ - `ps`: Prescription
+ - `lr`: Lab Report
+ - `ot`: Other
+ - `ds`: Discharge Summary
+ - `vc`: Vaccine Certificate
+ - `in`: Insurance
+ - `iv`: Invoice
+ - `sc`: Scan
+
+
diff --git a/api-reference/user-app/records/obtain-authorization.mdx b/api-reference/user-app/records/obtain-authorization.mdx
index 8a91998a..bd306406 100644
--- a/api-reference/user-app/records/obtain-authorization.mdx
+++ b/api-reference/user-app/records/obtain-authorization.mdx
@@ -3,20 +3,3 @@ openapi: post /mr/api/v1/docs
---
-
- Constraints for File Upload:
- 1. A client can create a maximum of 20 batches at a time.
- 2. Each batch can include up to 10 files.
- 3. All files in a batch must have the same content type.
-
- Valid Content Types:
- - Images:
- - `contentTypeJpg` = "image/jpg"
- - `contentTypePng` = "image/png"
- - Documents:
- - `contentTypePdf` = "application/pdf"
-
- Valid File Sizes:
- - Maximum size for PDF files: `pdfMaxSizeMb` = 25 MB
- - Maximum size for image files: `imageMaxSizeMb` = 10 MB
-
diff --git a/api-reference/user-app/records/records.yaml b/api-reference/user-app/records/records.yaml
index aaa4752f..95113ff7 100644
--- a/api-reference/user-app/records/records.yaml
+++ b/api-reference/user-app/records/records.yaml
@@ -1,743 +1,668 @@
openapi: 3.1.0
info:
- title: Document Upload API
- description: API to pre-sign the URL for uploading documents.
+ description: Vaults Api
+ title: Vaults Api
version: 1.0.0
- license:
- name: Proprietary License
- url: https://developer.eka.care/license
-
servers:
- - url: https://api.eka.care
- description: Production server
- - url: https://api.dev.eka.care
- description: Development server
-tags:
- - name: Records
- description: API related to records document management.
+- url: https://api.eka.care
+- url: https://api.dev.eka.care
paths:
- /mr/api/v1/docs:
+ /health/api/v1/fhir/retrieve:
get:
- summary: Fetch documents based on filters
- description: To get the list of all the records for a given authenticated user.
- operationId: getDocuments
+ description: Retrieve a health record based on the given identifier, hip_id,
+ and health_id in nrces FHIR json format.
parameters:
- - name: u_at__gt
- in: query
- schema:
- type: string
- nullable: true
- example: 1614556800
- description: Filters the documents by returning all documents that were updated after the specified u_at__gt timestamp. The value should be a valid epoch timestamp.
- - name: offset
- in: query
- schema:
- type: string
- nullable: true
- description: Please include the nextPageToken from the API response to enable pagination.
- - name: accept
- in: header
- required: true
- schema:
- type: string
- enum:
- - application/json
- example: application/json
- description: To get response in json format
+ - description: The unique identifier for the health record.
+ in: query
+ name: identifier
+ required: true
+ schema:
+ description: The unique identifier for the health record.
+ examples:
+ - "170781696111222"
+ type: string
+ - description: The HIP (Health Information Provider) ID.
+ in: query
+ name: hip_id
+ required: true
+ schema:
+ description: The HIP (Health Information Provider) ID.
+ examples:
+ - eka
+ type: string
+ - description: The health ID associated with the record.
+ in: query
+ name: health_id
+ required: true
+ schema:
+ description: The health ID associated with the record.
+ examples:
+ - test@abdm
+ type: string
responses:
- '200':
- description: A list of documents matching the query.
+ "200":
content:
application/json:
schema:
- type: object
- properties:
- response:
- type: object
- properties:
- items:
- type: array
- items:
- type: object
- properties:
- record:
- type: object
- properties:
- item:
- type: object
- properties:
- documentId:
- type: string
- description: Unique ID of the document.
- example: df04c7e6-577b-4990-948c-5a31820c6a67
- uploadDate:
- type: string
- format: date-time
- description: Date when the document was uploaded.
- example: 2024-08-06T07:39:35Z
- documentType:
- type: string
- description: Type of the document.
- example: TYPE_LAB_REPORT
- metadata:
- type: object
- properties:
- thumbnail:
- type: string
- format: uri
- description: URL of the document's thumbnail.
- example: https://vault-cdn.dev.eka.care/fac0704e-a0e3-4c93-a972-e6c1f188592d/df04c7e6-577b-4990-948c-5a31820c6a67/5dbc4b75-df1a-412d-82a3-77d54671398c.jpeg
- documentDate:
- type: string
- format: date-time
- description: Date of the document.
- example: 2021-09-08T18:30:00Z
- tags:
- type: array
- items:
- type: string
- description: Tags associated with the document.
- example: TYPE_TAG_SMART
- abha:
- type: object
- nullable: true
- properties:
- health_id:
- type: string
- example: mayank.singh@abdm
- link_status:
- type: string
- enum:
- - LINKED
- - INITIATED
- - SCHEDULED
- - ERRORED
- - RESCHEDULED
- patientOid:
- type: string
- description: Patient OID associated with the document.
- example: 161494290947153
- '400':
- description: Bad Request. Invalid or missing parameters.
- '401':
- description: Unauthorized. Invalid JWT token or client ID.
- '500':
- description: Internal Server Error.
+ $ref: '#/components/schemas/HealthRecordsResponse'
+ description: OK
+ "400":
+ description: Bad Request
+ "500":
+ description: Internal Server Error
security:
- - auth: []
- post:
- operationId: getAuthorization
- tags:
- - Records
- summary: Obtain a Presigned URL for Document Upload
- description: Generate a presigned URL that allows you to securely upload a document to the server. This URL can be used to upload the document directly without needing additional authentication or authorization steps.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- batch_request:
- type: array
- items:
- $ref: '#/components/schemas/UpdateDocumentV3Request'
- example:
- batch_request:
- -
- dt: "ps"
- sh: false
- dd_e: 1614556800
- tg: ["tag1", "tag2"]
- files:
- -
- contentType: "image/jpeg"
- file_size: 110000
+ - authApiKey: []
+ summary: Retrieve health records
+ /mr/api/v1/docs:
+ get:
+ description: To get the list of all the records for a given authenticated user.
+ parameters:
+ - description: Filters the documents by returning all documents that were updated
+ after the specified u_at__gt timestamp. The value should be a valid epoch
+ timestamp.
+ in: query
+ name: u_at__gt
+ schema:
+ description: Filters the documents by returning all documents that were
+ updated after the specified u_at__gt timestamp. The value should be a
+ valid epoch timestamp.
+ examples:
+ - "1614556800"
+ type:
+ - "null"
+ - string
+ - description: Please include the nextPageToken from the API response to enable
+ pagination.
+ in: query
+ name: offset
+ schema:
+ description: Please include the nextPageToken from the API response to enable
+ pagination.
+ type:
+ - "null"
+ - string
responses:
- '200':
- description: Presigned URL successfully retrieved
+ "200":
content:
application/json:
schema:
- $ref: '#/components/schemas/UploadResponse'
- '400':
+ $ref: '#/components/schemas/ListRecordsResponse'
+ description: OK
+ "400":
description: Bad Request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ErrorUploadResponse'
- examples:
- ErrorUploadResponse:
- summary: Example of an error response with an empty batch_request
- value:
- error: true
- message: "Invalid document type."
- batch_response: [] # Empty array for batch_request
- upload_time: null
- '500':
- description: Internal Server Error. No response body is expected.
- '502':
- description: Bad Gateway. No response body is expected.
- '503':
- description: Service Unavailable. No response body is expected.
- '504':
- description: Gateway Timeout. No response body is expected.
+ "500":
+ description: Internal Server Error
security:
- - auth: []
-
- /upload:
+ - authApiKey: []
+ summary: Fetch documents based on filters
post:
- summary: Upload Records
- description: Upload a records using the signed URL for each document requested in obtain authorization API
+ description: Generate a presigned URL that allows you to securely upload a document
+ to the server. This URL can be used to upload the document directly without
+ needing additional authentication or authorization steps.
requestBody:
content:
- multipart/form-data:
+ application/json:
schema:
- type: object
- additionalProperties:
- type: string
- properties:
- file:
- type: string
- format: binary
- description: The file to upload.
- required:
- - file
+ $ref: '#/components/schemas/RequestRequest'
responses:
- '204':
- description: No Content - Successful Upload with No Response Body
- '403':
- description: Forbidden - Access Denied
+ "200":
content:
- application/xml:
+ application/json:
schema:
- type: object
- properties:
- Error:
- type: object
- properties:
- Code:
- type: string
- description: Error code.
- Message:
- type: string
- description: Error message.
- RequestId:
- type: string
- description: Request ID.
- HostId:
- type: string
- description: Host ID.
- example:
- Error:
- Code: "AccessDenied"
- Message: "Invalid according to Policy: Extra input fields: content-type"
- RequestId: "JGD23XY93Z00Z2DB"
- HostId: "NjZf6f4Yo3LwikPHTwtyS02TEftaoWWvS8BmfRlQmA5pwllX6FHyMuO4hNVT0AIBOwKHFoEFkk8="
- '500':
+ $ref: '#/components/schemas/RequestResponse'
+ description: OK
+ "400":
+ description: Bad Request
+ "500":
description: Internal Server Error
- /mr/api/v1/docs/{document_id}:
- patch:
- summary: Update Document
- description: This API is used to update the document.
- parameters:
- - in: path
- name: document_id
- required: true
- description: Document ID to update the document details.
- schema:
- type: string
- example: 2df9e795-d368-4ceb-be9d-b44281703827
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- dt:
- type: string
- description: |
- The following values are allowed:
- - `ps`: Prescription
- - `lr`: Lab Report
- - `ot`: Other
- - `ds`: Discharge Summary
- - `vc`: Vaccine Certificate
- - `in`: Insurance
- - `iv`: Invoice
- - `sc`: Scan
- enum:
- - ps
- - lr
- - ot
- - ds
- - vc
- - in
- - iv
- - sc
- example: lr
- ndhm:
- type: boolean
- nullable: true
- description: If true, the record will be linked.
- example: true
- oid:
- type: string
- description: OID associated with the document.
- example: "161847797963700"
- required:
- - dt
- - ndhm
- - oid
- responses:
- '200':
- description: Document linked successfully.
- '404':
- description: No such document.
- '5XX':
- description: Unexpected error.
security:
- - auth: []
-
+ - authApiKey: []
+ summary: Obtain a Presigned URL for Document Upload
+ /mr/api/v1/docs/{document_id}:
delete:
- summary: Delete a document.
- description : This API is used to delete a document using a document ID.
+ description: This API is used to delete a document using a document ID.
parameters:
- - in: path
- name: document_id
- required: true
+ - description: Document ID to delete the document.
+ in: path
+ name: document_id
+ required: true
+ schema:
description: Document ID to delete the document.
- schema:
- type: string
- example: 2df9e795-d368-4ceb-be9d-b44281703827
+ examples:
+ - 6dc7a3d9-003b-45f6-b4bc-9c334e95b390
+ type: string
responses:
- '200':
- description: Document deleted successfully.
- '404':
- description: No such document.
- '5XX':
- description: Unexpected error.
+ "400":
+ description: Bad Request
+ "500":
+ description: Internal Server Error
security:
- - auth: []
-
+ - authApiKey: []
+ summary: Delete a document.
get:
- summary: Describes a document.
- description: Once you get the list of all the documents with coresponding id's, you can this to know more details about the document.
- operationId: getDocument
+ description: Once you get the list of all the documents with corresponding id’s,
+ you can this to know more details about the document.
parameters:
- - in: path
- name: document_id
- required: true
+ - description: Document ID to fetch the document details.
+ in: path
+ name: document_id
+ required: true
+ schema:
description: Document ID to fetch the document details.
- schema:
- type: string
- example: 2df9e795-d368-4ceb-be9d-b44281703827
+ examples:
+ - 6dc7a3d9-003b-45f6-b4bc-9c334e95b390
+ type: string
responses:
- '200':
- description: Description of a document.
+ "200":
content:
application/json:
schema:
- type: object
- properties:
- source:
- type: string
- document_date_epoch:
- type: integer
- tags:
- type: array
- items:
- type: string
- dt:
- type: string
- enum:
- - TYPE_LAB_REPORT
- - TYPE_PRESCRIPTION
- - TYPE_DISCHARGE_SUMMARY
- - TYPE_VACCINE_CERTIFICATE
- - TYPE_INSURANCE
- - TYPE_INVOICE
- - TYPE_SCAN
- - TYPE_OTHER
- files:
- type: array
- items:
- type: object
- properties:
- asset_url:
- type: string
- format: uri
- file_type:
- type: string
- enum:
- - IMG
- - PDF
- example:
- source: "androidp"
- document_date: "2021-03-13T13:01:59Z"
- document_type: TYPE_LAB_REPORT
- tags: ["covid"]
- files:
- - asset_url: https://sample-lab-report.s3.ap-south-1.amazonaws.com/161494290947153/2df9e795-d368-4ceb-be9d-b44281703827/0cb1277e-1c4d-42cc-acd1-9630497e4f9d.jpeg
- file_type: IMG
- - asset_url: https://sample-lab-report.s3.ap-south-1.amazonaws.com/161494290947153/2df9e795-d368-4ceb-be9d-b44281703827/0cb1277e-1c4d-42cc-acd1-9630497e4f9d.pdf
- file_type: PDF
- '5XX':
- description: Unexpected error.
- '404':
- description: No such document.
+ $ref: '#/components/schemas/DescribeResponse'
+ description: OK
+ "400":
+ description: Bad Request
+ "500":
+ description: Internal Server Error
security:
- - auth: []
-
- /health/api/v1/fhir/retrieve:
- get:
- summary: Retrieve health records
- description: Retrieve a health record based on the given identifier, hip_id, and health_id in nrces FHIR json format.
+ - authApiKey: []
+ summary: Describes a document.
+ patch:
+ description: This API is used to update the document.
parameters:
- - name: identifier
- in: query
- required: true
- description: The unique identifier for the health record.
- schema:
- type: string
- - name: hip_id
- in: query
- required: true
- description: The HIP (Health Information Provider) ID.
- schema:
- type: string
- - name: health_id
- in: query
- required: true
- description: The health ID associated with the record.
- schema:
- type: string
+ - description: Document ID to update the document details.
+ in: path
+ name: document_id
+ required: true
+ schema:
+ description: Document ID to update the document details.
+ examples:
+ - 6dc7a3d9-003b-45f6-b4bc-9c334e95b390
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateRequest'
responses:
- '200':
- description: Successful retrieval of health records.
- content:
- application/json:
- schema:
- type: object
- properties:
- resourceType:
- type: string
- example: Bundle
- type:
- type: string
- example: document
- link:
- type: array
- items:
- type: object
- properties:
- url:
- type: string
- relation:
- type: string
- entry:
- type: array
- items:
- type: object
- properties:
- resource:
- type: object
- properties:
- author:
- type: array
- items:
- type: object
- properties:
- reference:
- type: string
- date:
- type: string
- format: date-time
- extension:
- type: array
- items:
- type: object
- properties:
- url:
- type: string
- valueString:
- type: string
- id:
- type: string
- identifier:
- type: object
- properties:
- system:
- type: string
- value:
- type: string
- meta:
- type: object
- properties:
- lastUpdated:
- type: string
- format: date-time
- resourceType:
- type: string
- section:
- type: array
- items:
- type: object
- properties:
- entry:
- type: array
- items:
- type: object
- properties:
- reference:
- type: string
- title:
- type: string
- status:
- type: string
- subject:
- type: object
- properties:
- reference:
- type: string
- title:
- type: string
- type:
- type: object
- properties:
- text:
- type: string
- id:
- type: string
- meta:
- type: object
- properties:
- versionId:
- type: string
- lastUpdated:
- type: string
- format: date-time
- profile:
- type: array
- items:
- type: string
- security:
- type: array
- items:
- type: object
- properties:
- code:
- type: string
- display:
- type: string
- system:
- type: string
- identifier:
- type: object
- properties:
- system:
- type: string
- value:
- type: string
- timestamp:
- type: string
- format: date-time
- '404':
- description: when request identifier, hip_id, health_id has no data
- content:
- application/json:
- schema:
- type: object
- properties:
- resourceType:
- type: string
- example: Bundle
- type:
- type: string
- example: document
- meta:
- type: object
- properties:
- lastUpdated:
- type: string
- format: date-time
- '401':
- description: Unauthorized. Invalid or missing authentication.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- example: Unauthorized
+ "400":
+ description: Bad Request
+ "500":
+ description: Internal Server Error
security:
- - auth: []
+ - authApiKey: []
+ summary: Update Document
/mr/webhook/smart-report:
post:
- summary: Smart Report Events
- description: >-
- When the records get uploaded, a webhook event is sent to register to get the smart report of the record upload. If there are multiple records upload in upload docs API we need to register web hook for all the document id recevied in the reponse. Use the below request payload to register to webhook. You can find [here](https://ekacare.notion.site/726b13df13ea4409b0cd30c6f3a80315?v=dcd10c722d3149d880ae889b06f4820a) list of parsing capablities we have as of now.
+ description: When the records get uploaded, a webhook event is sent to register
+ to get the smart report of the record upload. If there are multiple records
+ upload in upload docs API we need to register web hook for all the document
+ id recevied in the reponse. Use the below request payload to register to webhook.
+ You can find [here](https://ekacare.notion.site/726b13df13ea4409b0cd30c6f3a80315?v=dcd10c722d3149d880ae889b06f4820a)
+ list of parsing capabilities we have as of now.
requestBody:
- required: true
content:
application/json:
schema:
- type: object
- properties:
- event_type:
- type: string
- example: "smart-report"
- timestamp:
- type: string
- example: "2023-07-30T18:07:24.000Z"
- data:
- type: object
- properties:
- document_id:
- type: string
- description: This is document_id which you have recevied Obtain a Presigned URL for Document Upload response
- webook_url:
- type: string
- description: This url we will use to send the payload upon successful parsing of the record
-
+ $ref: '#/components/schemas/SmartReportRequest'
responses:
- '200':
- description: Event registered successfully
- '204':
- description: Event created successfully
- '400':
- description: Bad request
- '403':
- description: Forbidden - Access Denied
- '500':
- description: Something went wrong
+ "400":
+ description: Bad Request
+ "500":
+ description: Internal Server Error
security:
- - auth: []
+ - authApiKey: []
+ summary: Smart Report Events
+ /upload:
+ post:
+ description: Upload a records using the signed URL for each document requested
+ in obtain authorization API.
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/FormDataUploadRequest'
+ responses:
+ "400":
+ description: Bad Request
+ "500":
+ description: Internal Server Error
+ summary: Upload Records
components:
schemas:
- DocumentTypeQueryParam:
- type: string
- description: |
- Specifies the type of document being uploaded.
- The following values are allowed:
- - `ps`: Prescription
- - `lr`: Lab Report
- - `ot`: Other
- - `ds`: Discharge Summary
- - `vc`: Vaccine Certificate
- - `in`: Insurance
- - `iv`: Invoice
- - `sc`: Scan
- enum:
- - ps
- - lr
- - ot
- - ds
- - vc
- - in
- - iv
- - sc
-
- FileUploadRequest:
+ DescribeFile:
+ properties:
+ asset_url:
+ examples:
+ - https://sample-lab-report.s3.ap-south-1.amazonaws.com/filename.jpg
+ type: string
+ file_type:
+ examples:
+ - IMG
+ type: string
type: object
+ DescribeResponse:
properties:
- contentType:
+ document_date:
+ examples:
+ - "2021-03-13T13:01:59Z"
type: string
- description: The MIME type of the file (e.g., image/jpeg, application/pdf).
- file_size:
- type: integer
- format: int64
- description: Unit of file size should be bytes
+ document_type:
+ examples:
+ - TYPE_LAB_REPORT
+ type: string
+ files:
+ examples:
+ - - asset_url: https://sample-lab-report.s3.ap-south-1.amazonaws.com/filename.jpg
+ file_type: IMG
+ - asset_url: https://sample-lab-report.s3.ap-south-1.amazonaws.com/filename.pdf
+ file_type: PDF
+ items:
+ $ref: '#/components/schemas/DescribeFile'
+ type: array
+ source:
+ examples:
+ - androidp
+ type: string
+ tags:
+ examples:
+ - - covid
+ items:
+ type: string
+ type: array
+ type: object
+ FormDataUploadRequest:
+ properties:
+ file:
+ $ref: '#/components/schemas/MultipartFile'
+ description: The file to upload.
required:
- - contentType
- - file_size
-
- UpdateDocumentV3Request:
+ - file
type: object
+ HealthRecordsAuthor:
properties:
- dt:
- $ref: '#/components/schemas/DocumentTypeQueryParam'
- dd_e:
+ reference:
+ type: string
+ type: object
+ HealthRecordsEntry:
+ properties:
+ resource:
+ $ref: '#/components/schemas/HealthRecordsResource'
+ type: object
+ HealthRecordsEntryReference:
+ properties:
+ reference:
+ type: string
+ type: object
+ HealthRecordsExtension:
+ properties:
+ url:
+ type: string
+ valueString:
+ type: string
+ type: object
+ HealthRecordsIdentifier:
+ properties:
+ system:
+ type: string
+ value:
+ type: string
+ type: object
+ HealthRecordsLink:
+ properties:
+ relation:
+ type: string
+ url:
+ type: string
+ type: object
+ HealthRecordsMeta:
+ properties:
+ lastUpdated:
+ format: date-time
+ type: string
+ profile:
+ items:
+ type: string
+ type:
+ - array
+ - "null"
+ security:
+ items:
+ $ref: '#/components/schemas/HealthRecordsSecurity'
+ type:
+ - array
+ - "null"
+ versionId:
+ type: string
+ type: object
+ HealthRecordsResource:
+ properties:
+ author:
+ items:
+ $ref: '#/components/schemas/HealthRecordsAuthor'
+ type:
+ - array
+ - "null"
+ date:
+ format: date-time
+ type: string
+ extension:
+ items:
+ $ref: '#/components/schemas/HealthRecordsExtension'
+ type:
+ - array
+ - "null"
+ id:
+ type: string
+ identifier:
+ $ref: '#/components/schemas/HealthRecordsIdentifier'
+ meta:
+ $ref: '#/components/schemas/HealthRecordsMeta'
+ resourceType:
+ type: string
+ section:
+ items:
+ $ref: '#/components/schemas/HealthRecordsSection'
+ type:
+ - array
+ - "null"
+ status:
+ type: string
+ subject:
+ $ref: '#/components/schemas/HealthRecordsSubject'
+ title:
+ type: string
+ type:
+ $ref: '#/components/schemas/HealthRecordsType'
+ type: object
+ HealthRecordsResponse:
+ properties:
+ entry:
+ items:
+ $ref: '#/components/schemas/HealthRecordsEntry'
+ type:
+ - array
+ - "null"
+ id:
+ type: string
+ identifier:
+ $ref: '#/components/schemas/HealthRecordsIdentifier'
+ link:
+ items:
+ $ref: '#/components/schemas/HealthRecordsLink'
+ type:
+ - array
+ - "null"
+ meta:
+ $ref: '#/components/schemas/HealthRecordsMeta'
+ resourceType:
+ type: string
+ timestamp:
+ format: date-time
+ type: string
+ type:
+ type: string
+ type: object
+ HealthRecordsSection:
+ properties:
+ entry:
+ items:
+ $ref: '#/components/schemas/HealthRecordsEntryReference'
+ type:
+ - array
+ - "null"
+ title:
+ type: string
+ type: object
+ HealthRecordsSecurity:
+ properties:
+ code:
+ type: string
+ display:
+ type: string
+ system:
+ type: string
+ type: object
+ HealthRecordsSubject:
+ properties:
+ reference:
+ type: string
+ type: object
+ HealthRecordsType:
+ properties:
+ text:
+ type: string
+ type: object
+ ListRecordsAbha:
+ properties:
+ health_id:
+ type: string
+ link_status:
+ type: string
+ type: object
+ ListRecordsDocument:
+ properties:
+ documentId:
+ type: string
+ documentType:
+ type: string
+ metadata:
+ $ref: '#/components/schemas/ListRecordsMetadata'
+ patientOid:
type: integer
- format: int64
+ uploadDate:
+ format: date-time
+ type: string
+ type: object
+ ListRecordsItem:
+ properties:
+ record:
+ $ref: '#/components/schemas/ListRecordsRecord'
+ type: object
+ ListRecordsListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/ListRecordsItem'
+ type:
+ - array
+ - "null"
+ type: object
+ ListRecordsMetadata:
+ properties:
+ abha:
+ $ref: '#/components/schemas/ListRecordsAbha'
+ documentDate:
+ format: date-time
+ type: string
+ tags:
+ items:
+ type: string
+ type:
+ - array
+ - "null"
+ thumbnail:
+ type: string
+ type: object
+ ListRecordsRecord:
+ properties:
+ item:
+ $ref: '#/components/schemas/ListRecordsDocument'
+ type: object
+ ListRecordsResponse:
+ properties:
+ response:
+ $ref: '#/components/schemas/ListRecordsListResponse'
+ type: object
+ MultipartFile:
+ contentMediaType: application/octet-stream
+ format: binary
+ type: string
+ RequestBatchRequestItem:
+ properties:
+ dd_e:
description: Format should be in epoch time.
+ examples:
+ - 1.6145568e+09
+ type: integer
+ dt:
+ description: Specifies the type of document being uploaded.
+ enum:
+ - ps
+ - lr
+ - ot
+ - ds
+ - vc
+ - in
+ - iv
+ - sc
+ examples:
+ - ps
+ type: string
+ files:
+ description: A list of files to be uploaded, each with a specified content
+ type and size.
+ items:
+ $ref: '#/components/schemas/RequestFile'
+ type: array
sh:
- type: boolean
description: Indicates if the record can be shared with a doctor.
+ examples:
+ - false
+ type: boolean
tg:
- type: array
- description: The tag array can contain a maximum of **10 tags**.
- If more than 10 tags are provided in the request, only the **first 10 tags** will be considered.
+ description: The tag array can contain a maximum of 10 tags. If more than
+ 10 tags are provided in the request, only the first 10 tags will be considered
+ and each tag must be between 2 to 20 characters in length.
items:
type: string
- description: Each tag must be between **2 to 20 characters** in length.
-
- files:
type: array
- description: A list of files to be uploaded, each with a specified content type and size.
- items:
- $ref: '#/components/schemas/FileUploadRequest'
- required :
- - dt
- - files
- UploadResponse:
+ required:
+ - dt
+ - files
type: object
+ RequestFile:
properties:
- error:
- type: boolean
- example: false
- message:
+ contentType:
+ description: The MIME type of the file (e.g., image/jpeg, application/pdf).
+ examples:
+ - image/jpeg
type: string
- example: ""
- batch_response:
- type: array
+ file_size:
+ description: Unit of file size should be bytes
+ examples:
+ - 110000
+ type: integer
+ required:
+ - contentType
+ - file_size
+ type: object
+ RequestRequest:
+ properties:
+ batch_request:
items:
- $ref: '#/components/schemas/UploadResponseBody'
- token:
- type: string
- format: date-time
-
- ErrorUploadResponse:
+ $ref: '#/components/schemas/RequestBatchRequestItem'
+ type: array
type: object
+ RequestResponse:
properties:
+ batch_response:
+ items:
+ $ref: '#/components/schemas/RequestUploadResponseBody'
+ type:
+ - array
+ - "null"
error:
type: boolean
- example: true
message:
type: string
- description: Description of the error encountered
- batch_response:
- type: array
- items:
- $ref: '#/components/schemas/UploadResponseBody'
token:
- type: string
- format: date-time
-
- UploadResponseBody:
+ examples:
+ - "2023-11-07T05:31:56Z"
+ type:
+ - "null"
+ - string
type: object
+ RequestUploadResponseBody:
properties:
document_id:
+ examples:
+ - 6dc7a3d9-003b-45f6-b4bc-9c334e95b390
type: string
forms:
- type: array
items:
- $ref: '#/components/schemas/UploadResponseBodyForms'
-
- UploadResponseBodyForms:
+ $ref: '#/components/schemas/RequestUploadResponseBodyForms'
+ type:
+ - array
+ - "null"
type: object
+ RequestUploadResponseBodyForms:
properties:
- url:
- type: string
fields:
- type: object
additionalProperties:
type: string
+ type:
+ - object
+ - "null"
+ url:
+ type: string
+ type: object
+ SmartReportData:
+ properties:
+ document_id:
+ description: This is document_id which you have received Obtain a Presigned
+ URL for Document Upload response
+ type: string
+ webook_url:
+ description: This url we will use to send the payload upon successful parsing
+ of the record
+ type: string
+ type: object
+ SmartReportRequest:
+ properties:
+ data:
+ $ref: '#/components/schemas/SmartReportData'
+ event_type:
+ type: string
+ timestamp:
+ format: date-time
+ type: string
+ type: object
+ UpdateRequest:
+ properties:
+ dt:
+ description: Specifies the type of document being uploaded.
+ enum:
+ - ps
+ - lr
+ - ot
+ - ds
+ - vc
+ - in
+ - iv
+ - sc
+ examples:
+ - ps
+ type: string
+ ndhm:
+ description: If true, the record will be linked.
+ examples:
+ - false
+ type:
+ - "null"
+ - boolean
+ oid:
+ description: OID associated with the document.
+ examples:
+ - "161847797963700"
+ type: string
+ required:
+ - dt
+ - ndhm
+ - oid
+ type: object
securitySchemes:
- auth:
- type: apiKey
+ authApiKey:
+ description: The API requires the following auth in headers for authentication.
in: header
name: auth
- description: |
- The API requires the following auth in headers for authentication.
+ type: apiKey
diff --git a/api-reference/user-app/records/link-record.mdx b/api-reference/user-app/records/update-record.mdx
similarity index 100%
rename from api-reference/user-app/records/link-record.mdx
rename to api-reference/user-app/records/update-record.mdx
diff --git a/mint.json b/mint.json
index c00f787e..b89dd095 100644
--- a/mint.json
+++ b/mint.json
@@ -352,9 +352,10 @@
"icon": "up",
"pages": [
"api-reference/user-app/records/upload-record_overview",
+ "api-reference/user-app/records/constraints",
"api-reference/user-app/records/obtain-authorization",
"api-reference/user-app/records/upload-records",
- "api-reference/user-app/records/link-record"
+ "api-reference/user-app/records/update-record"
]
},
{