@metriport/commonwell-sdk 7.0.3 → 7.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person.d.ts","sourceRoot":"","sources":["../../src/models/person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC;AAIH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKvB,CA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;;;;;;;EAGtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.patientLinkSearchRespSchema = exports.patientLinkSchema = exports.personSearchRespSchema = exports.isUnenrolled = exports.isEnrolled = exports.personSchema = exports.personLinksSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const demographics_1 = require("./demographics");
6
+ const enrollment_summary_1 = require("./enrollment-summary");
7
+ const link_1 = require("./link");
8
+ exports.personLinksSchema = zod_1.z.object({
9
+ self: link_1.linkSchema,
10
+ patientLink: link_1.linkSchema.optional().nullable(),
11
+ patientMatch: link_1.linkSchema.optional().nullable(),
12
+ unenroll: link_1.linkSchema.optional().nullable(),
13
+ enroll: link_1.linkSchema.optional().nullable(),
14
+ reset: link_1.linkSchema.optional().nullable(),
15
+ });
16
+ // The Person resource represents a natural person independent of a specific healthcare context.
17
+ // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.6 Person)
18
+ exports.personSchema = zod_1.z.object({
19
+ enrolled: zod_1.z.boolean().optional().nullable(),
20
+ enrollmentSummary: enrollment_summary_1.enrollmentSummarySchema.optional().nullable(),
21
+ details: demographics_1.demographicsSchema,
22
+ _links: exports.personLinksSchema.optional().nullable(),
23
+ });
24
+ const isEnrolled = (person) => person.enrolled ?? false;
25
+ exports.isEnrolled = isEnrolled;
26
+ const isUnenrolled = (person) => !(0, exports.isEnrolled)(person);
27
+ exports.isUnenrolled = isUnenrolled;
28
+ exports.personSearchRespSchema = zod_1.z.object({
29
+ message: zod_1.z.string(),
30
+ _embedded: zod_1.z.object({ person: zod_1.z.array(exports.personSchema) }),
31
+ _links: zod_1.z.object({ self: link_1.linkSchema }),
32
+ });
33
+ // Within the context of a Person resource, a PatientLink represents a confirmed relationship to a Patient Record.
34
+ // See: https://specification.commonwellalliance.org/services/rest-api-reference (8.6.5 PatientLink)
35
+ exports.patientLinkSchema = zod_1.z.object({
36
+ patient: zod_1.z.string(),
37
+ assuranceLevel: link_1.lolaSchema,
38
+ _links: exports.personLinksSchema.optional().nullable(),
39
+ });
40
+ exports.patientLinkSearchRespSchema = zod_1.z.object({
41
+ _embedded: zod_1.z.object({ patientLink: zod_1.z.array(exports.patientLinkSchema) }),
42
+ _links: zod_1.z.object({ self: link_1.linkSchema }),
43
+ });
44
+ //# sourceMappingURL=person.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person.js","sourceRoot":"","sources":["../../src/models/person.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAoD;AACpD,6DAA+D;AAC/D,iCAAgD;AAEnC,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,iBAAU;IAChB,WAAW,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,YAAY,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC9C,QAAQ,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1C,MAAM,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH,gGAAgG;AAChG,+FAA+F;AAClF,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,iBAAiB,EAAE,4CAAuB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChE,OAAO,EAAE,iCAAkB;IAC3B,MAAM,EAAE,yBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAGI,MAAM,UAAU,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,KAAK,CAAC;AAAnE,QAAA,UAAU,cAAyD;AACzE,MAAM,YAAY,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,CAAC,IAAA,kBAAU,EAAC,MAAM,CAAC,CAAC;AAAhE,QAAA,YAAY,gBAAoD;AAEhE,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,oBAAY,CAAC,EAAE,CAAC;IACtD,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAU,EAAE,CAAC;CACvC,CAAC,CAAC;AAGH,kHAAkH;AAClH,oGAAoG;AAEvF,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,cAAc,EAAE,iBAAU;IAC1B,MAAM,EAAE,yBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAGU,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,SAAS,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC,EAAE,CAAC;IAChE,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAU,EAAE,CAAC;CACvC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metriport/commonwell-sdk",
3
- "version": "7.0.3",
3
+ "version": "7.1.0",
4
4
  "description": "SDK to simplify CommonWell API integration - by Metriport Inc.",
5
5
  "author": "Metriport Inc. <contact@metriport.com>",
6
6
  "homepage": "https://metriport.com/",
@@ -53,14 +53,14 @@
53
53
  "typecheck": "tsc --noEmit",
54
54
  "lint": "npx eslint . --ext .ts",
55
55
  "lint-fix": "npm run lint --fix",
56
- "prettier-fix": "npx prettier '**/*.ts' --write",
56
+ "prettier-fix": "npx prettier '**/*.{js,ts,md}' --write --ignore-path ../../.prettierignore",
57
57
  "test": "echo \"No test specified yet\""
58
58
  },
59
59
  "bugs": {
60
60
  "url": "https://github.com/metriport/metriport/issues"
61
61
  },
62
62
  "dependencies": {
63
- "@metriport/shared": "^0.26.5",
63
+ "@metriport/shared": "^0.26.6-alpha.0",
64
64
  "axios": "^1.8.2",
65
65
  "http-status": "~1.7.0",
66
66
  "jsonwebtoken": "^9.0.0",
@@ -78,5 +78,5 @@
78
78
  "prettier": "^2.8.3",
79
79
  "typescript": "^4.9.5"
80
80
  },
81
- "gitHead": "bef38fce5ea71635e47ed0ad7042cf570f67d0be"
81
+ "gitHead": "2ef1987641932bf451e1abac3381001aef3dd536"
82
82
  }