@metriport/commonwell-sdk 4.5.1 → 4.5.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/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { CommonWellAPI } from "./client/commonwell-api";
3
3
  export { CommonwellError } from "./common/commonwell-error";
4
4
  export { downloadFile } from "./common/fileDownload";
5
5
  export { makeJwt } from "./common/make-jwt";
6
- export { getDemographics, getId, getPersonId, getIdTrailingSlash, getPatientStrongIds, getPersonIdFromSearchByPatientDemo, getPersonIdFromUrl, } from "./common/util";
6
+ export { getDemographics, getId, getIdTrailingSlash, getPatientStrongIds, getPersonId, getPersonIdFromSearchByPatientDemo, getPersonIdFromUrl, } from "./common/util";
7
7
  export { validateNPI } from "./common/validate-npi";
8
8
  export { Address, AddressUseCodes } from "./models/address";
9
9
  export { CertificateParam, CertificatePurpose, CertificateResp } from "./models/certificates";
@@ -17,6 +17,6 @@ export { Identifier, StrongId } from "./models/identifier";
17
17
  export { isLOLA1, isLOLA2, isLOLA3, isLOLA4, LOLA, NetworkLink, PatientLinkProxy, } from "./models/link";
18
18
  export { Organization, OrganizationList } from "./models/organization";
19
19
  export { Patient, PatientLinkResp, PatientNetworkLinkResp, PatientSearchResp, } from "./models/patient";
20
- export { PatientLink, PatientLinkSearchResp, Person, PersonSearchResp } from "./models/person";
20
+ export { isEnrolled, isUnenrolled, PatientLink, PatientLinkSearchResp, Person, PersonSearchResp, } from "./models/person";
21
21
  export { PurposeOfUse } from "./models/purpose-of-use";
22
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MA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AC;AACvB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACL,OAAO,EACP,eAAe,EACf,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,MAAM,EACN,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.PurposeOfUse = exports.LOLA = exports.isLOLA4 = exports.isLOLA3 = exports.isLOLA2 = exports.isLOLA1 = exports.NameUseCodes = exports.operationOutcomeResourceType = exports.documentReferenceResourceType = exports.GenderCodes = exports.ContactUseCodes = exports.ContactSystemCodes = exports.CertificatePurpose = exports.AddressUseCodes = exports.validateNPI = exports.getPersonIdFromUrl = exports.getPersonIdFromSearchByPatientDemo = exports.getPatientStrongIds = exports.getIdTrailingSlash = exports.getPersonId = exports.getId = exports.getDemographics = exports.makeJwt = exports.downloadFile = exports.CommonwellError = exports.CommonWell = exports.APIMode = void 0;
17
+ exports.PurposeOfUse = exports.isUnenrolled = exports.isEnrolled = exports.LOLA = exports.isLOLA4 = exports.isLOLA3 = exports.isLOLA2 = exports.isLOLA1 = exports.NameUseCodes = exports.operationOutcomeResourceType = exports.documentReferenceResourceType = exports.GenderCodes = exports.ContactUseCodes = exports.ContactSystemCodes = exports.CertificatePurpose = exports.AddressUseCodes = exports.validateNPI = exports.getPersonIdFromUrl = exports.getPersonIdFromSearchByPatientDemo = exports.getPersonId = exports.getPatientStrongIds = exports.getIdTrailingSlash = exports.getId = exports.getDemographics = exports.makeJwt = exports.downloadFile = exports.CommonwellError = exports.CommonWell = exports.APIMode = void 0;
18
18
  var commonwell_1 = require("./client/commonwell");
19
19
  Object.defineProperty(exports, "APIMode", { enumerable: true, get: function () { return commonwell_1.APIMode; } });
20
20
  Object.defineProperty(exports, "CommonWell", { enumerable: true, get: function () { return commonwell_1.CommonWell; } });
@@ -27,9 +27,9 @@ Object.defineProperty(exports, "makeJwt", { enumerable: true, get: function () {
27
27
  var util_1 = require("./common/util");
28
28
  Object.defineProperty(exports, "getDemographics", { enumerable: true, get: function () { return util_1.getDemographics; } });
29
29
  Object.defineProperty(exports, "getId", { enumerable: true, get: function () { return util_1.getId; } });
30
- Object.defineProperty(exports, "getPersonId", { enumerable: true, get: function () { return util_1.getPersonId; } });
31
30
  Object.defineProperty(exports, "getIdTrailingSlash", { enumerable: true, get: function () { return util_1.getIdTrailingSlash; } });
32
31
  Object.defineProperty(exports, "getPatientStrongIds", { enumerable: true, get: function () { return util_1.getPatientStrongIds; } });
32
+ Object.defineProperty(exports, "getPersonId", { enumerable: true, get: function () { return util_1.getPersonId; } });
33
33
  Object.defineProperty(exports, "getPersonIdFromSearchByPatientDemo", { enumerable: true, get: function () { return util_1.getPersonIdFromSearchByPatientDemo; } });
34
34
  Object.defineProperty(exports, "getPersonIdFromUrl", { enumerable: true, get: function () { return util_1.getPersonIdFromUrl; } });
35
35
  var validate_npi_1 = require("./common/validate-npi");
@@ -55,6 +55,9 @@ Object.defineProperty(exports, "isLOLA2", { enumerable: true, get: function () {
55
55
  Object.defineProperty(exports, "isLOLA3", { enumerable: true, get: function () { return link_1.isLOLA3; } });
56
56
  Object.defineProperty(exports, "isLOLA4", { enumerable: true, get: function () { return link_1.isLOLA4; } });
57
57
  Object.defineProperty(exports, "LOLA", { enumerable: true, get: function () { return link_1.LOLA; } });
58
+ var person_1 = require("./models/person");
59
+ Object.defineProperty(exports, "isEnrolled", { enumerable: true, get: function () { return person_1.isEnrolled; } });
60
+ Object.defineProperty(exports, "isUnenrolled", { enumerable: true, get: function () { return person_1.isUnenrolled; } });
58
61
  var purpose_of_use_1 = require("./models/purpose-of-use");
59
62
  Object.defineProperty(exports, "PurposeOfUse", { enumerable: true, get: function () { return purpose_of_use_1.PurposeOfUse; } });
60
63
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA2E;AAAlE,qGAAA,OAAO,OAAA;AAAE,wGAAA,UAAU,OAAA;AAE5B,8DAA4D;AAAnD,mHAAA,eAAe,OAAA;AACxB,sDAAqD;AAA5C,4GAAA,YAAY,OAAA;AACrB,8CAA4C;AAAnC,mGAAA,OAAO,OAAA;AAChB,sCAQuB;AAPrB,uGAAA,eAAe,OAAA;AACf,6FAAA,KAAK,OAAA;AACL,mGAAA,WAAW,OAAA;AACX,0GAAA,kBAAkB,OAAA;AAClB,2GAAA,mBAAmB,OAAA;AACnB,0HAAA,kCAAkC,OAAA;AAClC,0GAAA,kBAAkB,OAAA;AAEpB,sDAAoD;AAA3C,2GAAA,WAAW,OAAA;AACpB,4CAA4D;AAA1C,0GAAA,eAAe,OAAA;AACjC,sDAA8F;AAAnE,kHAAA,kBAAkB,OAAA;AAC7C,4CAAgF;AAA9D,6GAAA,kBAAkB,OAAA;AAAE,0GAAA,eAAe,OAAA;AACrD,sDAAkE;AAA3C,2GAAA,WAAW,OAAA;AAClC,oDAAkC;AAClC,8CAAgG;AAAvF,yHAAA,6BAA6B,OAAA;AAAE,wHAAA,4BAA4B,OAAA;AAEpE,kDAA8D;AAA1C,0GAAA,YAAY,OAAA;AAEhC,sCAQuB;AAPrB,+FAAA,OAAO,OAAA;AACP,+FAAA,OAAO,OAAA;AACP,+FAAA,OAAO,OAAA;AACP,+FAAA,OAAO,OAAA;AACP,4FAAA,IAAI,OAAA;AAYN,0DAAuD;AAA9C,8GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA2E;AAAlE,qGAAA,OAAO,OAAA;AAAE,wGAAA,UAAU,OAAA;AAE5B,8DAA4D;AAAnD,mHAAA,eAAe,OAAA;AACxB,sDAAqD;AAA5C,4GAAA,YAAY,OAAA;AACrB,8CAA4C;AAAnC,mGAAA,OAAO,OAAA;AAChB,sCAQuB;AAPrB,uGAAA,eAAe,OAAA;AACf,6FAAA,KAAK,OAAA;AACL,0GAAA,kBAAkB,OAAA;AAClB,2GAAA,mBAAmB,OAAA;AACnB,mGAAA,WAAW,OAAA;AACX,0HAAA,kCAAkC,OAAA;AAClC,0GAAA,kBAAkB,OAAA;AAEpB,sDAAoD;AAA3C,2GAAA,WAAW,OAAA;AACpB,4CAA4D;AAA1C,0GAAA,eAAe,OAAA;AACjC,sDAA8F;AAAnE,kHAAA,kBAAkB,OAAA;AAC7C,4CAAgF;AAA9D,6GAAA,kBAAkB,OAAA;AAAE,0GAAA,eAAe,OAAA;AACrD,sDAAkE;AAA3C,2GAAA,WAAW,OAAA;AAClC,oDAAkC;AAClC,8CAAgG;AAAvF,yHAAA,6BAA6B,OAAA;AAAE,wHAAA,4BAA4B,OAAA;AAEpE,kDAA8D;AAA1C,0GAAA,YAAY,OAAA;AAEhC,sCAQuB;AAPrB,+FAAA,OAAO,OAAA;AACP,+FAAA,OAAO,OAAA;AACP,+FAAA,OAAO,OAAA;AACP,+FAAA,OAAO,OAAA;AACP,4FAAA,IAAI,OAAA;AAWN,0CAOyB;AANvB,oGAAA,UAAU,OAAA;AACV,sGAAA,YAAY,OAAA;AAMd,0DAAuD;AAA9C,8GAAA,YAAY,OAAA"}
@@ -758,6 +758,8 @@ export declare const personSchema: z.ZodObject<{
758
758
  } | null | undefined;
759
759
  }>;
760
760
  export type Person = z.infer<typeof personSchema>;
761
+ export declare const isEnrolled: (person: Person) => boolean;
762
+ export declare const isUnenrolled: (person: Person) => boolean;
761
763
  export declare const personSearchRespSchema: z.ZodObject<{
762
764
  message: z.ZodString;
763
765
  _embedded: z.ZodObject<{
@@ -1 +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,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAA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
3
- exports.patientLinkSearchRespSchema = exports.patientLinkSchema = exports.personSearchRespSchema = exports.personSchema = exports.personLinksSchema = void 0;
3
+ exports.patientLinkSearchRespSchema = exports.patientLinkSchema = exports.personSearchRespSchema = exports.isUnenrolled = exports.isEnrolled = exports.personSchema = exports.personLinksSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const demographics_1 = require("./demographics");
6
6
  const enrollment_summary_1 = require("./enrollment-summary");
@@ -21,6 +21,10 @@ exports.personSchema = zod_1.z.object({
21
21
  details: demographics_1.demographicsSchema,
22
22
  _links: exports.personLinksSchema.optional().nullable(),
23
23
  });
24
+ const isEnrolled = (person) => person.enrolled ?? false;
25
+ exports.isEnrolled = isEnrolled;
26
+ const isUnenrolled = (person) => !(0, exports.isEnrolled)(person);
27
+ exports.isUnenrolled = isUnenrolled;
24
28
  exports.personSearchRespSchema = zod_1.z.object({
25
29
  message: zod_1.z.string(),
26
30
  _embedded: zod_1.z.object({ person: zod_1.z.array(exports.personSchema) }),
@@ -1 +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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,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": "4.5.1",
3
+ "version": "4.5.2",
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/",
@@ -75,5 +75,5 @@
75
75
  "prettier": "^2.8.3",
76
76
  "typescript": "^4.9.5"
77
77
  },
78
- "gitHead": "bacd08b9e982c9fe0489b61d3861a3f3b203487d"
78
+ "gitHead": "038758118d1fbab5c34d6387942e29bdcb2f6369"
79
79
  }