sera-ai 1.0.33 → 1.0.34

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.d.mts CHANGED
@@ -11,6 +11,7 @@ interface AudioRecorderProps {
11
11
  speciality: string;
12
12
  apiKey: string;
13
13
  apiBaseUrl?: string;
14
+ encounterId?: string;
14
15
  patientHistory?: string;
15
16
  patientDetails?: PatientDetails;
16
17
  selectedFormat?: "json" | "hl7" | "fhir";
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ interface AudioRecorderProps {
11
11
  speciality: string;
12
12
  apiKey: string;
13
13
  apiBaseUrl?: string;
14
+ encounterId?: string;
14
15
  patientHistory?: string;
15
16
  patientDetails?: PatientDetails;
16
17
  selectedFormat?: "json" | "hl7" | "fhir";
package/dist/index.js CHANGED
@@ -1463,6 +1463,13 @@ var useHL7FHIRConverter = () => {
1463
1463
  )}|||||F|||${timestamp}`
1464
1464
  );
1465
1465
  }
1466
+ if (requestData.encounterId) {
1467
+ hl7Lines.push(
1468
+ `OBX|${obxSequence++}|TX|ENCOUNTER_ID^Encounter Identifier||${escapeHL7(
1469
+ requestData.encounterId
1470
+ )}|||||F|||${timestamp}`
1471
+ );
1472
+ }
1466
1473
  if (requestData.patientDetails?.age !== void 0) {
1467
1474
  hl7Lines.push(
1468
1475
  `OBX|${obxSequence++}|NM|PATIENT_AGE^Patient Age||${requestData.patientDetails.age}|||||F|||${timestamp}`
@@ -1780,6 +1787,9 @@ var useHL7FHIRConverter = () => {
1780
1787
  if (requestData.sessionId) {
1781
1788
  formData.append("sessionId", requestData.sessionId);
1782
1789
  }
1790
+ if (requestData.encounterId) {
1791
+ formData.append("encounterId", requestData.encounterId);
1792
+ }
1783
1793
  formData.append("sequence", requestData.sequence.toString());
1784
1794
  formData.append("isFinalChunk", requestData.isFinalChunk.toString());
1785
1795
  console.log(`[SERA] FHIR FormData created | sessionId=${requestData.sessionId || "none"}`);
@@ -2843,6 +2853,7 @@ var useAudioRecorder = ({
2843
2853
  apiKey,
2844
2854
  apiBaseUrl = API_BASE_URL,
2845
2855
  speciality,
2856
+ encounterId,
2846
2857
  patientHistory,
2847
2858
  patientDetails,
2848
2859
  selectedFormat = "json",
@@ -3106,6 +3117,7 @@ var useAudioRecorder = ({
3106
3117
  sessionId: retry ? void 0 : sessionIdRef.current || void 0,
3107
3118
  model: selectedModelRef.current,
3108
3119
  doctorName,
3120
+ encounterId,
3109
3121
  patientDetails: patientDetailsPayload,
3110
3122
  removeSilence: removeSilenceRef.current,
3111
3123
  skipDiarization: skipDiarizationRef.current,
@@ -3134,6 +3146,7 @@ var useAudioRecorder = ({
3134
3146
  formData.append("audio", audioFile);
3135
3147
  formData.append("model", selectedModelRef.current);
3136
3148
  formData.append("doctorName", doctorName);
3149
+ if (encounterId) formData.append("encounterId", encounterId);
3137
3150
  if (patientHistory) formData.append("patientHistory", patientHistory);
3138
3151
  if (patientDetailsPayload) {
3139
3152
  formData.append("patientDetails", JSON.stringify(patientDetailsPayload));
@@ -4288,6 +4301,7 @@ var AudioRecorder = ({
4288
4301
  apiKey,
4289
4302
  apiBaseUrl,
4290
4303
  speciality,
4304
+ encounterId,
4291
4305
  patientHistory,
4292
4306
  patientDetails,
4293
4307
  selectedFormat = "json",
@@ -4324,6 +4338,7 @@ var AudioRecorder = ({
4324
4338
  apiKey,
4325
4339
  apiBaseUrl,
4326
4340
  speciality,
4341
+ encounterId,
4327
4342
  patientHistory,
4328
4343
  patientDetails,
4329
4344
  selectedFormat,