{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"VERA by Prepaire: cloud access port","version":"1.6.0","summary":"Approved remote laboratories and partners send samples or data through VERA and get results back.","description":"Contract PREPAIRE-VERA-PARTNER-PORT@1.1.0.\n\nBase URL: the copy's own address and base path. GET /api/partner/v1 on a copy answers with its own baseUrl and mode.\n\nAuthenticate every partner call with `Authorization: Bearer <credential>`. Prepaire issues a live credential once two Prepaire administrators have approved the partner; it is shown once, scoped and expiring, and VERA keeps only its SHA-256. The open copy's partner portal issues a sandbox credential for its sample partner, with sample people only.\n\nWebhooks: X-VERA-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Accept within 300 seconds. Delivery only to hosts VERA's signed egress allow-list approves; every event is also in GET /api/partner/v1/events.\n\nRate limits per credential: 120 calls, 12 uploads and 30 organ-chip writes a minute.\n\nData residency: VERA holds partner orders, files, results and ledgers in the United Arab Emirates. A result leaves only when an approved partner fetches it with its own credential; for a partner outside the UAE, only under the transfer basis Prepaire's legal approver recorded for it. Webhooks carry ids and states, never a result.","contact":{"name":"Prepaire","url":"https://prepaire.com"},"x-data-residency":{"country":"AE","countryName":"United Arab Emirates","laboratory":"IRENA, Masdar City, Abu Dhabi","statement":"VERA holds partner orders, files, results and ledgers in the United Arab Emirates. A result leaves only when an approved partner fetches it with its own credential; for a partner outside the UAE, only under the transfer basis Prepaire's legal approver recorded for it. Webhooks carry ids and states, never a result."}},"servers":[{"url":"https://platform.prepaire.com","description":"The copy's own address and base path."}],"tags":[{"name":"Service"},{"name":"Credentials"},{"name":"Orders"},{"name":"Results"},{"name":"Data"},{"name":"Webhooks and events"},{"name":"Audit"},{"name":"Organ-chip exchange"},{"name":"Send-outs"},{"name":"Registry (Prepaire)"},{"name":"IRENA"}],"paths":{"/api/partner/v1":{"get":{"operationId":"getService","tags":["Service"],"summary":"This copy's access port: its address, mode, residency and endpoints","security":[],"parameters":[],"responses":{"200":{"description":"The service document.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDocument"}}}},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/openapi.json":{"get":{"operationId":"getContract","tags":["Service"],"summary":"This contract, with this copy's own address as its server","security":[],"parameters":[],"responses":{"200":{"description":"OpenAPI 3.1.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/me":{"get":{"operationId":"getMe","tags":["Credentials"],"summary":"The partner and credential the call is made with","security":[{"partnerCredential":[]}],"parameters":[],"responses":{"200":{"description":"The partner, the credential (never the token) and the residency statement.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/credentials/rotate":{"post":{"operationId":"rotateCredential","tags":["Credentials"],"summary":"A new credential with the same scopes; the one calling keeps working for 24 hours","security":[{"partnerCredential":[]}],"parameters":[],"responses":{"201":{"description":"The new token, shown once.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIssued"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/orders":{"get":{"operationId":"listOrders","tags":["Orders"],"summary":"Your orders, newest first","security":[{"partnerCredential":[]}],"x-vera-scope":"orders:read","x-vera-scope-words":"see its orders and their chain of custody","parameters":[],"responses":{"200":{"description":"Orders with their chain of custody.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderList"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"submitOrder","tags":["Orders"],"summary":"Send an order to IRENA: the sample manifest, shipping, consent reference and custody so far","security":[{"partnerCredential":[]}],"x-vera-scope":"orders:write","x-vera-scope-words":"send orders and add custody steps","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Required: 8 to 128 of A-Z a-z 0-9 . _ : -. The same key with the same request returns the first answer; with another request it is refused (409).","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"}}],"requestBody":{"required":true,"description":"Pseudonymous sample and subject references only; GenetiQ Check tests; adults only. A partner outside the UAE names where the samples are shipped from (shipping) and carries each person's consent to their results going outside the UAE (consent.transferOutsideUae).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"The same order again, for a repeated Idempotency-Key.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"201":{"description":"The order, with VERA's reference.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/orders/{orderRef}":{"get":{"operationId":"getOrder","tags":["Orders"],"summary":"An order: its state, samples, verified chain of custody, submissions and results","security":[{"partnerCredential":[]}],"x-vera-scope":"orders:read","x-vera-scope-words":"see its orders and their chain of custody","parameters":[{"name":"orderRef","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The order.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/orders/{orderRef}/custody":{"post":{"operationId":"addCustody","tags":["Orders"],"summary":"Add a custody step (packed, handed to the courier, in transit, customs, delivered)","security":[{"partnerCredential":[]}],"x-vera-scope":"orders:write","x-vera-scope-words":"send orders and add custody steps","parameters":[{"name":"orderRef","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"IRENA records its own receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustodyEvent"}}}},"responses":{"201":{"description":"The order with the step chained to the one before.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/orders/{orderRef}/cancel":{"post":{"operationId":"cancelOrder","tags":["Orders"],"summary":"Cancel an order before IRENA receives it","security":[{"partnerCredential":[]}],"x-vera-scope":"orders:write","x-vera-scope-words":"send orders and add custody steps","parameters":[{"name":"orderRef","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The cancelled order.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/orders/{orderRef}/results":{"get":{"operationId":"getOrderResults","tags":["Results"],"summary":"An order's released results as FHIR R4 (final): nothing of a file before it is released at IRENA","description":"Only released results leave VERA: a file waits until a pathologist or the laboratory director releases it at IRENA, never its sender. A partner outside the UAE reads results only while its transfer basis is current (403 TRANSFER_BASIS_REQUIRED), and an order's only when it carries each person's consent to the transfer (consent.transferOutsideUae; 403 TRANSFER_CONSENT_REQUIRED); each read names the basis in the partner's audit ledger. IRENA's result files are released only while the laboratory's clinical tables (the test catalogue, QC rules, critical values, delta checks and reference intervals) are signed, and each finding of a file the intake held for review has been reviewed. Before release the Bundle holds nothing of the file; the order shows its id, state and finding codes.","security":[{"partnerCredential":[]}],"x-vera-scope":"results:read","x-vera-scope-words":"fetch results as FHIR R4 and HL7","parameters":[{"name":"orderRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Where the page starts, counted in Observations (0 based): the page starts with the report that holds this Observation. Follow link next.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"Observations per page (1 to 5000); a page holds whole reports only, and always one.","schema":{"type":"integer","minimum":1,"maximum":5000,"default":1000}}],"responses":{"200":{"description":"A FHIR R4 Bundle of DiagnosticReport and Observation resources: one DiagnosticReport per released submission, person and sample. Released results are final; a released correction's are corrected, and the results it replaces, or results withdrawn, come back entered-in-error with no value and a note giving the reason and the date.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirBundle"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/orders/{orderRef}/results/hl7":{"get":{"operationId":"getOrderResultsHl7","tags":["Results"],"summary":"An order's released results as an HL7 v2.5.1 ORU^R01 (OBX-11 F): no OBX of a file before it is released","security":[{"partnerCredential":[]}],"x-vera-scope":"results:read","x-vera-scope-words":"fetch results as FHIR R4 and HL7","parameters":[{"name":"orderRef","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"An HL7 v2.5.1 ORU^R01 message (segments end in a carriage return; MSH-18 UNICODE UTF-8): per person a PID, per report an ORC and OBR (placer: your order and the sample; filler: the report's id). A correction goes under the filler number of the report it corrects: OBX-11 C (F for a new test, W with no value for a test it leaves out), OBR-25 C and an NTE after the OBR giving the reason; a withdrawal sends each result of its report as OBX-11 W with no value, OBR-25 C. Match by OBR-3 and OBX-3 (OBX-4 is empty).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/hl7-v2":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/data":{"get":{"operationId":"listSubmissions","tags":["Data"],"summary":"Your data files, newest first","security":[{"partnerCredential":[]}],"x-vera-scope":"data:write","x-vera-scope-words":"send data files into VERA's intake","parameters":[],"responses":{"200":{"description":"Submissions and what VERA's intake decided.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionList"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"submitData","tags":["Data"],"summary":"Send a data file (FASTQ, Olink NPX, HL7 or ASTM) into VERA's intake","description":"The file goes through VERA's own reader for its kind, unchanged: the lane gate for HL7 and ASTM (the lane is read from the content), the Olink importer with the run manifest and specimen records, the sequencing-reads reader for FASTQ (gzipped as base64). A file for an order names its sample (sampleRef), always. A file holding results of tests whose released results for that sample stand is sent as their correction (corrects: the released submission's id; 409 CORRECTS_REQUIRED otherwise): a pathologist or the laboratory director at IRENA then releases it as the correction, with a reason. It must name that sample's person (PID-3) and tube (SPM-2 or OBR-3; an ASTM capture's barcode), and no other: 422 SUBJECT_MISSING or SAMPLE_MISSING when it names none, SUBJECT_MISMATCH or SAMPLE_MISMATCH when it names another; and the order's collection time or none. A file of HL7 holds one message, one person and one tube. Every OBX-11 is F or C; a time without a UTC offset takes MSH-7's and is refused when MSH-7 has none. A file sent as base64 is read as its MSH-18 declares (422 HL7_CHARSET_* otherwise). Each result keeps the flag and range your own laboratory sent (OBX-8, OBX-7), labelled as yours, and no range once VERA converted its unit; a critical flag (HH, LL, AA) holds the file for a reviewer, and the local code CORT is held until its mapping is settled. On Prepaire's copy no result is released while a table VERA reads partner results against is unsigned (TABLES_UNSIGNED). The same bytes, or the same message control id from the same sender, are one submission: the first answer comes back (200). Its results are served once released at IRENA; the event results.available says they wait for release.","security":[{"partnerCredential":[]}],"x-vera-scope":"data:write","x-vera-scope-words":"send data files into VERA's intake","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Required: 8 to 128 of A-Z a-z 0-9 . _ : -. The same key with the same request returns the first answer; with another request it is refused (409).","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"}}],"requestBody":{"required":true,"description":"At most 16 MiB of file (512 KiB on the open copy's sandbox), in a body of at most 4/3 of the file plus 1 MiB (22.4 MiB): send a large file as base64.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSubmission"}}}},"responses":{"200":{"description":"The same file again, for a repeated Idempotency-Key.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"201":{"description":"The submission and the intake's decision.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/data/{submissionId}":{"get":{"operationId":"getSubmission","tags":["Data"],"summary":"A submission: the intake's decision, its findings and counts","security":[{"partnerCredential":[]}],"x-vera-scope":"data:write","x-vera-scope-words":"send data files into VERA's intake","parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The submission.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/data/{submissionId}/results":{"get":{"operationId":"getSubmissionResults","tags":["Results"],"summary":"A submission's released results as FHIR R4 (empty until released)","security":[{"partnerCredential":[]}],"x-vera-scope":"results:read","x-vera-scope-words":"fetch results as FHIR R4 and HL7","parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Where the page starts, counted in Observations (0 based): the page starts with the report that holds this Observation. Follow link next.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"Observations per page (1 to 5000); a page holds whole reports only, and always one.","schema":{"type":"integer","minimum":1,"maximum":5000,"default":1000}}],"responses":{"200":{"description":"A FHIR R4 Bundle of DiagnosticReport and Observation resources: one DiagnosticReport per released submission, person and sample. Released results are final; a released correction's are corrected, and the results it replaces, or results withdrawn, come back entered-in-error with no value and a note giving the reason and the date.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirBundle"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/data/{submissionId}/results/hl7":{"get":{"operationId":"getSubmissionResultsHl7","tags":["Results"],"summary":"A submission's released results as an HL7 v2.5.1 ORU^R01 (no OBX until released)","security":[{"partnerCredential":[]}],"x-vera-scope":"results:read","x-vera-scope-words":"fetch results as FHIR R4 and HL7","parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"An HL7 v2.5.1 ORU^R01 message (segments end in a carriage return; MSH-18 UNICODE UTF-8): per person a PID, per report an ORC and OBR (placer: your order and the sample; filler: the report's id). A correction goes under the filler number of the report it corrects: OBX-11 C (F for a new test, W with no value for a test it leaves out), OBR-25 C and an NTE after the OBR giving the reason; a withdrawal sends each result of its report as OBX-11 W with no value, OBR-25 C. Match by OBR-3 and OBX-3 (OBX-4 is empty).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/hl7-v2":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/webhooks":{"get":{"operationId":"listWebhooks","tags":["Webhooks and events"],"summary":"Your webhooks and their latest deliveries","security":[{"partnerCredential":[]}],"x-vera-scope":"webhooks:manage","x-vera-scope-words":"register and remove webhooks","parameters":[],"responses":{"200":{"description":"Webhooks, each with where VERA's egress policy places its address.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"registerWebhook","tags":["Webhooks and events"],"summary":"Register a webhook; its signing secret is shown once","security":[{"partnerCredential":[]}],"x-vera-scope":"webhooks:manage","x-vera-scope-words":"register and remove webhooks","parameters":[],"requestBody":{"required":true,"description":"An https address on the public internet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRequest"}}}},"responses":{"201":{"description":"The webhook and its secret.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/webhooks/{webhookId}":{"delete":{"operationId":"removeWebhook","tags":["Webhooks and events"],"summary":"Remove a webhook (pending deliveries are held)","security":[{"partnerCredential":[]}],"x-vera-scope":"webhooks:manage","x-vera-scope-words":"register and remove webhooks","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The removed webhook.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/webhooks/{webhookId}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","tags":["Webhooks and events"],"summary":"A new signing secret; for 24 hours deliveries carry a signature for both","security":[{"partnerCredential":[]}],"x-vera-scope":"webhooks:manage","x-vera-scope-words":"register and remove webhooks","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook and its new secret.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/events":{"get":{"operationId":"listEvents","tags":["Webhooks and events"],"summary":"Your event feed: every event, numbered 1, 2, 3 ... without gaps (read with after=<last sequence>)","security":[{"partnerCredential":[]}],"parameters":[{"name":"after","in":"query","required":false,"description":"The last sequence you read.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"Events per page (1 to 500).","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"Events after the given sequence.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Events"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/audit":{"get":{"operationId":"getAudit","tags":["Audit"],"summary":"Your audit ledger: every action on your account, ok or refused, hash-chained and verified","security":[{"partnerCredential":[]}],"x-vera-scope":"audit:read","x-vera-scope-words":"read its own audit ledger","parameters":[{"name":"after","in":"query","required":false,"description":"The last sequence you read.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"Entries per page (1 to 1000).","schema":{"type":"integer","minimum":1,"maximum":1000,"default":200}}],"responses":{"200":{"description":"Entries and the chain's verification.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audit"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/organ-chip/designs":{"get":{"operationId":"listChipDesigns","tags":["Organ-chip exchange"],"summary":"Your chip designs, every version","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:read","x-vera-scope-words":"see its organ-chip designs, runs and reports","parameters":[],"responses":{"200":{"description":"Designs with VERA's checks.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipDesignList"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"submitChipDesign","tags":["Organ-chip exchange"],"summary":"Send a chip design; VERA checks it and computes its flow (a changed design is a new version)","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:write","x-vera-scope-words":"send organ-chip designs, validation runs and readouts","parameters":[],"requestBody":{"required":true,"description":"contracts/prepaire-partner-port-v1/schemas/organ-chip-design.schema.json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipDesign"}}}},"responses":{"200":{"description":"The same design again.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipDesignChecked"}}}},"201":{"description":"The design, its version and VERA's checks.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipDesignChecked"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/organ-chip/designs/{designId}":{"get":{"operationId":"getChipDesign","tags":["Organ-chip exchange"],"summary":"A chip design and VERA's checks","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:read","x-vera-scope-words":"see its organ-chip designs, runs and reports","parameters":[{"name":"designId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The design.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipDesignChecked"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/organ-chip/validation-runs":{"get":{"operationId":"listValidationRuns","tags":["Organ-chip exchange"],"summary":"Your validation runs","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:read","x-vera-scope-words":"see its organ-chip designs, runs and reports","parameters":[],"responses":{"200":{"description":"Runs with their reports.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationRunList"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"planValidationRun","tags":["Organ-chip exchange"],"summary":"Plan a validation run of a design: chips, timepoints, conditions and acceptance criteria","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:write","x-vera-scope-words":"send organ-chip designs, validation runs and readouts","parameters":[],"requestBody":{"required":true,"description":"contracts/prepaire-partner-port-v1/schemas/organ-chip-validation-run.schema.json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationRun"}}}},"responses":{"200":{"description":"The same plan again.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationRunView"}}}},"201":{"description":"The run.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationRunView"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/organ-chip/validation-runs/{runId}":{"get":{"operationId":"getValidationRun","tags":["Organ-chip exchange"],"summary":"A validation run and its latest report","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:read","x-vera-scope-words":"see its organ-chip designs, runs and reports","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The run.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationRunView"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/organ-chip/validation-runs/{runId}/readouts":{"post":{"operationId":"submitReadouts","tags":["Organ-chip exchange"],"summary":"Send readouts; VERA evaluates every criterion again","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:write","x-vera-scope-words":"send organ-chip designs, validation runs and readouts","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"contracts/prepaire-partner-port-v1/schemas/organ-chip-readouts.schema.json; each readout in its one UCUM unit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readouts"}}}},"responses":{"200":{"description":"The same readouts again.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadoutsEvaluated"}}}},"201":{"description":"The run and its report.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadoutsEvaluated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/organ-chip/validation-runs/{runId}/report":{"get":{"operationId":"getValidationReport","tags":["Organ-chip exchange"],"summary":"The validation report: each criterion, its statistic over the chips and whether it passed","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:read","x-vera-scope-words":"see its organ-chip designs, runs and reports","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The report.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationReport"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/organ-chip/fixtures":{"get":{"operationId":"getChipFixtures","tags":["Organ-chip exchange"],"summary":"Synthetic example documents: a design, a validation run and its readouts","security":[{"partnerCredential":[]}],"x-vera-scope":"organ-chip:read","x-vera-scope-words":"see its organ-chip designs, runs and reports","parameters":[{"name":"designId","in":"query","required":false,"description":"Fill the run with this designId.","schema":{"type":"string"}},{"name":"runId","in":"query","required":false,"description":"Fill the readouts with this runId.","schema":{"type":"string"}}],"responses":{"200":{"description":"The three documents.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipFixtures"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/send-outs":{"get":{"operationId":"listSendOutsToPartner","tags":["Send-outs"],"summary":"The send-outs IRENA dispatched to you, newest first: the assay, the manifest, the chain of custody and what came back","description":"A send-out is samples or data IRENA sends you for a test it does not run, or for a research assay. You see it once IRENA dispatched it (handed to the courier, or a compound list made available through the port), never before. The manifest is the one you hold: a research partner receives each sample's codes, specimen, container and collection time, never the person's age, sex or consent record. manifestSha256 is the SHA-256 of exactly that manifest in canonical JSON (object keys sorted, no spaces, UTF-8), so you can check your list against it, and nothing else can be read from it. samples says where each tube stands. Send the results with POST /data and the send-out's sendOutRef, and for specimens the sampleRef of a tube you received and did not refuse (409 SAMPLE_NOT_RECEIVED, SAMPLE_REFUSED), of the tests the send-out names only (assay.loinc): a result of any other test holds the whole file (finding TEST_NOT_ORDERED), so send another test on a send-out of its own.","security":[{"partnerCredential":[]}],"x-vera-scope":"send-outs:read","x-vera-scope-words":"see the send-outs IRENA dispatched to it: the assay, the manifest and the chain of custody","parameters":[],"responses":{"200":{"description":"Send-outs with their verified chain of custody.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutList"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/send-outs/{sendOutRef}":{"get":{"operationId":"getSendOutToPartner","tags":["Send-outs"],"summary":"One send-out: the assay, the manifest and its SHA-256, the shipping, the chain of custody and your files for it","security":[{"partnerCredential":[]}],"x-vera-scope":"send-outs:read","x-vera-scope-words":"see the send-outs IRENA dispatched to it: the assay, the manifest and the chain of custody","parameters":[{"name":"sendOutRef","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The send-out.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOut"}}}},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/partner/v1/send-outs/{sendOutRef}/custody":{"post":{"operationId":"addSendOutCustodyAsPartner","tags":["Send-outs"],"summary":"Record your receipt, analysis or refusal of a send-out (with the reason), or a courier's step","description":"received_at_partner once IRENA dispatched it; in_analysis once received; rejected_at_partner with its reason (note) before its results. Each covers the samples it names (sampleRefs; every sample when you name none): a tube refused leaves the others open, and the send-out is refused once every tube is. A sample is received once (409 ALREADY_RECEIVED) and never after its refusal (409 SAMPLE_REFUSED); one whose results came back is not refused (409 NOT_REFUSABLE). A step is dated in the order the steps happened, up to five minutes before the step before it for two clocks, never before the collection (422 CUSTODY_OUT_OF_ORDER, CUSTODY_BEFORE_COLLECTION). The courier's steps end at a sample's receipt (409 ALREADY_RECEIVED, ALREADY_DELIVERED); customs only for a send-out that leaves the UAE (422 EVENT_NOT_FOR_ROUTE). A temperature outside the shipping condition, or a broken seal, is recorded as you give it, and the sample's results then wait for the reviewer to read it (findings CUSTODY_TEMPERATURE, CUSTODY_SEAL). IRENA records its own packing and hand-over (403 IRENA_RECORDS_DISPATCH). Send its results with POST /data and its sendOutRef, once received.","security":[{"partnerCredential":[]}],"x-vera-scope":"send-outs:write","x-vera-scope-words":"record its receipt, analysis or refusal of a send-out","parameters":[{"name":"sendOutRef","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The step, when and where, by whom (a role or a courier), the temperature and seal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutCustody"}}}},"responses":{"201":{"description":"The send-out with the step chained to the one before.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOut"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/PartnerUnauthorized"},"403":{"$ref":"#/components/responses/PartnerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/PartnerUnavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/partners":{"get":{"operationId":"listPartners","tags":["Registry (Prepaire)"],"summary":"Every partner, its approvals and its credentials (never a token)","security":[{"prepaireSignIn":[]}],"x-vera-roles":["platform_admin"],"parameters":[],"responses":{"200":{"description":"The registry.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registry"}}}},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"proposePartner","tags":["Registry (Prepaire)"],"summary":"Register a partner; it is approved once two different administrators approve it","security":[{"prepaireSignIn":[]}],"x-vera-roles":["platform_admin"],"parameters":[],"requestBody":{"required":true,"description":"The partner and the scopes it may be given.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerProposal"}}}},"responses":{"201":{"description":"The partner, PROPOSED.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Partner"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/partners/{partnerId}/approvals":{"post":{"operationId":"approvePartner","tags":["Registry (Prepaire)"],"summary":"Approve a partner (one of two administrators)","security":[{"prepaireSignIn":[]}],"x-vera-roles":["platform_admin"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApproval"}}}},"responses":{"201":{"description":"The partner, APPROVED after the second approval.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApproved"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/partners/{partnerId}/suspend":{"post":{"operationId":"suspendPartner","tags":["Registry (Prepaire)"],"summary":"Suspend a partner (its credentials stop at once; two fresh approvals reinstate it) or close it","security":[{"prepaireSignIn":[]}],"x-vera-roles":["platform_admin"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Why, and whether for good.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSuspend"}}}},"responses":{"200":{"description":"The partner.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Partner"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/partners/{partnerId}/transfer-bases":{"post":{"operationId":"recordTransferBasis","tags":["Registry (Prepaire)"],"summary":"Record a partner's transfer basis, or withdraw it: results reach a partner outside the UAE only while one is current","description":"Prepaire's legal approver records why results may go to a partner outside the UAE (Federal Law 2/2019 Art. 13): a named case of Ministerial Resolution 51/2021 (kind resolution_51_2021, with caseName) or a DoH authorisation (doh_authorisation), each with its governed reference, a plain statement and an expiry at most three years ahead; domestic_ae for a partner in the UAE; withdrawn ends the basis. Never edited: a later record replaces an earlier one. Without a current basis such a partner is not approved (409 TRANSFER_BASIS_REQUIRED) and reads no results (403 TRANSFER_BASIS_REQUIRED).","security":[{"prepaireSignIn":[]}],"x-vera-roles":["legal_approver"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"kind, reference, statement, validUntil (a date); caseName for a Resolution 51/2021 case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferBasisRequest"}}}},"responses":{"201":{"description":"The partner and the basis recorded.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferBasisRecorded"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/partners/{partnerId}/credentials":{"post":{"operationId":"issueCredential","tags":["Registry (Prepaire)"],"summary":"Issue a credential: scoped, expiring, shown once","security":[{"prepaireSignIn":[]}],"x-vera-roles":["platform_admin"],"parameters":[{"name":"partnerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Scopes within the partner's, at most 365 days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIssue"}}}},"responses":{"201":{"description":"The credential and its token, shown once.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIssued"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/credentials/{credentialId}/rotate":{"post":{"operationId":"rotatePartnerCredential","tags":["Registry (Prepaire)"],"summary":"Rotate a partner's credential","security":[{"prepaireSignIn":[]}],"x-vera-roles":["platform_admin"],"parameters":[{"name":"credentialId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The new token, shown once.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialIssued"}}}},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/credentials/{credentialId}/revoke":{"post":{"operationId":"revokeCredential","tags":["Registry (Prepaire)"],"summary":"Revoke a credential at once","security":[{"prepaireSignIn":[]}],"x-vera-roles":["platform_admin"],"parameters":[{"name":"credentialId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRevoke"}}}},"responses":{"200":{"description":"The credential.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credential"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/orders/{orderRef}/custody":{"post":{"operationId":"recordReceipt","tags":["IRENA"],"summary":"IRENA records a custody step, its receipt of the samples or their refusal","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer"],"parameters":[{"name":"orderRef","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"received_at_irena or rejected_at_irena, among others.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustodyEvent"}}}},"responses":{"201":{"description":"The order.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/orders/{orderRef}/results":{"post":{"operationId":"submitIrenaResults","tags":["IRENA"],"summary":"IRENA sends KERNEL's HL7 result message of an order's sample, read through the test catalogue's code map","description":"KERNEL's test codes become catalogue markers with LOINC and UCUM; only final (F) or corrected (C) results are read; the file is quarantined while the catalogue is unsigned, and when it names another collection time. It must name the order sample's person (PID-3) and tube (SPM-2 or OBR-3): 422 SUBJECT_MISSING, SAMPLE_MISSING, SUBJECT_MISMATCH or SAMPLE_MISMATCH otherwise. Each result carries the interval and the L, N or H flag the laboratory director's signed interval table gives the sample's person (the order's administrative sex and age), never KERNEL's; a marker the table cannot assign holds the file, and a value at a signed critical limit holds it until the releaser records the call. An analyser's ASTM capture is refused here. The same file, or the same message control id, is one submission (200). A file correcting IRENA's released result file of the sample names it (corrects; 409 CORRECTS_REQUIRED when it holds results of the same tests and names none).","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer"],"parameters":[{"name":"orderRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional: 8 to 128 of A-Z a-z 0-9 . _ : -.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"}}],"requestBody":{"required":true,"description":"KERNEL's HL7 v2 result message (kind hl7).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IrenaResult"}}}},"responses":{"200":{"description":"The same file again: the first submission.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"201":{"description":"The submission: its results wait for release, or the intake held them.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/submissions/{submissionId}/release":{"post":{"operationId":"releaseResults","tags":["IRENA"],"summary":"Release a submission's results (never by the one who sent them), with a review of each of its findings","description":"On Prepaire's operational copy every release passes the release gates of the clinical release route, through the same function: only a numbered VERA release the laboratory director's table of validated releases lists (409 VERA_BUILD_NOT_VALIDATED), only from a copy whose VERA is in a validation scope the laboratory director approved and has not withdrawn (409 VALIDATION_SCOPE_NOT_APPROVED or VALIDATION_SCOPE_MISMATCH, each difference named), and only while every table a clinical result is read against is signed in VERA by the laboratory director, and the quality manager where both sign it (409 TABLES_NOT_ATTESTED names each table and who has not signed it). IRENA's result file is released only while the test catalogue, QC rules, critical values, delta checks and reference intervals are signed (409 CLINICAL_TABLES_UNSIGNED names those that are not), with the catalogue it was read with (409 CATALOG_CHANGED), and never beside released results of the same tests for the same sample (409 SAMPLE_ALREADY_RESULTED). A file the intake held for review needs one review per finding, in the order the submission lists them (422 FINDINGS_NOT_REVIEWED). A file sent as the correction of released results is released with that correction (409 RELEASE_AS_CORRECTION: POST .../amend).","security":[{"prepaireSignIn":[]}],"x-vera-roles":["pathologist","lab_director"],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"confirm: true, and findingReviews: one { code, note } per finding.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseRequest"}}}},"responses":{"200":{"description":"The submission, released: its results are final and the partner receives them.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/submissions/{submissionId}/refuse":{"post":{"operationId":"refuseResults","tags":["IRENA"],"summary":"Refuse a submission's results that wait for release, with a reason (never by the one who sent them): they are never released","description":"The partner's event results.refused carries ids and states only, never a value or the reason. An order none of whose files waits for release or is released goes back to RECEIVED.","security":[{"prepaireSignIn":[]}],"x-vera-roles":["pathologist","lab_director"],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"reason: 3 to 500 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefusalRequest"}}}},"responses":{"200":{"description":"The submission, not releasable, with its refusal.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Submission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/submissions/{submissionId}/amend":{"post":{"operationId":"amendResults","tags":["IRENA"],"summary":"Correct released results with their replacement, or withdraw them as entered in error, with a reason: nothing released is edited","description":"kind corrected names the replacement: the file sent with corrects naming these results (422 NOT_A_CORRECTION otherwise). It is released here with the checks of any release (the release gates of the clinical release route on Prepaire's operational copy: 409 VERA_BUILD_NOT_VALIDATED, VALIDATION_SCOPE_NOT_APPROVED, VALIDATION_SCOPE_MISMATCH, TABLES_NOT_ATTESTED; for IRENA's file the signed clinical tables; one review per finding), never by its sender (403 RELEASE_SEPARATION_REQUIRED); a file sent as a correction is released only this way (409 RELEASE_AS_CORRECTION on the release route). kind entered_in_error withdraws the results with nothing in their place. A submission is amended once (409 ALREADY_AMENDED). The results routes then serve the earlier results as entered-in-error and the replacement as corrected, each with the reason; the partner's event results.corrected or results.withdrawn carries ids and states only, never a value or the reason.","security":[{"prepaireSignIn":[]}],"x-vera-roles":["pathologist","lab_director"],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"kind, reason (3 to 500 characters); for a correction replacementSubmissionId and one finding review per finding of the replacement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmendRequest"}}}},"responses":{"200":{"description":"The amended submission and its released replacement (null for a withdrawal).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Amendment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/send-outs":{"get":{"operationId":"listSendOuts","tags":["IRENA"],"summary":"IRENA's send-outs to partner laboratories, newest first: what went out, where it is and what came back","description":"Values appear once released. A pathologist or the laboratory director also sees the values that wait for their release, and the intake's words about them; IRENA's other staff see a waiting or held file of a person's results as its id, kind, decision and finding codes only (withheld true), since a finding's words can quote a value.","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer","pathologist"],"parameters":[],"responses":{"200":{"description":"The send-out ledger.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutList"}}}},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createSendOut","tags":["IRENA"],"summary":"Record a send-out: the partner and assay of the send-out catalogue, the coded samples or compound list, shipping, consent","description":"The partner is in config/partners/send-outs.v1.json, registered and approved on the access port and allowed send-outs:read; the assay is orderable here (a test that comes back as HL7 or ASTM names LOINC codes the laboratory gate reads). A coded specimen that leaves the UAE needs each person's consent to that (consent.transferOutsideUae), the founder's signed transfer basis, and the partner's own transfer basis that Prepaire's legal approver recorded for it, current now (409 TRANSFER_BASIS_REQUIRED otherwise, the reason in words, and recorded in the partner's audit ledger); specimens for a research assay need each person's consent to the research use (consent.researchUse); either names each person's own consent record on the sample (consentRef: one person's only, kept at IRENA, never sent to the partner). Every sign-off the send-out needs is signed (409 SIGNOFF_PENDING otherwise, naming it). Every text the partner receives (irenaRef, the consent reference, the compounds, the container, the courier) is refused when it holds an Emirates ID, a phone number or an e-mail address (422 VALIDATION_FAILED). It is recorded CREATED: the partner sees it once IRENA dispatches it.","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional: 8 to 128 of A-Z a-z 0-9 . _ : -.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"}}],"requestBody":{"required":true,"description":"Samples (coded, adults only) or compounds (names, InChIKeys, SMILES): one of them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutRequest"}}}},"responses":{"200":{"description":"The same send-out again, for a repeated Idempotency-Key.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOut"}}}},"201":{"description":"The send-out, CREATED.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOut"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/send-outs/{sendOutRef}":{"get":{"operationId":"getSendOut","tags":["IRENA"],"summary":"One send-out, with the sign-offs it went out on","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer","pathologist"],"parameters":[{"name":"sendOutRef","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The send-out.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOut"}}}},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/send-outs/{sendOutRef}/custody":{"post":{"operationId":"addSendOutCustody","tags":["IRENA"],"summary":"IRENA records a custody step: packed, handed to the courier, a compound list released through the port, a courier's step","description":"A send-out leaves IRENA whole: the hand-over covers every sample (422 HANDOVER_INCOMPLETE). A coded specimen for a partner outside the UAE is handed to the courier only while the partner's recorded transfer basis is still current (409 TRANSFER_BASIS_REQUIRED). Steps are dated in the order they happened, never before the collection; customs only for a send-out that leaves the UAE; the courier's steps end at a sample's receipt (the same refusals as the partner's custody route).","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer"],"parameters":[{"name":"sendOutRef","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The partner records its own receipt, analysis or refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutCustody"}}}},"responses":{"201":{"description":"The send-out.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOut"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/send-outs/{sendOutRef}/cancel":{"post":{"operationId":"cancelSendOut","tags":["IRENA"],"summary":"Cancel a send-out before the partner laboratory receives it, with the reason","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer"],"parameters":[{"name":"sendOutRef","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"description":"reason: 3 to 300 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutCancel"}}}},"responses":{"200":{"description":"The send-out, CANCELLED.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOut"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/send-outs/{sendOutRef}/results":{"get":{"operationId":"getSendOutResults","tags":["IRENA"],"summary":"A clinical send-out's released results as FHIR R4, for IRENA's own systems (the partner laboratory as performer)","description":"Released results only, all final: nothing of a file before a pathologist or the laboratory director releases it, and only of the tests the send-out was for (a file with another test is held whole). Each Observation and DiagnosticReport is basedOn the send-out (identifier system urn:prepaire:vera:partner-port:send-out) and IRENA's own reference of it (urn:prepaire:vera:partner-port:irena:referral). A research send-out's results are research use only and never go into a clinical record (409 RESEARCH_USE_ONLY).","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lab_scientist","instrument_operator","lab_director","qa_officer","pathologist"],"parameters":[{"name":"sendOutRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Where the page starts, counted in Observations (0 based): the page starts with the report that holds this Observation. Follow link next.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"Observations per page (1 to 5000); a page holds whole reports only, and always one.","schema":{"type":"integer","minimum":1,"maximum":5000,"default":1000}}],"responses":{"200":{"description":"A FHIR R4 Bundle of DiagnosticReport and Observation resources: one DiagnosticReport per released submission, person and sample. Released results are final; a released correction's are corrected, and the results it replaces, or results withdrawn, come back entered-in-error with no value and a note giving the reason and the date.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/FhirBundle"}}}},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/partner-registry/webhooks/deliver":{"post":{"operationId":"deliverWebhooks","tags":["Registry (Prepaire)"],"summary":"The worker's pass: send due webhook deliveries the egress policy allows","security":[{"prepaireSignIn":[]}],"x-vera-roles":["lims_service","platform_admin"],"parameters":[],"responses":{"200":{"description":"What the pass did.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryPass"}}}},"401":{"$ref":"#/components/responses/StaffUnauthorized"},"403":{"$ref":"#/components/responses/StaffForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"},"default":{"$ref":"#/components/responses/InternalError"}}}}},"components":{"securitySchemes":{"partnerCredential":{"type":"http","scheme":"bearer","bearerFormat":"vpp_<live|test>_<credential id>_<secret>","description":"A partner credential."},"prepaireSignIn":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A signed-in Prepaire account (OIDC), with the role each operation names."}},"headers":{"RateLimitLimit":{"description":"Calls allowed per minute for this credential.","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Calls left in the window.","schema":{"type":"integer"}},"RateLimitReset":{"description":"Seconds until the window frees a call.","schema":{"type":"integer"}},"RetryAfter":{"description":"Seconds to wait before calling again.","schema":{"type":"integer"}},"DataResidency":{"description":"Where VERA holds the data: AE (the United Arab Emirates).","schema":{"const":"AE"}},"RequestId":{"description":"The request's id: quote it to Prepaire.","schema":{"type":"string"}},"WwwAuthenticate":{"description":"Bearer realm=\"VERA partner port\".","schema":{"type":"string"}}},"responses":{"PartnerUnauthorized":{"description":"No credential, or one VERA does not accept (unknown, expired, revoked, or for another copy).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WwwAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PartnerForbidden":{"description":"The credential lacks the scope, or the partner is not approved.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not yours, or not there.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"VERA's rules refuse it in this state.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"It does not meet the contract or VERA's rules.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limited.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"StaffUnauthorized":{"description":"Not signed in.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"StaffForbidden":{"description":"A role this needs is missing.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"This copy has no database (PARTNER_REGISTRY_UNAVAILABLE), its access port is switched off (PARTNER_PORT_OFF), or it is reading as many large files as it takes at once (PARTNER_PORT_BUSY, with Retry-After).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PartnerUnavailable":{"description":"This copy's access port is switched off (PARTNER_PORT_OFF), the copy has neither a database nor a session ledger (PARTNER_PORT_UNAVAILABLE), or it is reading as many large files as it takes at once (PARTNER_PORT_BUSY, with Retry-After).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"No body, a body that is not JSON (INVALID_JSON), or a missing Idempotency-Key (IDEMPOTENCY_KEY_REQUIRED).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"The request (BODY_TOO_LARGE: by its Content-Length before it is read, or as read) or the file (FILE_TOO_LARGE) is larger than VERA takes here.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnsupportedMediaType":{"description":"The body is not sent as application/json (JSON_CONTENT_TYPE_REQUIRED).","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"VERA could not answer just now (INTERNAL_ERROR): try again, quoting the request id.","headers":{"X-Data-Residency":{"$ref":"#/components/headers/DataResidency"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"A refusal, in words.","properties":{"error":{"type":"object","description":"","properties":{"code":{"type":"string","description":"A stable code, such as SCOPE_REQUIRED."},"message":{"type":"string","description":"One plain sentence."},"requestId":{"type":"string","description":"Quote it to Prepaire."},"detail":{"description":"More, where it helps (the problems found, the existing reference)."}},"required":["code","message","requestId"],"additionalProperties":true}},"required":["error"],"additionalProperties":true},"ServiceDocument":{"type":"object","description":"This copy's access port.","properties":{"service":{"type":"string","description":""},"contract":{"const":"PREPAIRE-VERA-PARTNER-PORT@1.1.0"},"mode":{"enum":["live","off","sandbox","unavailable"],"description":"live: approved partners call with live credentials; off: a copy with Prepaire's database whose port is switched off (every call answers 503); sandbox: the open copy; unavailable: neither."},"modeWords":{"type":"string","description":""},"baseUrl":{"type":"string","description":"This copy's own address and base path, then /api/partner/v1.","format":"uri"},"openapi":{"type":"string","description":"","format":"uri"},"portal":{"type":"string","description":"","format":"uri"},"authentication":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true},"residency":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true},"rateLimits":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true},"webhooks":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true},"endpoints":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}}},"required":["contract","mode","baseUrl"],"additionalProperties":true},"OpenApiDocument":{"type":"object","description":"OpenAPI 3.1.","properties":{"openapi":{"const":"3.1.0"}},"required":[],"additionalProperties":true},"Partner":{"type":"object","description":"A partner.","properties":{"partnerId":{"type":"string","description":""},"name":{"type":"string","description":""},"kind":{"enum":["laboratory","data_partner","organ_chip"]},"country":{"type":"string","description":""},"state":{"enum":["PROPOSED","APPROVED","SUSPENDED","CLOSED"]},"approvalRound":{"type":"integer"},"approvalsNeeded":{"type":"integer"},"approvals":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}},"allowedScopes":{"type":"array","items":{"enum":["orders:read","orders:write","data:write","results:read","webhooks:manage","audit:read","organ-chip:read","organ-chip:write","send-outs:read","send-outs:write"]}},"residency":{"const":"AE"},"sandbox":{"type":"boolean"},"transferBasisRequired":{"type":"boolean","description":"A partner outside the UAE: results reach it only under a current transfer basis."},"transferBasis":{"oneOf":[{"$ref":"#/components/schemas/TransferBasis"},{"type":"null"}],"description":"Its latest transfer basis, current or not."}},"required":["partnerId","state"],"additionalProperties":true},"TransferBasis":{"type":"object","description":"Why results may go to a partner outside the UAE, as Prepaire's legal approver recorded it.","properties":{"basisId":{"type":"string","description":"","pattern":"^PPT-\\d{14}-[A-F0-9]{8}$"},"kind":{"enum":["domestic_ae","resolution_51_2021","doh_authorisation","withdrawn"]},"words":{"type":"string","description":""},"reference":{"type":"string","description":""},"caseName":{"type":["string","null"]},"statement":{"type":"string","description":""},"validUntil":{"type":["string","null"],"format":"date-time"},"recordedAt":{"type":"string","description":"","format":"date-time"},"signedOffBy":{"type":"string","description":""},"current":{"type":"boolean"}},"required":["basisId","kind","current"],"additionalProperties":true},"TransferBasisRecorded":{"type":"object","description":"","properties":{"partner":{"$ref":"#/components/schemas/Partner"},"transferBasis":{"$ref":"#/components/schemas/TransferBasis"}},"required":["partner","transferBasis"],"additionalProperties":true},"PartnerApproved":{"type":"object","description":"","properties":{"partner":{"$ref":"#/components/schemas/Partner"},"approved":{"type":"boolean"}},"required":["partner","approved"],"additionalProperties":true},"Credential":{"type":"object","description":"A credential: never its token.","properties":{"credentialId":{"type":"string","description":"","pattern":"^ppc_[a-f0-9]{16}$"},"label":{"type":"string","description":""},"environment":{"enum":["live","test"]},"scopes":{"type":"array","items":{"enum":["orders:read","orders:write","data:write","results:read","webhooks:manage","audit:read","organ-chip:read","organ-chip:write","send-outs:read","send-outs:write"]}},"status":{"enum":["active","expired","revoked"]},"issuedAt":{"type":"string","description":"","format":"date-time"},"expiresAt":{"type":"string","description":"","format":"date-time"},"hint":{"type":"string","description":"vpp_<environment>_<id>_…"}},"required":["credentialId","status","expiresAt"],"additionalProperties":true},"CredentialIssued":{"type":"object","description":"A new credential and its token. VERA keeps only the token's SHA-256: store the token now.","properties":{"credential":{"$ref":"#/components/schemas/Credential"},"token":{"type":"string","description":"vpp_<live|test>_<16 hex>_<43 base64url>.","pattern":"^vpp_(live|test)_[a-f0-9]{16}_[A-Za-z0-9_-]{43}$"},"previous":{"$ref":"#/components/schemas/Credential"}},"required":["credential","token"],"additionalProperties":true},"Me":{"type":"object","description":"","properties":{"partner":{"$ref":"#/components/schemas/Partner"},"credential":{"$ref":"#/components/schemas/Credential"},"residency":{"type":"object","description":"","properties":{"country":{"const":"AE"},"statement":{"type":"string","description":""}},"required":[],"additionalProperties":true}},"required":["partner","credential","residency"],"additionalProperties":true},"Registry":{"type":"object","description":"","properties":{"partners":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Partner"},{"type":"object","description":"","properties":{"credentials":{"type":"array","items":{"$ref":"#/components/schemas/Credential"}}},"required":[],"additionalProperties":true}]}}},"required":["partners"],"additionalProperties":true},"Order":{"type":"object","description":"An order to IRENA.","properties":{"orderRef":{"type":"string","description":"","pattern":"^PPO-\\d{14}-[A-F0-9]{8}$"},"partnerOrderRef":{"type":"string","description":""},"state":{"enum":["SUBMITTED","SHIPPED","RECEIVED","IN_ANALYSIS","RESULTED","REJECTED","CANCELLED"]},"stateWords":{"type":"string","description":""},"destination":{"type":"object","description":"IRENA, Masdar City, Abu Dhabi.","properties":{},"required":[],"additionalProperties":true},"samples":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}},"custody":{"type":"array","items":{"type":"object","description":"A custody step and its hash.","properties":{},"required":[],"additionalProperties":true}},"custodyChain":{"type":"object","description":"","properties":{"verified":{"type":"boolean"},"steps":{"type":"integer"},"head":{"type":["string","null"],"description":"The last step's hash; null before the first step."}},"required":[],"additionalProperties":true},"submissions":{"type":"array","items":{"type":"object","description":"A file of the order: an IRENA file shows its id, state and finding codes until released (withheld true).","properties":{},"required":[],"additionalProperties":true}},"results":{"type":"object","description":"","properties":{"final":{"type":"integer","description":"Files whose released results stand (final, or a released correction): what the results routes serve as current."},"amended":{"type":"integer","description":"Released files corrected or withdrawn since: served as entered-in-error, with the reason."},"awaitingRelease":{"type":"integer","description":"Files whose results wait for release: nothing of them is served."},"fhir":{"type":"string","description":""},"hl7":{"type":"string","description":""}},"required":[],"additionalProperties":true},"residency":{"const":"AE"}},"required":["orderRef","state","custodyChain"],"additionalProperties":true},"OrderList":{"type":"object","description":"","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["orders"],"additionalProperties":true},"Submission":{"type":"object","description":"A file and what VERA's intake decided. An IRENA result file shows its partner only its ids, state and finding codes until its results are released (withheld true): no file name, checksum, summary, count, finding words or values.","properties":{"submissionId":{"type":"string","description":"","pattern":"^PPS-\\d{14}-[A-F0-9]{8}$"},"kind":{"enum":["fastq","olink_npx","hl7","astm","adme"]},"source":{"enum":["partner","irena"]},"sendOutRef":{"type":["string","null"],"description":"The send-out these are the results of (PSO-...): a partner laboratory's file for what IRENA sent it."},"decision":{"enum":["ready","review","quarantine","accepted"]},"releaseState":{"enum":["awaiting_release","released","not_releasable","not_applicable"]},"withheld":{"const":true},"withheldWords":{"type":"string","description":""},"sha256":{"type":"string","description":""},"findings":{"type":"array","items":{"type":"object","description":"","properties":{"code":{"type":"string","description":""},"severity":{"type":"string","description":""},"message":{"type":"string","description":"Left out while withheld."}},"required":["code","severity"],"additionalProperties":true}},"observationCount":{"type":"integer"},"results":{"type":["object","null"],"description":"Where its released results are; null until released."},"refusal":{"type":["object","null"],"description":"Why its results were refused, and when."},"corrects":{"type":["string","null"],"description":"The released submission this file was sent to correct."},"amendment":{"type":["object","null"],"description":"Its correction or withdrawal once recorded: kind (corrected or entered_in_error), words, reason, decidedAt, replacementSubmissionId; null while it stands.","properties":{"amendmentId":{"type":"string","description":"","pattern":"^PPA-\\d{14}-[A-F0-9]{8}$"},"kind":{"enum":["corrected","entered_in_error"]},"words":{"type":"string","description":""},"reason":{"type":"string","description":""},"decidedAt":{"type":"string","description":"","format":"date-time"},"replacementSubmissionId":{"type":["string","null"]}}}},"required":["submissionId","decision","releaseState","findings"],"additionalProperties":true},"Amendment":{"type":"object","description":"A correction or withdrawal of released results.","properties":{"superseded":{"$ref":"#/components/schemas/Submission"},"replacement":{"oneOf":[{"$ref":"#/components/schemas/Submission"},{"type":"null"}]}},"required":["superseded","replacement"],"additionalProperties":true},"SubmissionList":{"type":"object","description":"","properties":{"submissions":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}}},"required":["submissions"],"additionalProperties":true},"FhirBundle":{"type":"object","description":"A FHIR R4 (4.0.1) Bundle, type collection: one DiagnosticReport per released submission, person and sample (with its subject and specimen) and an Observation per result, final; a released correction's corrected, and results it replaces or results withdrawn entered-in-error, with the reason in a note. Pages hold whole reports: a report's id is never on two pages. Subjects and specimens are your own pseudonymous references.","properties":{"resourceType":{"const":"Bundle"},"type":{"const":"collection"},"link":{"type":"array","items":{"type":"object","description":"","properties":{"relation":{"type":"string","description":""},"url":{"type":"string","description":""}},"required":[],"additionalProperties":true}},"entry":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}}},"required":["resourceType","type","entry"],"additionalProperties":true},"Webhook":{"type":"object","description":"","properties":{"webhookId":{"type":"string","description":"","pattern":"^ppw_[a-f0-9]{16}$"},"url":{"type":"string","description":"","format":"uri"},"events":{"type":"array","items":{"enum":["order.received","order.custody","order.state_changed","data.received","results.available","results.released","results.refused","results.corrected","results.withdrawn","credential.rotated","organ_chip.design.checked","organ_chip.run.evaluated","send_out.dispatched","send_out.custody","send_out.state_changed"]}},"secretVersion":{"type":"integer"},"destination":{"type":"object","description":"Where VERA's egress policy places the address.","properties":{"class":{"type":"string","description":""},"deliverable":{"type":"boolean"},"words":{"type":"string","description":""}},"required":[],"additionalProperties":true}},"required":["webhookId","url","destination"],"additionalProperties":true},"WebhookCreated":{"type":"object","description":"","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"whsec_…: shown once."}},"required":["webhook","secret"],"additionalProperties":true},"WebhookList":{"type":"object","description":"","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"deliveries":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}}},"required":["webhooks"],"additionalProperties":true},"Events":{"type":"object","description":"","properties":{"events":{"type":"array","items":{"type":"object","description":"","properties":{"sequence":{"type":"integer"},"event":{"type":"object","description":"The body a webhook receives.","properties":{},"required":[],"additionalProperties":true},"bodySha256":{"type":"string","description":""}},"required":[],"additionalProperties":true}},"next":{"type":"integer"}},"required":["events","next"],"additionalProperties":true},"Audit":{"type":"object","description":"","properties":{"entries":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}},"chain":{"type":"object","description":"","properties":{"verified":{"type":"boolean"},"entries":{"type":"integer"},"head":{"type":["string","null"],"description":"The last entry's hash; null before the first entry."}},"required":[],"additionalProperties":true}},"required":["entries","chain"],"additionalProperties":true},"ChipDesignChecked":{"type":"object","description":"","properties":{"design":{"type":"object","description":"","properties":{"designId":{"type":"string","description":""},"version":{"type":"integer"},"outcome":{"enum":["pass","warn","fail"]},"checks":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}}},"required":[],"additionalProperties":true}},"required":["design"],"additionalProperties":true},"ChipDesignList":{"type":"object","description":"","properties":{"designs":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}}},"required":["designs"],"additionalProperties":true},"ValidationRunView":{"type":"object","description":"","properties":{"run":{"type":"object","description":"","properties":{"runId":{"type":"string","description":""},"state":{"enum":["PLANNED","READOUTS_PARTIAL","EVALUATED"]},"report":{"description":"The latest report."}},"required":[],"additionalProperties":true}},"required":["run"],"additionalProperties":true},"ValidationRunList":{"type":"object","description":"","properties":{"runs":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}}},"required":["runs"],"additionalProperties":true},"ValidationReport":{"type":"object","description":"","properties":{"contract":{"const":"PREPAIRE-ORGAN-CHIP-VALIDATION-REPORT@1.0.0"},"verdict":{"enum":["passed","failed","incomplete"]},"criteria":{"type":"array","items":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}},"summary":{"type":"string","description":""}},"required":["verdict","criteria"],"additionalProperties":true},"ReadoutsEvaluated":{"type":"object","description":"","properties":{"run":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true},"report":{"$ref":"#/components/schemas/ValidationReport"}},"required":["run","report"],"additionalProperties":true},"ChipFixtures":{"type":"object","description":"Synthetic documents for trying the exchange.","properties":{"design":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true},"validationRun":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true},"readouts":{"type":"object","description":"","properties":{},"required":[],"additionalProperties":true}},"required":["design","validationRun","readouts"],"additionalProperties":true},"DeliveryPass":{"type":"object","description":"","properties":{"requeued":{"type":"integer"},"attempted":{"type":"integer"},"delivered":{"type":"integer"},"retrying":{"type":"integer"},"held":{"type":"integer"},"failed":{"type":"integer"}},"required":[],"additionalProperties":true},"SendOut":{"type":"object","description":"A send-out: samples or data IRENA sent a partner laboratory, where it is, and what came back.","properties":{"sendOutRef":{"type":"string","description":"","pattern":"^PSO-\\d{14}-[A-F0-9]{8}$"},"irenaRef":{"type":"string","description":"IRENA's own reference: the referral number, or the statement of work."},"partner":{"type":"object","description":"","properties":{"partnerId":{"type":"string","description":""},"name":{"type":"string","description":""},"country":{"type":"string","description":""}},"required":[],"additionalProperties":true},"assay":{"type":"object","description":"The assay as the catalogue listed it when the send-out was made.","properties":{"loinc":{"type":"array","items":{"type":"string","description":""},"description":"The LOINC codes its results may carry: a result of any other test holds the file."}},"required":[],"additionalProperties":true},"purpose":{"enum":["clinical","research"]},"material":{"enum":["specimen","compound_list"]},"state":{"enum":["CREATED","DISPATCHED","RECEIVED","IN_ANALYSIS","RESULTS_IN_REVIEW","RESULTED","REJECTED","CANCELLED"]},"stateWords":{"type":"string","description":""},"where":{"type":["object","null"],"description":"The last custody step: in words, when and where."},"manifest":{"type":"object","description":"Coded samples, or a compound list that names no person: on the partner's view, the manifest as the partner receives it (a research partner never a person's age, sex or consent record).","properties":{},"required":[],"additionalProperties":true},"manifestSha256":{"type":"string","description":"SHA-256 of the manifest as the partner receives it, in canonical JSON (object keys sorted, no spaces, UTF-8): recompute it over the manifest you read."},"samples":{"type":"array","items":{"type":"object","description":"A tube of a send-out of specimens: where it stands, its receipt, and its refusal with the reason.","properties":{"sampleRef":{"type":"string","description":""},"words":{"type":"string","description":""},"receivedAt":{"type":["string","null"]},"refused":{"type":["object","null"]}},"required":[],"additionalProperties":true}},"consent":{"type":"object","description":"","properties":{"reference":{"type":"string","description":""},"researchUse":{"type":"boolean"},"transferOutsideUae":{"type":"boolean"}},"required":[],"additionalProperties":true},"custody":{"type":"array","items":{"type":"object","description":"A custody step and its hash.","properties":{"event":{"enum":["packed","handed_to_carrier","data_released","in_transit","customs_cleared","delivered","received_at_partner","in_analysis","rejected_at_partner"]},"excursion":{"type":["string","null"],"description":"A temperature outside the shipping condition, or a broken seal, in words; null when nothing is amiss."}},"required":[],"additionalProperties":true}},"custodyChain":{"type":"object","description":"","properties":{"verified":{"type":"boolean"},"steps":{"type":"integer"},"head":{"type":["string","null"],"description":"The last step's hash; null before the first step."}},"required":[],"additionalProperties":true},"files":{"type":"array","items":{"$ref":"#/components/schemas/Submission"},"description":"The files the partner sent back for it. On IRENA's views, a person's results that are not released show staff other than the reviewer the file's ids, decision and finding codes only (withheld true)."},"results":{"type":"object","description":"Counts of the files released, waiting and kept as research evidence; the released values (and, for a reviewer, those waiting).","properties":{},"required":[],"additionalProperties":true},"researchOnly":{"type":"boolean","description":"A research send-out: its results never reach a person's clinical record."},"residency":{"const":"AE"}},"required":["sendOutRef","state","custodyChain"],"additionalProperties":true},"SendOutList":{"type":"object","description":"","properties":{"sendOuts":{"type":"array","items":{"$ref":"#/components/schemas/SendOut"}}},"required":["sendOuts"],"additionalProperties":true},"OrderRequest":{"type":"object","properties":{"partnerOrderRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"samples":{"minItems":1,"maxItems":96,"type":"array","items":{"type":"object","properties":{"sampleRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"},"subjectRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"},"specimenType":{"type":"string","enum":["serum","plasma_edta","whole_blood_edta","urine","stool","capillary_blood","dna_extract"]},"container":{"type":"string","minLength":2,"maxLength":120},"collectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"volumeMl":{"type":"number","exclusiveMinimum":0,"maximum":100},"tests":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","pattern":"^(GQC-\\d{3}|PPR-(ADD|CHK)-\\d{4})$"}},"administrativeSex":{"type":"string","enum":["female","male","other","unknown"]},"ageYears":{"type":"number","minimum":18,"maximum":120}},"required":["sampleRef","subjectRef","specimenType","container","collectedAt","tests","ageYears"],"additionalProperties":false}},"shipping":{"type":"object","properties":{"carrier":{"type":"string","minLength":2,"maxLength":80},"trackingNumber":{"type":"string","pattern":"^[A-Za-z0-9-]{4,40}$"},"temperature":{"type":"string","enum":["ambient","refrigerated_2_8","frozen_minus_20","frozen_minus_80","dry_ice","liquid_nitrogen"]},"shipFrom":{"type":"object","properties":{"organisation":{"type":"string","minLength":2,"maxLength":120},"city":{"type":"string","minLength":2,"maxLength":80},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["organisation","city","country"],"additionalProperties":false},"expectedArrival":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"packages":{"default":1,"type":"integer","minimum":1,"maximum":20}},"required":["carrier","temperature","shipFrom"],"additionalProperties":false},"consent":{"type":"object","properties":{"reference":{"type":"string","pattern":"^[A-Za-z0-9._:/-]{3,100}$"},"analysisAtIrena":{"type":"boolean","const":true},"resultsReturnedToPartner":{"type":"boolean","const":true},"transferOutsideUae":{"type":"boolean","const":true}},"required":["reference","analysisAtIrena","resultsReturnedToPartner"],"additionalProperties":false},"custody":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"event":{"type":"string","enum":["packed","handed_to_carrier","in_transit","customs_cleared","delivered","received_at_irena","rejected_at_irena"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"location":{"type":"string","minLength":2,"maxLength":200},"handledBy":{"type":"string","minLength":2,"maxLength":200},"temperatureC":{"type":"number","minimum":-200,"maximum":60},"sealIntact":{"type":"boolean"},"note":{"type":"string","maxLength":500},"sampleRefs":{"minItems":1,"maxItems":96,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"}}},"required":["event","at","location","handledBy"],"additionalProperties":false}}},"required":["partnerOrderRef","samples","consent"],"additionalProperties":false},"CustodyEvent":{"type":"object","properties":{"event":{"type":"string","enum":["packed","handed_to_carrier","in_transit","customs_cleared","delivered","received_at_irena","rejected_at_irena"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"location":{"type":"string","minLength":2,"maxLength":200},"handledBy":{"type":"string","minLength":2,"maxLength":200},"temperatureC":{"type":"number","minimum":-200,"maximum":60},"sealIntact":{"type":"boolean"},"note":{"type":"string","maxLength":500},"sampleRefs":{"minItems":1,"maxItems":96,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"}}},"required":["event","at","location","handledBy"],"additionalProperties":false},"DataSubmission":{"type":"object","properties":{"kind":{"type":"string","enum":["fastq","olink_npx","hl7","astm","adme"]},"fileName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^/\\\\\\u0000-\\u001f]+$"},"content":{"type":"string","minLength":1},"contentEncoding":{"default":"utf8","type":"string","enum":["utf8","base64"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"orderRef":{"type":"string","pattern":"^PPO-\\d{14}-[A-F0-9]{8}$"},"sendOutRef":{"type":"string","pattern":"^PSO-\\d{14}-[A-F0-9]{8}$"},"sampleRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"},"olink":{"type":"object","properties":{"manifest":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"specimens":{"minItems":1,"maxItems":100000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["manifest","specimens"],"additionalProperties":false},"corrects":{"type":"string","pattern":"^PPS-\\d{14}-[A-F0-9]{8}$"}},"required":["kind","fileName","content"],"additionalProperties":false},"WebhookRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":500,"format":"uri"},"events":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"string","enum":["order.received","order.custody","order.state_changed","data.received","results.available","results.released","results.refused","results.corrected","results.withdrawn","credential.rotated","organ_chip.design.checked","organ_chip.run.evaluated","send_out.dispatched","send_out.custody","send_out.state_changed"]}}},"required":["url"],"additionalProperties":false},"PartnerProposal":{"type":"object","properties":{"partnerId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$"},"name":{"type":"string","minLength":2,"maxLength":120},"kind":{"type":"string","enum":["laboratory","data_partner","organ_chip"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"allowedScopes":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["orders:read","orders:write","data:write","results:read","webhooks:manage","audit:read","organ-chip:read","organ-chip:write","send-outs:read","send-outs:write"]}}},"required":["partnerId","name","kind","country","allowedScopes"],"additionalProperties":false},"PartnerApproval":{"type":"object","properties":{"rationale":{"type":"string","minLength":3,"maxLength":500}},"required":["rationale"],"additionalProperties":false},"PartnerSuspend":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":200},"close":{"default":false,"type":"boolean"}},"required":["reason"],"additionalProperties":false},"CredentialIssue":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["orders:read","orders:write","data:write","results:read","webhooks:manage","audit:read","organ-chip:read","organ-chip:write","send-outs:read","send-outs:write"]}},"expiresInDays":{"default":90,"type":"integer","minimum":1,"maximum":365}},"required":["label","scopes"],"additionalProperties":false},"CredentialRevoke":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":200}},"required":["reason"],"additionalProperties":false},"ReleaseRequest":{"type":"object","properties":{"confirm":{"type":"boolean","const":true},"findingReviews":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,80}$"},"note":{"type":"string","minLength":3,"maxLength":500}},"required":["code","note"],"additionalProperties":false}}},"required":["confirm"],"additionalProperties":false},"RefusalRequest":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false},"AmendRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["corrected","entered_in_error"]},"reason":{"type":"string","minLength":3,"maxLength":500,"pattern":"^[^\\u0000-\\u001f\\u007f]*$"},"replacementSubmissionId":{"type":"string","pattern":"^PPS-\\d{14}-[A-F0-9]{8}$"},"findingReviews":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,80}$"},"note":{"type":"string","minLength":3,"maxLength":500}},"required":["code","note"],"additionalProperties":false}}},"required":["kind","reason"],"additionalProperties":false},"IrenaResult":{"type":"object","properties":{"kind":{"type":"string","const":"hl7"},"fileName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^/\\\\\\u0000-\\u001f]+$"},"content":{"type":"string","minLength":1},"sampleRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"},"corrects":{"type":"string","pattern":"^PPS-\\d{14}-[A-F0-9]{8}$"}},"required":["kind","fileName","content","sampleRef"],"additionalProperties":false},"TransferBasisRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["domestic_ae","resolution_51_2021","doh_authorisation","withdrawn"]},"reference":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/ -]{2,199}$"},"caseName":{"type":"string","minLength":3,"maxLength":200},"statement":{"type":"string","minLength":3,"maxLength":1000,"pattern":"^[^\\u0000-\\u001f\\u007f]*$"},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["kind","reference","statement"],"additionalProperties":false},"ChipDesign":{"type":"object","properties":{"contract":{"type":"string","const":"PREPAIRE-ORGAN-CHIP-DESIGN@1.0.0"},"partnerDesignRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"name":{"type":"string","minLength":2,"maxLength":120},"organ":{"type":"string","enum":["liver","kidney_proximal_tubule","gut","lung_alveolus","blood_brain_barrier","vessel","skin","bone_marrow"]},"chip":{"type":"object","properties":{"material":{"type":"string","enum":["pdms","cyclic_olefin_copolymer","pmma","polystyrene","glass","other"]},"channels":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"role":{"type":"string","enum":["parenchymal","vascular","apical","basal","single"]},"widthUm":{"type":"number","minimum":10,"maximum":5000},"heightUm":{"type":"number","minimum":10,"maximum":2000},"lengthMm":{"type":"number","minimum":0.1,"maximum":100}},"required":["id","role","widthUm","heightUm","lengthMm"],"additionalProperties":false}},"membrane":{"type":"object","properties":{"material":{"type":"string","minLength":2,"maxLength":60},"poreSizeUm":{"type":"number","exclusiveMinimum":0,"maximum":50},"thicknessUm":{"type":"number","exclusiveMinimum":0,"maximum":500},"separates":{"type":"array","prefixItems":[{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"}],"items":false,"minItems":2,"maxItems":2}},"required":["material","poreSizeUm","thicknessUm","separates"],"additionalProperties":false}},"required":["material","channels"],"additionalProperties":false},"cells":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":2,"maxLength":120},"source":{"type":"string","enum":["primary","cell_line","ipsc_derived"]},"channelId":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"seedingDensityPerCm2":{"type":"number","exclusiveMinimum":0,"maximum":100000000}},"required":["type","source","channelId","seedingDensityPerCm2"],"additionalProperties":false}},"perfusion":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"mode":{"type":"string","enum":["continuous","pulsatile","static"]},"flowRateUlPerMin":{"type":"number","minimum":0,"maximum":1000},"mediumViscosityMPaS":{"default":0.78,"type":"number","exclusiveMinimum":0,"maximum":10}},"required":["channelId","mode","flowRateUlPerMin"],"additionalProperties":false}},"targets":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"shearStressDynPerCm2":{"type":"object","properties":{"low":{"type":"number","minimum":0},"high":{"type":"number","exclusiveMinimum":0}},"required":["low","high"],"additionalProperties":false},"residenceTimeS":{"type":"object","properties":{"low":{"type":"number","minimum":0},"high":{"type":"number","exclusiveMinimum":0}},"required":["low","high"],"additionalProperties":false}},"required":["channelId"],"additionalProperties":false}},"plannedReadouts":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["teer","papp","albumin_secretion","urea_secretion","cyp3a4_activity","ldh_release","viability","il6"]}}},"required":["contract","partnerDesignRef","name","organ","chip","cells","perfusion","plannedReadouts"],"additionalProperties":false},"ValidationRun":{"type":"object","properties":{"contract":{"type":"string","const":"PREPAIRE-ORGAN-CHIP-VALIDATION-RUN@1.0.0"},"designId":{"type":"string","pattern":"^OCD-\\d{14}-[A-F0-9]{8}$"},"partnerRunRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"chips":{"type":"integer","minimum":2,"maximum":96},"timepointsHours":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"integer","minimum":1,"maximum":2160}},"conditions":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"label":{"type":"string","minLength":2,"maxLength":80},"kind":{"type":"string","enum":["control","test_article"]},"chips":{"type":"integer","minimum":1,"maximum":96}},"required":["id","label","kind","chips"],"additionalProperties":false}},"acceptance":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"readout":{"type":"string","enum":["teer","papp","albumin_secretion","urea_secretion","cyp3a4_activity","ldh_release","viability","il6"]},"condition":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"atHours":{"type":"integer","minimum":1,"maximum":2160},"statistic":{"type":"string","enum":["mean","cv_percent","fold_change_vs_control"]},"operator":{"type":"string","enum":[">=","<=","between"]},"value":{"type":"number"},"valueHigh":{"type":"number"}},"required":["id","readout","condition","atHours","statistic","operator","value"],"additionalProperties":false}}},"required":["contract","designId","partnerRunRef","chips","timepointsHours","conditions","acceptance"],"additionalProperties":false},"Readouts":{"type":"object","properties":{"contract":{"type":"string","const":"PREPAIRE-ORGAN-CHIP-READOUTS@1.0.0"},"runId":{"type":"string","pattern":"^OCV-\\d{14}-[A-F0-9]{8}$"},"measurements":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"chipId":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,32}$"},"condition":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"timepointHours":{"type":"integer","minimum":1,"maximum":2160},"readout":{"type":"string","enum":["teer","papp","albumin_secretion","urea_secretion","cyp3a4_activity","ldh_release","viability","il6"]},"value":{"type":"number"},"unit":{"type":"string","minLength":1,"maxLength":40}},"required":["chipId","condition","timepointHours","readout","value","unit"],"additionalProperties":false}}},"required":["contract","runId","measurements"],"additionalProperties":false},"SendOutRequest":{"type":"object","properties":{"partnerId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$"},"assayCode":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{1,39}$"},"irenaRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"samples":{"minItems":1,"maxItems":96,"type":"array","items":{"type":"object","properties":{"sampleRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"},"subjectRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"},"specimenType":{"type":"string","enum":["serum","plasma_edta","whole_blood_edta","urine","stool","capillary_blood","dna_extract"]},"container":{"type":"string","minLength":2,"maxLength":120},"collectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"volumeMl":{"type":"number","exclusiveMinimum":0,"maximum":100},"administrativeSex":{"type":"string","enum":["female","male","other","unknown"]},"ageYears":{"type":"number","minimum":18,"maximum":120},"consentRef":{"type":"string","pattern":"^[A-Za-z0-9._:/-]{3,100}$"}},"required":["sampleRef","subjectRef","specimenType","container","collectedAt","ageYears"],"additionalProperties":false}},"compounds":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":200},"inchikey":{"type":"string","pattern":"^[A-Z]{14}-[A-Z]{10}-[A-Z]$"},"smiles":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^\\S+$"},"compoundRef":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"}},"required":["name","inchikey"],"additionalProperties":false}},"shipping":{"type":"object","properties":{"carrier":{"type":"string","minLength":2,"maxLength":80},"trackingNumber":{"type":"string","pattern":"^[A-Za-z0-9-]{4,40}$"},"temperature":{"type":"string","enum":["ambient","refrigerated_2_8","frozen_minus_20","frozen_minus_80","dry_ice","liquid_nitrogen"]},"expectedArrival":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"packages":{"default":1,"type":"integer","minimum":1,"maximum":20}},"required":["carrier","temperature"],"additionalProperties":false},"consent":{"type":"object","properties":{"reference":{"type":"string","pattern":"^[A-Za-z0-9._:/-]{3,100}$"},"researchUse":{"type":"boolean","const":true},"transferOutsideUae":{"type":"boolean","const":true}},"required":["reference"],"additionalProperties":false},"custody":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"event":{"type":"string","enum":["packed","handed_to_carrier","data_released","in_transit","customs_cleared","delivered","received_at_partner","in_analysis","rejected_at_partner"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"location":{"type":"string","minLength":2,"maxLength":200},"handledBy":{"type":"string","minLength":2,"maxLength":200},"temperatureC":{"type":"number","minimum":-200,"maximum":60},"sealIntact":{"type":"boolean"},"note":{"type":"string","maxLength":500},"sampleRefs":{"minItems":1,"maxItems":96,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"}}},"required":["event","at","location","handledBy"],"additionalProperties":false}}},"required":["partnerId","assayCode","irenaRef","consent"],"additionalProperties":false},"SendOutCustody":{"type":"object","properties":{"event":{"type":"string","enum":["packed","handed_to_carrier","data_released","in_transit","customs_cleared","delivered","received_at_partner","in_analysis","rejected_at_partner"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"location":{"type":"string","minLength":2,"maxLength":200},"handledBy":{"type":"string","minLength":2,"maxLength":200},"temperatureC":{"type":"number","minimum":-200,"maximum":60},"sealIntact":{"type":"boolean"},"note":{"type":"string","maxLength":500},"sampleRefs":{"minItems":1,"maxItems":96,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{2,99}$"}}},"required":["event","at","location","handledBy"],"additionalProperties":false},"SendOutCancel":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":300}},"required":["reason"],"additionalProperties":false}}}}