@healthcloudai/hc-sdk 3.12.0 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -614,7 +614,14 @@ var DiagnosticsClient = class extends BaseServiceClient {
614
614
  * POST /patients/{patient_id}/diagnostics/rapid-tests
615
615
  */
616
616
  createRapidTest(patientId, request) {
617
- const body = "type" in request && "result" in request ? CreateRapidTestRequestToJSON(request) : request;
617
+ const body = { ...request };
618
+ for (const field of ["performed_date", "performed_datetime"]) {
619
+ const value = body[field];
620
+ if (value instanceof Date) {
621
+ const encoded = CreateRapidTestRequestToJSON({ [field]: value });
622
+ body[field] = encoded[field];
623
+ }
624
+ }
618
625
  return this.send("POST", "/patients/{patient_id}/diagnostics/rapid-tests", {
619
626
  pathParams: { patient_id: patientId },
620
627
  body