@haau3/sdk 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -29,21 +29,40 @@ const haau3 = new Haau3(); // reads HAAU3_API_KEY
29
29
 
30
30
  ```ts
31
31
  const plan = await haau3.readInsurancePlan("H2406-013-000");
32
- console.log(plan.name);
33
-
34
- const { providerLocations } = await haau3.searchProviderLocations({ state: "MA", limit: 10 });
32
+ console.log(plan.name); // "AARP Medicare Advantage from UHC FL-0021 (PPO)"
35
33
  ```
36
34
 
37
- Every operation in the [API reference](https://docs.haau3.com) is a method named by its
38
- operationId, with its parameters and its answer typed from the published spec. FHIR answers are
39
- [@types/fhir](https://www.npmjs.com/package/@types/fhir)'s R4 types, also exported as `fhir4`:
35
+ FHIR answers are [@types/fhir](https://www.npmjs.com/package/@types/fhir)'s R4 types, also
36
+ exported as `fhir4` (`import type { fhir4 } from "@haau3/sdk"`).
37
+
38
+ ## One call per service
40
39
 
41
40
  ```ts
42
- import type { fhir4 } from "@haau3/sdk";
41
+ // Scheduling: open appointment slots, here in Boston.
42
+ const { slots, total } = await haau3.searchSlots({ city: "Boston", state: "MA", limit: 10 });
43
+
44
+ // Provider directory: a practitioner by NPI, from CMS's National Provider Directory.
45
+ const practitioners = await haau3.searchPractitioner({ identifier: "1093209884" });
46
+
47
+ // Terminology: a LOINC code's display and properties.
48
+ const glucose = await haau3.codeSystemLookup({ system: "http://loinc.org", code: "2345-7" });
43
49
 
44
- const bundle: fhir4.Bundle = await haau3.searchPractitioner({ identifier: "http://hl7.org/fhir/sid/us-npi|1518929058" });
50
+ // Questionnaires: a form by its id, such as the PHQ-9.
51
+ const phq9 = await haau3.readQuestionnaire("44249-1");
52
+
53
+ // Plan Benefits: a Medicare Advantage or ACA Marketplace plan, and which providers are in its network.
54
+ const plan = await haau3.readInsurancePlan("H2406-013-000");
55
+ const network = await haau3.checkInsurancePlanNetwork("H3359-038-000", { npi: ["1518929058"] });
56
+
57
+ // MedList: one reconciled medication list from one patient's FHIR medication records. It receives
58
+ // patient data, so send it only under an executed agreement.
59
+ const list = await haau3.reconcileMedications(records);
45
60
  ```
46
61
 
62
+ Every method, grouped by service, with its request and a link to its page on docs.haau3.com, is in
63
+ [api.md](https://github.com/haau3/haau3-node/blob/main/api.md). Each is named by its operationId,
64
+ with its parameters and its answer typed from the published spec.
65
+
47
66
  ## Options
48
67
 
49
68
  | Option | Default | |
@@ -127,7 +146,8 @@ const { status, body, requestId } = await haau3.request({ method: "GET", path: "
127
146
  ## Versions
128
147
 
129
148
  The SDK is `0.y.z` while the API is in preview: a minor release may change what a method takes or
130
- answers, and a patch release never does.
149
+ answers, and a patch release never does. [CHANGELOG.md](CHANGELOG.md) lists every release, and a
150
+ release that takes a new version of the API's spec names that version.
131
151
 
132
152
  ## License
133
153
 
package/dist/index.cjs CHANGED
@@ -74,7 +74,7 @@ var NoAnswerError = class extends Haau3Error {
74
74
  //#endregion
75
75
  //#region src/version.ts
76
76
  /** This package's version, sent in the `User-Agent` header. A test holds it to package.json. */
77
- const VERSION = "0.1.0";
77
+ const VERSION = "0.1.2";
78
78
  //#endregion
79
79
  //#region src/transport.ts
80
80
  const DEFAULT_BASE_URL = "https://api.haau3.com";
package/dist/index.d.cts CHANGED
@@ -4496,6 +4496,6 @@ export declare class NoAnswerError extends Haau3Error {
4496
4496
  //#endregion
4497
4497
  //#region src/version.d.ts
4498
4498
  /** This package's version, sent in the `User-Agent` header. A test holds it to package.json. */
4499
- export declare const VERSION = "0.1.0";
4499
+ export declare const VERSION = "0.1.2";
4500
4500
  //#endregion
4501
4501
  export type { CheckInsurancePlanNetworkParams, ClientOptions, CodeSystemLookupParams, CodeSystemValidateCodeParams, FhirMetadataParams, ListInsurancePlanCountiesParams, ListPublishersResponse, ListServiceTypesParams, ListServiceTypesResponse, ListSpecialtiesParams, ListSpecialtiesResponse, NoAnswerReason, OperationId, Problem, ProblemIssue, QueryValue, RawRequest, RawResponse, RequestOptions, SchedulingProviderLocation, SchedulingPublisher, SchedulingServiceType, SchedulingSlot, SchedulingSpecialty, SearchEndpointParams, SearchHealthcareServiceParams, SearchInsurancePlanParams, SearchLocationParams, SearchOrganizationAffiliationParams, SearchOrganizationParams, SearchPractitionerParams, SearchPractitionerRoleParams, SearchProviderLocationsParams, SearchProviderLocationsResponse, SearchQuestionnaireParams, SearchSlotsParams, SearchSlotsResponse, ValueSetExpandParams, ValueSetValidateCodeParams, fhir4 };
package/dist/index.d.mts CHANGED
@@ -4496,6 +4496,6 @@ export declare class NoAnswerError extends Haau3Error {
4496
4496
  //#endregion
4497
4497
  //#region src/version.d.ts
4498
4498
  /** This package's version, sent in the `User-Agent` header. A test holds it to package.json. */
4499
- export declare const VERSION = "0.1.0";
4499
+ export declare const VERSION = "0.1.2";
4500
4500
  //#endregion
4501
4501
  export type { CheckInsurancePlanNetworkParams, ClientOptions, CodeSystemLookupParams, CodeSystemValidateCodeParams, FhirMetadataParams, ListInsurancePlanCountiesParams, ListPublishersResponse, ListServiceTypesParams, ListServiceTypesResponse, ListSpecialtiesParams, ListSpecialtiesResponse, NoAnswerReason, OperationId, Problem, ProblemIssue, QueryValue, RawRequest, RawResponse, RequestOptions, SchedulingProviderLocation, SchedulingPublisher, SchedulingServiceType, SchedulingSlot, SchedulingSpecialty, SearchEndpointParams, SearchHealthcareServiceParams, SearchInsurancePlanParams, SearchLocationParams, SearchOrganizationAffiliationParams, SearchOrganizationParams, SearchPractitionerParams, SearchPractitionerRoleParams, SearchProviderLocationsParams, SearchProviderLocationsResponse, SearchQuestionnaireParams, SearchSlotsParams, SearchSlotsResponse, ValueSetExpandParams, ValueSetValidateCodeParams, fhir4 };
package/dist/index.mjs CHANGED
@@ -73,7 +73,7 @@ var NoAnswerError = class extends Haau3Error {
73
73
  //#endregion
74
74
  //#region src/version.ts
75
75
  /** This package's version, sent in the `User-Agent` header. A test holds it to package.json. */
76
- const VERSION = "0.1.0";
76
+ const VERSION = "0.1.2";
77
77
  //#endregion
78
78
  //#region src/transport.ts
79
79
  const DEFAULT_BASE_URL = "https://api.haau3.com";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haau3/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "TypeScript SDK for the haau3 platform API: scheduling, provider directory, terminology, questionnaires, plan benefits and medication lists, as typed calls.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.haau3.com",
@@ -53,7 +53,8 @@
53
53
  "typecheck": "tsc --noEmit",
54
54
  "test": "vitest run",
55
55
  "lint": "eslint .",
56
- "check:package": "publint --strict && attw --pack ."
56
+ "check:package": "publint --strict && attw --pack .",
57
+ "check:public-text": "tsx scripts/check-public-text.ts"
57
58
  },
58
59
  "dependencies": {
59
60
  "@types/fhir": "~0.0.44"
@@ -69,6 +70,7 @@
69
70
  "tsx": "^4.23.15",
70
71
  "typescript": "6.0.3",
71
72
  "typescript-eslint": "^8.71.2",
72
- "vitest": "^5.0.5"
73
+ "vitest": "^5.0.5",
74
+ "yaml": "^2.9.1"
73
75
  }
74
76
  }