@healthcloudai/hc-sdk 3.24.0 → 3.25.0

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.
Files changed (47) hide show
  1. package/dist/index.cjs +113 -7
  2. package/dist/index.d.cts +846 -27
  3. package/dist/index.d.ts +846 -27
  4. package/dist/index.js +110 -7
  5. package/docs/clients/ProviderClient.md +7 -2
  6. package/docs/configuration.md +2 -2
  7. package/docs/docs-manifest.json +18 -3
  8. package/docs/examples/index.md +7 -2
  9. package/docs/index.md +7 -2
  10. package/docs/models/CheckInEncounterResponse.md +2 -0
  11. package/docs/models/ClaimEncounterResponse.md +20 -0
  12. package/docs/models/DiagnosisInput.md +20 -0
  13. package/docs/models/GetEncounterResponse.md +2 -0
  14. package/docs/models/Icd10Code.md +18 -0
  15. package/docs/models/Icd10SearchResponse.md +19 -0
  16. package/docs/models/ProviderEncounterQueueResponse.md +19 -0
  17. package/docs/models/ProviderEncounterRecord.md +2 -0
  18. package/docs/models/ProviderQueueEncounter.md +28 -0
  19. package/docs/models/ProviderQueuePatient.md +21 -0
  20. package/docs/models/SignEncounterResponse.md +18 -0
  21. package/docs/models/UpdateEncounterDiagnosesRequest.md +17 -0
  22. package/docs/models/UpdateEncounterDiagnosesResponse.md +17 -0
  23. package/docs/models/fieldagent.Encounter.md +2 -0
  24. package/docs/models/index.md +10 -0
  25. package/docs/models/patient.Encounter.md +2 -0
  26. package/docs/models/provider.Encounter.md +2 -0
  27. package/docs/operations/fieldagent.listEncounters.md +2 -0
  28. package/docs/operations/patient.checkEncounter.md +64 -64
  29. package/docs/operations/patient.checkInEncounter.md +2 -0
  30. package/docs/operations/patient.createEncounter.md +2 -0
  31. package/docs/operations/patient.getCheckinCheckin.md +2 -0
  32. package/docs/operations/patient.getCurrentCareSessionCareSessionsCurrent.md +2 -0
  33. package/docs/operations/patient.getEncounter.md +2 -0
  34. package/docs/operations/patient.getLatestEncounter.md +2 -0
  35. package/docs/operations/patient.getPatientSidebarPatientSidebar.md +2 -0
  36. package/docs/operations/patient.listEncounters.md +2 -0
  37. package/docs/operations/provider.claimEncounter.md +235 -0
  38. package/docs/operations/provider.getEncounter.md +12 -1
  39. package/docs/operations/provider.getEncounterQueue.md +148 -0
  40. package/docs/operations/provider.getPatientRecord.md +11 -0
  41. package/docs/operations/provider.listEncounters.md +24 -3
  42. package/docs/operations/provider.searchIcd10.md +128 -0
  43. package/docs/operations/provider.signEncounter.md +233 -0
  44. package/docs/operations/provider.updateEncounterClinicalNote.md +20 -0
  45. package/docs/operations/provider.updateEncounterDiagnoses.md +267 -0
  46. package/docs/operations/provider.updateEncounterStatus.md +20 -0
  47. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21,12 +21,67 @@ function isServiceName(value) {
21
21
  return SERVICES.includes(value);
22
22
  }
23
23
  function resolveBaseUrl(environment, service) {
24
+ assertEnvironment(environment);
24
25
  if (service === "ams") {
26
+ if (environment === "dev") return "https://dev-ams-services.health.cloud/api/ams";
25
27
  const prefix = environment === "prod" ? "" : `${environment}-`;
26
28
  return `https://${prefix}amsservices.health.cloud/api/ams`;
27
29
  }
28
30
  return `https://${environment}-api-${service}.health.cloud`;
29
31
  }
32
+ function normalizeBaseUrl(value) {
33
+ const message = "Invalid service base URL: expected HTTPS (or literal loopback HTTP); no credentials, query or fragment";
34
+ try {
35
+ if (typeof value !== "string" || /[^\x21-\x7e]|[\\?#]/.test(value) || !/^https?:\/\//i.test(value)) {
36
+ throw new Error();
37
+ }
38
+ const authority = value.slice(value.indexOf("://") + 3).split("/")[0];
39
+ if (!authority || /[@%]/.test(authority) || authority.endsWith(":")) throw new Error();
40
+ const url = new URL(value);
41
+ const host = url.hostname;
42
+ const allowedScheme = url.protocol === "https:" || url.protocol === "http:" && (host === "127.0.0.1" || host === "[::1]");
43
+ if (!allowedScheme || !host || url.username || url.password || url.port && Number(url.port) < 1) {
44
+ throw new Error();
45
+ }
46
+ if (!host.startsWith("[") && (!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/.test(host) || host.split(".").some(
47
+ (label) => !label || label.length > 63 || label.startsWith("-") || label.endsWith("-")
48
+ ))) throw new Error();
49
+ const rawHost = authority.startsWith("[") ? authority.slice(0, authority.indexOf("]") + 1) : authority.split(":")[0];
50
+ if (!host.startsWith("[") && host !== rawHost.toLowerCase()) throw new Error();
51
+ const rawPath = value.slice(value.indexOf("://") + 3 + authority.length);
52
+ if (rawPath.includes("//") || /%(?![0-9a-f]{2})|%2f/i.test(rawPath)) throw new Error();
53
+ const decoded = decodePathBytes(rawPath);
54
+ if (hasControls(decoded) || /[\\?#%]/.test(decoded) || decoded.split("/").some((s) => s === "." || s === "..")) {
55
+ throw new Error();
56
+ }
57
+ return `${url.origin}${rawPath.replace(/\/+$/, "")}`;
58
+ } catch {
59
+ throw new Error(message);
60
+ }
61
+ }
62
+ function normalizeOverrides(values) {
63
+ if (values === void 0) return {};
64
+ if (values === null || typeof values !== "object" || Array.isArray(values)) throw new Error("Invalid service URL overrides");
65
+ const result = {};
66
+ for (const [service, value] of Object.entries(values)) {
67
+ if (!isServiceName(service)) throw new Error("Invalid service URL overrides: expected known service names");
68
+ result[service] = normalizeBaseUrl(value);
69
+ }
70
+ return result;
71
+ }
72
+ function joinServiceUrl(base, path) {
73
+ if (hasControls(path) || /[\\?#]/.test(path) || path.includes("://") || path.startsWith("//") || path.split("/").some((segment) => {
74
+ const decoded = decodePathBytes(segment);
75
+ return decoded === "." || decoded === "..";
76
+ })) throw new Error("Invalid service request path");
77
+ return `${base.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
78
+ }
79
+ function hasControls(value) {
80
+ return Array.from(value).some((character) => character.charCodeAt(0) < 32 || character.charCodeAt(0) === 127);
81
+ }
82
+ function decodePathBytes(value) {
83
+ return value.replace(/%([0-9a-f]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
84
+ }
30
85
  function assertTimeout(timeout, label = "timeout") {
31
86
  if (typeof timeout !== "number" || !Number.isFinite(timeout) || timeout <= 0) {
32
87
  throw new Error(`Invalid HealthCloud SDK ${label}: expected a positive number of milliseconds, got ${String(timeout)}`);
@@ -62,12 +117,13 @@ var SDKError = class extends Error {
62
117
  var HttpClient = class {
63
118
  constructor(state) {
64
119
  this.state = state;
120
+ this.baseUrlOverrides = normalizeOverrides(state.baseUrlOverrides);
65
121
  }
66
122
  async request(service, method, path, options = {}) {
67
123
  var _a, _b;
68
124
  const url = this.buildUrl(service, path, options);
69
125
  const headers = this.buildHeaders(options);
70
- const init = { method, headers };
126
+ const init = { method, headers, redirect: "error" };
71
127
  if (method !== "GET" && method !== "DELETE" && options.body !== void 0) {
72
128
  init.body = this.serializeBody(options.body, headers);
73
129
  }
@@ -84,6 +140,9 @@ var HttpClient = class {
84
140
  let payload;
85
141
  try {
86
142
  response = await fetch(url, init);
143
+ if (response.redirected || response.status >= 300 && response.status < 400 || response.type === "opaqueredirect") {
144
+ throw new SDKError({ message: "Service redirects are not allowed", statusCode: response.status });
145
+ }
87
146
  payload = await this.parseResponse(response);
88
147
  } catch (error) {
89
148
  if (didTimeout) {
@@ -97,7 +156,7 @@ var HttpClient = class {
97
156
  throw error;
98
157
  }
99
158
  throw new SDKError({
100
- message: error instanceof Error ? error.message : "Network request failed.",
159
+ message: "Network request failed.",
101
160
  statusCode: 0,
102
161
  cause: error
103
162
  });
@@ -133,8 +192,8 @@ var HttpClient = class {
133
192
  buildUrl(service, path, options) {
134
193
  var _a, _b, _c;
135
194
  const normalizedPath = this.resolvePath(path, (_a = options.pathParams) != null ? _a : {});
136
- const base = (_c = (_b = this.state.baseUrlOverrides) == null ? void 0 : _b[service]) != null ? _c : resolveBaseUrl(this.state.environment, service);
137
- const url = new URL(`${base}${normalizedPath}`);
195
+ const base = (_c = (_b = this.baseUrlOverrides) == null ? void 0 : _b[service]) != null ? _c : resolveBaseUrl(this.state.environment, service);
196
+ const url = new URL(joinServiceUrl(base, normalizedPath));
138
197
  if (options.query) {
139
198
  for (const [key, value] of Object.entries(options.query)) {
140
199
  this.appendQuery(url, key, value);
@@ -3683,11 +3742,52 @@ var ProviderClient = class extends BaseServiceClient {
3683
3742
  connect() {
3684
3743
  return this.connectService();
3685
3744
  }
3686
- /** List encounters in the authenticated provider's tenant. */
3745
+ /**
3746
+ * List the caller's OWN encounters (never tenant-wide). Pass `open: true` for the provider's task list: encounters that
3747
+ * are not finished, cancelled or entered in error.
3748
+ */
3687
3749
  listEncounters(filters) {
3688
3750
  return this.send("GET", "/encounters", { query: filters });
3689
3751
  }
3690
- /** Get one encounter with its patient demographic summary. */
3752
+ /**
3753
+ * The queue (GET /encounters/queue): the newest 10 encounters in the tenant that no provider has taken, newest created
3754
+ * first, each with a minimal patient summary. Use the item's `fhir_id` with claimEncounter.
3755
+ */
3756
+ getEncounterQueue() {
3757
+ return this.send("GET", "/encounters/queue", {});
3758
+ }
3759
+ /**
3760
+ * Take an encounter from the queue (POST /encounters/{id}/claim): assigns the caller, starts it (in-progress), adds the
3761
+ * patient to the caller's patient list and notifies the patient. Repeating the call as the same provider changes nothing
3762
+ * (`claimed: false`). Rejects with a 409 when another provider took it first, 403 when the caller's role or account may not
3763
+ * work the queue, and 404 when the encounter does not exist.
3764
+ */
3765
+ claimEncounter(encounterId) {
3766
+ return this.send("POST", "/encounters/{encounter_id}/claim", { pathParams: { encounter_id: encounterId } });
3767
+ }
3768
+ /**
3769
+ * Replace an encounter's diagnoses (PUT /encounters/{id}/diagnoses): add, change or remove. Codes come from
3770
+ * searchIcd10; codes left out of the list are removed, and the display text always comes from the ICD-10 data. Only the
3771
+ * assigned provider (403 otherwise), and not once the encounter is signed (409).
3772
+ */
3773
+ updateEncounterDiagnoses(encounterId, request) {
3774
+ return this.send("PUT", "/encounters/{encounter_id}/diagnoses", {
3775
+ pathParams: { encounter_id: encounterId },
3776
+ body: request
3777
+ });
3778
+ }
3779
+ /**
3780
+ * Sign and complete an encounter (POST /encounters/{id}/sign): finished, end time, signer and time recorded, patient
3781
+ * notified. The encounter is then locked (409 on later edits). Only the assigned provider.
3782
+ */
3783
+ signEncounter(encounterId) {
3784
+ return this.send("POST", "/encounters/{encounter_id}/sign", { pathParams: { encounter_id: encounterId } });
3785
+ }
3786
+ /** Search the ICD-10-CM codes accepted on encounters (GET /icd10). `q` is a code prefix or description words. */
3787
+ searchIcd10(filters) {
3788
+ return this.send("GET", "/icd10", { query: filters });
3789
+ }
3790
+ /** Get one of the caller's own encounters with its patient demographic summary (404 until the caller holds it). */
3691
3791
  getEncounter(encounterId) {
3692
3792
  return this.send("GET", "/encounters/{encounter_id}", { pathParams: { encounter_id: encounterId } });
3693
3793
  }
@@ -7041,7 +7141,7 @@ var HCSDK = class {
7041
7141
  environment: config.environment,
7042
7142
  tenantId: config.tenantId,
7043
7143
  accessToken: config.accessToken,
7044
- baseUrlOverrides: config.baseUrlOverrides,
7144
+ baseUrlOverrides: normalizeOverrides(config.baseUrlOverrides),
7045
7145
  timeout: (_b = config.timeout) != null ? _b : DEFAULT_TIMEOUT_MS
7046
7146
  };
7047
7147
  this.http = new HttpClient(this.state);
@@ -7214,6 +7314,9 @@ export {
7214
7314
  assertTimeout,
7215
7315
  isJsonRpcError,
7216
7316
  isServiceName,
7317
+ joinServiceUrl,
7318
+ normalizeBaseUrl,
7319
+ normalizeOverrides,
7217
7320
  resolveBaseUrl,
7218
7321
  withTenantId
7219
7322
  };
@@ -1,5 +1,6 @@
1
1
  # ProviderClient
2
2
 
3
+ - [`claimEncounter`](../operations/provider.claimEncounter.md) — Take an encounter from the queue
3
4
  - [`completePractitionerOnboarding`](../operations/provider.completePractitionerOnboarding.md) — Record onboarding completion for the practitioner's current flow
4
5
  - [`confirmPassword`](../operations/provider.confirmResetPassword.md) — Complete a password reset
5
6
  - [`connect`](../operations/provider.connect.md) — Health check
@@ -7,7 +8,8 @@
7
8
  - [`createPractitionerLocation`](../operations/provider.createPractitionerLocation.md) — Add a practice location
8
9
  - [`deletePractitionerLocation`](../operations/provider.deletePractitionerLocation.md) — Remove a practice location
9
10
  - [`getAppointment`](../operations/provider.getAppointment.md) — Get one appointment with patient demographics
10
- - [`getEncounter`](../operations/provider.getEncounter.md) — Get one encounter with patient demographics
11
+ - [`getEncounter`](../operations/provider.getEncounter.md) — Get one of the caller's encounters with patient demographics
12
+ - [`getEncounterQueue`](../operations/provider.getEncounterQueue.md) — The queue of encounters no provider has taken yet
11
13
  - [`getHomeSummary`](../operations/provider.getHomeSummary.md) — Counts for the provider's home screen
12
14
  - [`getLabOrder`](../operations/provider.getLabOrder.md) — Get one Quest lab order requisition
13
15
  - [`getLabOrderRequisition`](../operations/provider.getLabOrderRequisition.md) — Get the Quest requisition PDF of a lab order
@@ -17,7 +19,7 @@
17
19
  - [`get`](../operations/provider.getPractitioner.md) — Get a practitioner profile
18
20
  - [`getPractitionerLocation`](../operations/provider.getPractitionerLocation.md) — Get one practice location
19
21
  - [`listAppointments`](../operations/provider.listAppointments.md) — List tenant appointments
20
- - [`listEncounters`](../operations/provider.listEncounters.md) — List tenant encounters
22
+ - [`listEncounters`](../operations/provider.listEncounters.md) — List the caller's own encounters
21
23
  - [`listLabOrders`](../operations/provider.listLabOrders.md) — List a tenant patient's Quest lab orders
22
24
  - [`listPatients`](../operations/provider.listPatients.md) — List or search the calling practitioner's patients
23
25
  - [`listPractitionerLocations`](../operations/provider.listPractitionerLocations.md) — List the practitioner's practice locations
@@ -28,8 +30,11 @@
28
30
  - [`register`](../operations/provider.register.md) — Register a practitioner
29
31
  - [`resendEmailVerification`](../operations/provider.resendVerificationCode.md) — Resend the email verification OTP
30
32
  - [`resetPassword`](../operations/provider.resetPassword.md) — Start a password reset
33
+ - [`searchIcd10`](../operations/provider.searchIcd10.md) — Search ICD-10-CM diagnosis codes
31
34
  - [`setPractitionerPortalRoles`](../operations/provider.setPractitionerPortalRoles.md) — Set a practitioner's provider-portal roles (platform admin only)
35
+ - [`signEncounter`](../operations/provider.signEncounter.md) — Sign and complete an encounter
32
36
  - [`updateEncounterClinicalNote`](../operations/provider.updateEncounterClinicalNote.md) — Update encounter notes and assessment
37
+ - [`updateEncounterDiagnoses`](../operations/provider.updateEncounterDiagnoses.md) — Add, change or remove an encounter's diagnoses
33
38
  - [`updateEncounterStatus`](../operations/provider.updateEncounterStatus.md) — Update encounter status
34
39
  - [`updatePhone`](../operations/provider.updatePhone.md) — Update a practitioner's phone number
35
40
  - [`update`](../operations/provider.updatePractitioner.md) — Update a practitioner profile
@@ -1,9 +1,9 @@
1
1
  # Configuration
2
2
 
3
- - `environment`: Required: `dev`, `uat`, or `prod`. API defaults use `https://{environment}-api-{service}.health.cloud`, including `prod-api-`. AMS uses `https://amsservices.health.cloud/api/ams` in prod and dev-/uat- prefixed AMS hosts otherwise.
3
+ - `environment`: API defaults use https://{environment}-api-{service}.health.cloud. AMS DEV uses https://dev-ams-services.health.cloud/api/ams (AWS); UAT remains https://uat-amsservices.health.cloud/api/ams and PROD remains https://amsservices.health.cloud/api/ams. No fallback to another deployment.
4
4
  - `tenantId`: Tenant used by tenant-aware authentication operations.
5
5
  - `accessToken`: Optional bearer token for authenticated APIs.
6
- - `baseUrlOverrides`: Optional per-service override intended for controlled development and testing.
6
+ - `baseUrlOverrides`: Optional service-to-URL mapping. Complete HTTPS service base URL including any base path (HTTP allowed only for literal loopback 127.0.0.1 or [::1]); trailing slash is normalized. Credentials, query, fragment, ambiguous paths and redirects are refused. TLS verification stays enabled. Overrides are copied per SDK instance and take precedence over environment defaults; configure before construction. An AMS/MCP override does not change patient authentication or Tenant Admin login/refresh URLs. Native fetch must enforce redirect: error and normal certificate validation. Node/browser transport behavior is covered; React Native adapters need a separate runtime verification.
7
7
  - `timeout`: Optional request timeout in milliseconds. Defaults to 30000; timed-out requests are aborted and reject with SDKError.
8
8
 
9
9
  ## Initialization
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:37a2d5556a9c16b7444db88d7c73bffc9b0ad52670ecbf9cfe0f07ced9817813",
2
+ "docsDataContentDigest": "sha256:cddd1cb1d808fd8a4c7cb3ec30bbbb6f4bde28c473596110754cb047d49b8914",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -455,6 +455,7 @@
455
455
  "models/CheckEncounterResponse.md",
456
456
  "models/CheckInEncounterRequest.md",
457
457
  "models/CheckInEncounterResponse.md",
458
+ "models/ClaimEncounterResponse.md",
458
459
  "models/ClinicalObservation.md",
459
460
  "models/CmsGetCountyFipsRequest.md",
460
461
  "models/CmsSearchHealthPlansRequest.md",
@@ -528,6 +529,7 @@
528
529
  "models/DeliveryPharmacy.md",
529
530
  "models/DemographicsMatch.md",
530
531
  "models/DependentResponse.md",
532
+ "models/DiagnosisInput.md",
531
533
  "models/DiagnosticTest.md",
532
534
  "models/DiagnosticTestRelationship.md",
533
535
  "models/DietCategory.md",
@@ -1107,6 +1109,8 @@
1107
1109
  "models/HealthieUpdateUserRequest.md",
1108
1110
  "models/HealthieUpdateUserResponse.md",
1109
1111
  "models/HeartRateVital.md",
1112
+ "models/Icd10Code.md",
1113
+ "models/Icd10SearchResponse.md",
1110
1114
  "models/ImmunizationRoute.md",
1111
1115
  "models/ImmunizationStatus.md",
1112
1116
  "models/ImpiloAddress.md",
@@ -1443,6 +1447,7 @@
1443
1447
  "models/ProviderCredential.md",
1444
1448
  "models/ProviderEducationCredential.md",
1445
1449
  "models/ProviderEncounterListResponse.md",
1450
+ "models/ProviderEncounterQueueResponse.md",
1446
1451
  "models/ProviderEncounterRecord.md",
1447
1452
  "models/ProviderEncounterResponse.md",
1448
1453
  "models/ProviderEncounterStatusCounts.md",
@@ -1468,6 +1473,8 @@
1468
1473
  "models/ProviderPatientSummary.md",
1469
1474
  "models/ProviderPostgraduateTraining.md",
1470
1475
  "models/ProviderProfessionalLiability.md",
1476
+ "models/ProviderQueueEncounter.md",
1477
+ "models/ProviderQueuePatient.md",
1471
1478
  "models/ProviderRole.md",
1472
1479
  "models/ProviderSearchRequest.md",
1473
1480
  "models/ProviderSearchResponse.md",
@@ -1723,6 +1730,7 @@
1723
1730
  "models/SetPreferredPharmacyResponse.md",
1724
1731
  "models/SexAtBirth.md",
1725
1732
  "models/SexualOrientation.md",
1733
+ "models/SignEncounterResponse.md",
1726
1734
  "models/Slot.md",
1727
1735
  "models/SlotStatus.md",
1728
1736
  "models/SmokingStatus.md",
@@ -1878,6 +1886,8 @@
1878
1886
  "models/UpdateDriversLicenseResponse.md",
1879
1887
  "models/UpdateEncounterClinicalNoteRequest.md",
1880
1888
  "models/UpdateEncounterClinicalNoteResponse.md",
1889
+ "models/UpdateEncounterDiagnosesRequest.md",
1890
+ "models/UpdateEncounterDiagnosesResponse.md",
1881
1891
  "models/UpdateEncounterStatusRequest.md",
1882
1892
  "models/UpdateEncounterStatusResponse.md",
1883
1893
  "models/UpdateMedicationRequest.md",
@@ -3230,6 +3240,7 @@
3230
3240
  "operations/person.uploadPhoto.md",
3231
3241
  "operations/person.verifyEmail.md",
3232
3242
  "operations/person.verifySms.md",
3243
+ "operations/provider.claimEncounter.md",
3233
3244
  "operations/provider.completePractitionerOnboarding.md",
3234
3245
  "operations/provider.confirmResetPassword.md",
3235
3246
  "operations/provider.connect.md",
@@ -3238,6 +3249,7 @@
3238
3249
  "operations/provider.deletePractitionerLocation.md",
3239
3250
  "operations/provider.getAppointment.md",
3240
3251
  "operations/provider.getEncounter.md",
3252
+ "operations/provider.getEncounterQueue.md",
3241
3253
  "operations/provider.getHomeSummary.md",
3242
3254
  "operations/provider.getLabOrder.md",
3243
3255
  "operations/provider.getLabOrderRequisition.md",
@@ -3258,8 +3270,11 @@
3258
3270
  "operations/provider.register.md",
3259
3271
  "operations/provider.resendVerificationCode.md",
3260
3272
  "operations/provider.resetPassword.md",
3273
+ "operations/provider.searchIcd10.md",
3261
3274
  "operations/provider.setPractitionerPortalRoles.md",
3275
+ "operations/provider.signEncounter.md",
3262
3276
  "operations/provider.updateEncounterClinicalNote.md",
3277
+ "operations/provider.updateEncounterDiagnoses.md",
3263
3278
  "operations/provider.updateEncounterStatus.md",
3264
3279
  "operations/provider.updatePhone.md",
3265
3280
  "operations/provider.updatePractitioner.md",
@@ -3279,7 +3294,7 @@
3279
3294
  "operations/vitals.recordVitals.md"
3280
3295
  ],
3281
3296
  "language": "nodejs",
3282
- "modelCount": 2160,
3283
- "operationCount": 1062,
3297
+ "modelCount": 2170,
3298
+ "operationCount": 1067,
3284
3299
  "schemaVersion": 1
3285
3300
  }
@@ -1017,6 +1017,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
1017
1017
  - [Upload a person photo](../operations/person.uploadPhoto.md)
1018
1018
  - [Verify a person's email OTP](../operations/person.verifyEmail.md)
1019
1019
  - [Verify a person's phone OTP](../operations/person.verifySms.md)
1020
+ - [Take an encounter from the queue](../operations/provider.claimEncounter.md)
1020
1021
  - [Record onboarding completion for the practitioner's current flow](../operations/provider.completePractitionerOnboarding.md)
1021
1022
  - [Complete a password reset](../operations/provider.confirmResetPassword.md)
1022
1023
  - [Health check](../operations/provider.connect.md)
@@ -1024,7 +1025,8 @@ Generated call examples use exact public surface signatures. Workflow examples r
1024
1025
  - [Add a practice location](../operations/provider.createPractitionerLocation.md)
1025
1026
  - [Remove a practice location](../operations/provider.deletePractitionerLocation.md)
1026
1027
  - [Get one appointment with patient demographics](../operations/provider.getAppointment.md)
1027
- - [Get one encounter with patient demographics](../operations/provider.getEncounter.md)
1028
+ - [Get one of the caller's encounters with patient demographics](../operations/provider.getEncounter.md)
1029
+ - [The queue of encounters no provider has taken yet](../operations/provider.getEncounterQueue.md)
1028
1030
  - [Counts for the provider's home screen](../operations/provider.getHomeSummary.md)
1029
1031
  - [Get one Quest lab order requisition](../operations/provider.getLabOrder.md)
1030
1032
  - [Get the Quest requisition PDF of a lab order](../operations/provider.getLabOrderRequisition.md)
@@ -1034,7 +1036,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
1034
1036
  - [Get a practitioner profile](../operations/provider.getPractitioner.md)
1035
1037
  - [Get one practice location](../operations/provider.getPractitionerLocation.md)
1036
1038
  - [List tenant appointments](../operations/provider.listAppointments.md)
1037
- - [List tenant encounters](../operations/provider.listEncounters.md)
1039
+ - [List the caller's own encounters](../operations/provider.listEncounters.md)
1038
1040
  - [List a tenant patient's Quest lab orders](../operations/provider.listLabOrders.md)
1039
1041
  - [List or search the calling practitioner's patients](../operations/provider.listPatients.md)
1040
1042
  - [List the practitioner's practice locations](../operations/provider.listPractitionerLocations.md)
@@ -1045,8 +1047,11 @@ Generated call examples use exact public surface signatures. Workflow examples r
1045
1047
  - [Register a practitioner](../operations/provider.register.md)
1046
1048
  - [Resend the email verification OTP](../operations/provider.resendVerificationCode.md)
1047
1049
  - [Start a password reset](../operations/provider.resetPassword.md)
1050
+ - [Search ICD-10-CM diagnosis codes](../operations/provider.searchIcd10.md)
1048
1051
  - [Set a practitioner's provider-portal roles (platform admin only)](../operations/provider.setPractitionerPortalRoles.md)
1052
+ - [Sign and complete an encounter](../operations/provider.signEncounter.md)
1049
1053
  - [Update encounter notes and assessment](../operations/provider.updateEncounterClinicalNote.md)
1054
+ - [Add, change or remove an encounter's diagnoses](../operations/provider.updateEncounterDiagnoses.md)
1050
1055
  - [Update encounter status](../operations/provider.updateEncounterStatus.md)
1051
1056
  - [Update a practitioner's phone number](../operations/provider.updatePhone.md)
1052
1057
  - [Update a practitioner profile](../operations/provider.updatePractitioner.md)
package/docs/index.md CHANGED
@@ -1025,6 +1025,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
1025
1025
  - [Upload a person photo](operations/person.uploadPhoto.md) (`person.uploadPhoto`)
1026
1026
  - [Verify a person's email OTP](operations/person.verifyEmail.md) (`person.verifyEmail`)
1027
1027
  - [Verify a person's phone OTP](operations/person.verifySms.md) (`person.verifySms`)
1028
+ - [Take an encounter from the queue](operations/provider.claimEncounter.md) (`provider.claimEncounter`)
1028
1029
  - [Record onboarding completion for the practitioner's current flow](operations/provider.completePractitionerOnboarding.md) (`provider.completePractitionerOnboarding`)
1029
1030
  - [Complete a password reset](operations/provider.confirmResetPassword.md) (`provider.confirmResetPassword`)
1030
1031
  - [Health check](operations/provider.connect.md) (`provider.connect`)
@@ -1032,7 +1033,8 @@ This directory is generated from the shared structured docs data. Do not edit ge
1032
1033
  - [Add a practice location](operations/provider.createPractitionerLocation.md) (`provider.createPractitionerLocation`)
1033
1034
  - [Remove a practice location](operations/provider.deletePractitionerLocation.md) (`provider.deletePractitionerLocation`)
1034
1035
  - [Get one appointment with patient demographics](operations/provider.getAppointment.md) (`provider.getAppointment`)
1035
- - [Get one encounter with patient demographics](operations/provider.getEncounter.md) (`provider.getEncounter`)
1036
+ - [Get one of the caller's encounters with patient demographics](operations/provider.getEncounter.md) (`provider.getEncounter`)
1037
+ - [The queue of encounters no provider has taken yet](operations/provider.getEncounterQueue.md) (`provider.getEncounterQueue`)
1036
1038
  - [Counts for the provider's home screen](operations/provider.getHomeSummary.md) (`provider.getHomeSummary`)
1037
1039
  - [Get one Quest lab order requisition](operations/provider.getLabOrder.md) (`provider.getLabOrder`)
1038
1040
  - [Get the Quest requisition PDF of a lab order](operations/provider.getLabOrderRequisition.md) (`provider.getLabOrderRequisition`)
@@ -1042,7 +1044,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
1042
1044
  - [Get a practitioner profile](operations/provider.getPractitioner.md) (`provider.getPractitioner`)
1043
1045
  - [Get one practice location](operations/provider.getPractitionerLocation.md) (`provider.getPractitionerLocation`)
1044
1046
  - [List tenant appointments](operations/provider.listAppointments.md) (`provider.listAppointments`)
1045
- - [List tenant encounters](operations/provider.listEncounters.md) (`provider.listEncounters`)
1047
+ - [List the caller's own encounters](operations/provider.listEncounters.md) (`provider.listEncounters`)
1046
1048
  - [List a tenant patient's Quest lab orders](operations/provider.listLabOrders.md) (`provider.listLabOrders`)
1047
1049
  - [List or search the calling practitioner's patients](operations/provider.listPatients.md) (`provider.listPatients`)
1048
1050
  - [List the practitioner's practice locations](operations/provider.listPractitionerLocations.md) (`provider.listPractitionerLocations`)
@@ -1053,8 +1055,11 @@ This directory is generated from the shared structured docs data. Do not edit ge
1053
1055
  - [Register a practitioner](operations/provider.register.md) (`provider.register`)
1054
1056
  - [Resend the email verification OTP](operations/provider.resendVerificationCode.md) (`provider.resendVerificationCode`)
1055
1057
  - [Start a password reset](operations/provider.resetPassword.md) (`provider.resetPassword`)
1058
+ - [Search ICD-10-CM diagnosis codes](operations/provider.searchIcd10.md) (`provider.searchIcd10`)
1056
1059
  - [Set a practitioner's provider-portal roles (platform admin only)](operations/provider.setPractitionerPortalRoles.md) (`provider.setPractitionerPortalRoles`)
1060
+ - [Sign and complete an encounter](operations/provider.signEncounter.md) (`provider.signEncounter`)
1057
1061
  - [Update encounter notes and assessment](operations/provider.updateEncounterClinicalNote.md) (`provider.updateEncounterClinicalNote`)
1062
+ - [Add, change or remove an encounter's diagnoses](operations/provider.updateEncounterDiagnoses.md) (`provider.updateEncounterDiagnoses`)
1058
1063
  - [Update encounter status](operations/provider.updateEncounterStatus.md) (`provider.updateEncounterStatus`)
1059
1064
  - [Update a practitioner's phone number](operations/provider.updatePhone.md) (`provider.updatePhone`)
1060
1065
  - [Update a practitioner profile](operations/provider.updatePractitioner.md) (`provider.updatePractitioner`)
@@ -40,6 +40,8 @@ Type: `object`
40
40
  | `service_provider_id` | `string|null` | No | | | | Yes | FHIR Organization id of the service provider, when linked. |
41
41
  | `service_type_code` | `string|null` | No | | | | Yes | SNOMED CT code for the service type, when coded. |
42
42
  | `service_type_display` | `string|null` | No | | | | Yes | Display text for the service type, when available. |
43
+ | `signed_at` | `string|null` | No | | | | Yes | UTC datetime when the encounter was signed, when signed. |
44
+ | `signed_by` | `string|null` | No | | | | Yes | FHIR Practitioner id of the provider who signed (completed) the encounter, when signed. |
43
45
  | `status` | [`EncounterStatus`](./EncounterStatus.md) | No | | | `"planned"` | No | Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, or unknown. |
44
46
  | `steadymd_consult_guid` | `string|null` | No | | | | Yes | SteadyMD consult guid this encounter was checked in from, when checked in via SteadyMD. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
45
47
  | `steadymd_episode_guid` | `string|null` | No | | | | Yes | SteadyMD episode guid this encounter is linked to, when checked in via SteadyMD. |
@@ -0,0 +1,20 @@
1
+ # ClaimEncounterResponse
2
+
3
+ Model ID: `ClaimEncounterResponse`
4
+
5
+ Result of taking an encounter from the queue.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `claimed` | `boolean` | Yes | | | | No | True when this call took the encounter; false when the caller already held it (nothing changed). |
14
+ | `ehr_status` | `string` | Yes | | updated, not_linked, skipped | | No | Whether a linked EHR encounter was updated too. |
15
+ | `encounter` | [`ProviderEncounterRecord`](./ProviderEncounterRecord.md) | Yes | | | | No | The encounter, now in progress and assigned to the caller. |
16
+ | `patient_on_care_team` | `boolean` | Yes | | | | No | True when the patient is now on the caller's patient list (GET /patients). False means that step failed and a repeat claim will retry it. |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -0,0 +1,20 @@
1
+ # EncounterDiagnosisInput
2
+
3
+ Model ID: `DiagnosisInput`
4
+
5
+ One diagnosis to record on an encounter.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `display` | `string|null` | No | | | | Yes | Ignored: the display text always comes from the ICD-10 data. Accepted for convenience. |
14
+ | `icd10_code` | `string` | Yes | | | | No | ICD-10-CM code from GET /icd10, for example E11.9. |
15
+ | `rank` | `integer|null` | No | | | | Yes | 1 is the primary diagnosis. Defaults to the position in the list. |
16
+ | `use` | `string|null` | No | | | | Yes | Diagnosis role: CC (default), AD, DD, CM, pre-op, post-op or billing. |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -37,6 +37,8 @@ Type: `object`
37
37
  | `service_provider_id` | `string|null` | No | | | | Yes | FHIR Organization id of the service provider, when linked. |
38
38
  | `service_type_code` | `string|null` | No | | | | Yes | SNOMED CT code for the service type, when coded. |
39
39
  | `service_type_display` | `string|null` | No | | | | Yes | Display text for the service type, when available. |
40
+ | `signed_at` | `string|null` | No | | | | Yes | UTC datetime when the encounter was signed, when signed. |
41
+ | `signed_by` | `string|null` | No | | | | Yes | FHIR Practitioner id of the provider who signed (completed) the encounter, when signed. |
40
42
  | `status` | [`EncounterStatus`](./EncounterStatus.md) | No | | | `"planned"` | No | Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, or unknown. |
41
43
  | `steadymd_consult_guid` | `string|null` | No | | | | Yes | SteadyMD consult guid this encounter was checked in from, when checked in via SteadyMD. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
42
44
  | `steadymd_episode_guid` | `string|null` | No | | | | Yes | SteadyMD episode guid this encounter is linked to, when checked in via SteadyMD. |
@@ -0,0 +1,18 @@
1
+ # Icd10Code
2
+
3
+ Model ID: `Icd10Code`
4
+
5
+ One ICD-10-CM code.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `code` | `string` | Yes | | | | No | ICD-10-CM code with its dot, for example E11.9. |
14
+ | `description` | `string` | Yes | | | | No | Official long description. |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -0,0 +1,19 @@
1
+ # Icd10SearchResponse
2
+
3
+ Model ID: `Icd10SearchResponse`
4
+
5
+ ICD-10-CM codes matching a search.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `codes` | array of [`Icd10Code`](./Icd10Code.md) | Yes | | | | No | Matches, best first. |
14
+ | `release` | `string` | Yes | | | | No | The ICD-10-CM release the served subset comes from, for example ICD-10-CM FY2026. |
15
+ | `total` | `integer` | Yes | | | | No | Number of codes returned. |
16
+
17
+ ## Example
18
+
19
+ None declared in canonical OpenAPI.
@@ -0,0 +1,19 @@
1
+ # ProviderEncounterQueueResponse
2
+
3
+ Model ID: `ProviderEncounterQueueResponse`
4
+
5
+ The newest encounters in the caller's tenant that no provider is assigned to.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `encounters` | array of [`ProviderQueueEncounter`](./ProviderQueueEncounter.md) | Yes | | | | No | At most `limit` unassigned encounters, newest created first. No status filter is applied. |
14
+ | `limit` | `integer` | Yes | | | | No | Maximum number of encounters the queue returns. |
15
+ | `total` | `integer` | Yes | | | | No | Number of encounters returned. |
16
+
17
+ ## Example
18
+
19
+ None declared in canonical OpenAPI.
@@ -38,6 +38,8 @@ Type: `object`
38
38
  | `service_provider_id` | `string|null` | No | | | | Yes | FHIR Organization id of the service provider, when linked. |
39
39
  | `service_type_code` | `string|null` | No | | | | Yes | SNOMED CT code for the service type, when coded. |
40
40
  | `service_type_display` | `string|null` | No | | | | Yes | Display text for the service type, when available. |
41
+ | `signed_at` | `string|null` | No | | | | Yes | UTC datetime when the encounter was signed, when signed. |
42
+ | `signed_by` | `string|null` | No | | | | Yes | FHIR Practitioner id of the provider who signed (completed) the encounter, when signed. |
41
43
  | `status` | [`EncounterStatus`](./EncounterStatus.md) | No | | | `"planned"` | No | Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, or unknown. |
42
44
  | `steadymd_consult_guid` | `string|null` | No | | | | Yes | SteadyMD consult guid this encounter was checked in from, when checked in via SteadyMD. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
43
45
  | `steadymd_episode_guid` | `string|null` | No | | | | Yes | SteadyMD episode guid this encounter is linked to, when checked in via SteadyMD. |
@@ -0,0 +1,28 @@
1
+ # ProviderQueueEncounter
2
+
3
+ Model ID: `ProviderQueueEncounter`
4
+
5
+ One unassigned encounter in the queue. Use `fhir_id` in route paths such as /encounters/{id}/claim.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `created_date` | `string|null` | No | | | | Yes | When the encounter was created, in ISO 8601 form, when recorded. |
14
+ | `encounter_class` | `string` | Yes | | | | No | Encounter class code, for example AMB or VR. |
15
+ | `encounter_id` | `string` | Yes | | | | No | HealthCloud encounter identifier (UUID). |
16
+ | `fhir_id` | `string` | Yes | | | | No | FHIR Encounter resource ID. Use this in route paths. |
17
+ | `patient` | [`ProviderQueuePatient`](./ProviderQueuePatient.md) | No | | | | Yes | Minimal patient summary, present when the patient record is readable. |
18
+ | `period_start` | `string|null` | No | | | | Yes | Scheduled or actual start in ISO 8601 form, when recorded. |
19
+ | `priority_display` | `string|null` | No | | | | Yes | Priority text, when available. |
20
+ | `reason_code` | `string|null` | No | | | | Yes | Reason-for-visit code, when coded. |
21
+ | `reason_display` | `string|null` | No | | | | Yes | Reason-for-visit text, when available. |
22
+ | `status` | `string` | Yes | | | | No | Encounter status, for example planned, arrived or triaged. |
23
+ | `type_code` | `string|null` | No | | | | Yes | SNOMED CT encounter type code, when coded. |
24
+ | `type_display` | `string|null` | No | | | | Yes | Encounter type text, when available. |
25
+
26
+ ## Example
27
+
28
+ None declared in canonical OpenAPI.
@@ -0,0 +1,21 @@
1
+ # ProviderQueuePatient
2
+
3
+ Model ID: `ProviderQueuePatient`
4
+
5
+ The minimum about a patient that the open-encounter queue shows before a provider takes the encounter.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `date_of_birth` | `string|null` | No | | | | Yes | Patient's date of birth in ISO date format. |
14
+ | `first_name` | `string|null` | No | | | | Yes | Patient's first (given) name. |
15
+ | `gender` | `string|null` | No | | | | Yes | Administrative gender: male, female, other, or unknown. |
16
+ | `last_name` | `string|null` | No | | | | Yes | Patient's last (family) name. |
17
+ | `patient_id` | `string` | Yes | | | | No | FHIR Patient resource ID. |
18
+
19
+ ## Example
20
+
21
+ None declared in canonical OpenAPI.
@@ -0,0 +1,18 @@
1
+ # SignEncounterResponse
2
+
3
+ Model ID: `SignEncounterResponse`
4
+
5
+ Result of signing (completing) an encounter.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `ehr_status` | `string` | Yes | | updated, not_linked, skipped | | No | Whether a linked EHR encounter was updated too. |
14
+ | `encounter` | [`ProviderEncounterRecord`](./ProviderEncounterRecord.md) | Yes | | | | No | The finished encounter, with `signed_by` and `signed_at`. It is locked: later changes answer 409. |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -0,0 +1,17 @@
1
+ # UpdateEncounterDiagnosesRequest
2
+
3
+ Model ID: `UpdateEncounterDiagnosesRequest`
4
+
5
+ The complete diagnosis list for an encounter. Anything not listed is removed.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `diagnoses` | array of [`DiagnosisInput`](./DiagnosisInput.md) | Yes | | | | No | At most 12 diagnoses. |
14
+
15
+ ## Example
16
+
17
+ None declared in canonical OpenAPI.