@icanbwell/bwell-sdk-ts 2.0.0-alpha.0-rc.1757362315 → 2.0.0-alpha.0-rc.1757691388
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/__version__.d.ts +1 -1
- package/dist/__version__.js +1 -1
- package/dist/api/base/health-data/health-data-request.d.ts +3 -0
- package/dist/api/base/health-data/health-manager.d.ts +53 -1
- package/dist/api/base/requests/field-sort-order.d.ts +11 -0
- package/dist/api/base/requests/field-sort-order.js +1 -0
- package/dist/api/base/requests/index.d.ts +1 -0
- package/dist/api/base/search/search-health-resources-request.d.ts +3 -11
- package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +5 -1
- package/dist/api/graphql-api/healthdata/graphql-health-manager.js +82 -0
- package/dist/api/graphql-api/healthdata/health-data-request-factory.js +13 -1
- package/dist/graphql/operations/index.d.ts +66 -5
- package/dist/graphql/operations/index.js +1115 -143
- package/dist/graphql/operations/types.d.ts +5625 -2203
- package/dist/models/common/contact-point.d.ts +4 -0
- package/dist/models/common/extension.d.ts +2 -0
- package/dist/models/common/index.d.ts +6 -1
- package/dist/models/common/location.d.ts +5 -0
- package/dist/models/common/organization.d.ts +22 -0
- package/dist/models/common/patient.d.ts +13 -0
- package/dist/models/common/patient.js +1 -0
- package/dist/models/common/practitioner.d.ts +15 -0
- package/dist/models/common/practitioner.js +1 -0
- package/dist/models/common/service-request.d.ts +21 -0
- package/dist/models/common/service-request.js +1 -0
- package/dist/models/common/specimen.d.ts +13 -0
- package/dist/models/common/specimen.js +1 -0
- package/dist/models/common/timing.d.ts +107 -0
- package/dist/models/common/timing.js +1 -0
- package/dist/models/common/value.d.ts +22 -0
- package/dist/models/common/value.js +1 -0
- package/dist/models/health-data/care-plan.d.ts +134 -0
- package/dist/models/health-data/care-plan.js +1 -0
- package/dist/models/health-data/condition.d.ts +102 -0
- package/dist/models/health-data/condition.js +1 -0
- package/dist/models/health-data/immunization.d.ts +149 -0
- package/dist/models/health-data/immunization.js +1 -0
- package/dist/models/health-data/index.d.ts +5 -0
- package/dist/models/health-data/observation.d.ts +100 -0
- package/dist/models/health-data/observation.js +1 -0
- package/dist/models/health-data/procedure.d.ts +77 -0
- package/dist/models/health-data/procedure.js +1 -0
- package/dist/models/search/health-resources.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { CodeableConcept, EntryBundle, HumanName, IdentifiedResourceEntry, Identifier, Location, Meta, Narrative, Organization, Quantity, Reference } from "../common/index.js";
|
|
2
|
+
import { Observation } from "./index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Represents an immunization resource matching GraphQL structure.
|
|
5
|
+
* Based on FHIR Immunization resource with GraphQL-compatible structure.
|
|
6
|
+
*
|
|
7
|
+
* @category Models
|
|
8
|
+
* @title Immunization
|
|
9
|
+
* @excerpt Represents an immunization resource
|
|
10
|
+
*/
|
|
11
|
+
export type Immunization = {
|
|
12
|
+
/** A set of rules under which this content was created */
|
|
13
|
+
resourceType: string | null;
|
|
14
|
+
/** Logical id of this artifact */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Business identifiers for this immunization */
|
|
17
|
+
identifier: (Identifier | null)[] | null;
|
|
18
|
+
/** Metadata about the resource */
|
|
19
|
+
meta: Meta | null;
|
|
20
|
+
/** Text summary of the resource, for human interpretation */
|
|
21
|
+
text: Narrative | null;
|
|
22
|
+
/** Status of the immunization event */
|
|
23
|
+
status: string | null;
|
|
24
|
+
/** Expiration date of vaccine */
|
|
25
|
+
expirationDate: string | null;
|
|
26
|
+
/** Report origin */
|
|
27
|
+
reportOrigin: CodeableConcept | null;
|
|
28
|
+
/** Vaccine administered */
|
|
29
|
+
vaccineCode: CodeableConcept | null;
|
|
30
|
+
/** Reason for the current status */
|
|
31
|
+
statusReason: CodeableConcept | null;
|
|
32
|
+
/** Date vaccine administered */
|
|
33
|
+
occurrenceDateTime: string | null;
|
|
34
|
+
/** Whether the record is from the primary source */
|
|
35
|
+
primarySource: boolean | null;
|
|
36
|
+
/** Dose quantity administered */
|
|
37
|
+
doseQuantity: Quantity | null;
|
|
38
|
+
/** Reactions following immunization */
|
|
39
|
+
reaction: (ImmunizationReaction | null)[] | null;
|
|
40
|
+
/** Protocols applied */
|
|
41
|
+
protocolApplied: (ImmunizationProtocolApplied | null)[] | null;
|
|
42
|
+
/** Manufacturer organization */
|
|
43
|
+
manufacturer: Reference<Organization> | null;
|
|
44
|
+
/** Lot number of vaccine */
|
|
45
|
+
lotNumber: string | null;
|
|
46
|
+
/** Body site of administration */
|
|
47
|
+
site: CodeableConcept | null;
|
|
48
|
+
/** Route of administration */
|
|
49
|
+
route: CodeableConcept | null;
|
|
50
|
+
/** Performer(s) of the immunization */
|
|
51
|
+
performer: (ImmunizationPerformer | null)[] | null;
|
|
52
|
+
/** Location where immunization was given */
|
|
53
|
+
location: Reference<Location> | null;
|
|
54
|
+
/** Reason codes for immunization */
|
|
55
|
+
reasonCode: (CodeableConcept | null)[] | null;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Represents a reaction that occurred as a result of an immunization.
|
|
59
|
+
*
|
|
60
|
+
* @category Models
|
|
61
|
+
* @type ImmunizationReaction
|
|
62
|
+
* @excerpt Immunization Reaction
|
|
63
|
+
*/
|
|
64
|
+
type ImmunizationReaction = {
|
|
65
|
+
/** Date(/time) when the reaction occurred. */
|
|
66
|
+
date: string | null;
|
|
67
|
+
/** Indicates if the reaction was reported. */
|
|
68
|
+
reported: boolean | null;
|
|
69
|
+
/** Reference to the detailed observation of the reaction. */
|
|
70
|
+
detail: Reference<Observation> | null;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Represents a protocol applied during immunization.
|
|
74
|
+
*
|
|
75
|
+
* @category Models
|
|
76
|
+
* @type ImmunizationProtocolApplied
|
|
77
|
+
* @excerpt Immunization Protocol Applied
|
|
78
|
+
*/
|
|
79
|
+
type ImmunizationProtocolApplied = {
|
|
80
|
+
/** Dose number as a string, if available. */
|
|
81
|
+
doseNumberString: string | null;
|
|
82
|
+
/** Dose number as a positive integer, if available. */
|
|
83
|
+
doseNumberPositiveInt: number | null;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Represents a performer of the immunization event.
|
|
87
|
+
*
|
|
88
|
+
* @category Models
|
|
89
|
+
* @type ImmunizationPerformer
|
|
90
|
+
* @excerpt Immunization Performer
|
|
91
|
+
*/
|
|
92
|
+
type ImmunizationPerformer = {
|
|
93
|
+
/** Reference to the actor (practitioner or organization) who performed the immunization. */
|
|
94
|
+
actor: Reference<ImmunizationPerformerActor> | null;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Represents the actor who performed the immunization, which can be a practitioner or an organization.
|
|
98
|
+
*
|
|
99
|
+
* @category Models
|
|
100
|
+
* @type ImmunizationPerformerActor
|
|
101
|
+
* @excerpt Immunization Performer Actor
|
|
102
|
+
*/
|
|
103
|
+
type ImmunizationPerformerActor = ImmunizationPerformerPractitioner | ImmunizationPerformerOrganization;
|
|
104
|
+
/**
|
|
105
|
+
* Represents a practitioner who performed an immunization.
|
|
106
|
+
*
|
|
107
|
+
* @category Models
|
|
108
|
+
* @type ImmunizationPerformerPractitioner
|
|
109
|
+
* @excerpt Immunization Performer Practitioner
|
|
110
|
+
*/
|
|
111
|
+
type ImmunizationPerformerPractitioner = {
|
|
112
|
+
__typename: "Practitioner";
|
|
113
|
+
identifier: (Identifier | null)[] | null;
|
|
114
|
+
name: (HumanName | null)[] | null;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Represents an organization that performed an immunization.
|
|
118
|
+
*
|
|
119
|
+
* @category Models
|
|
120
|
+
* @type ImmunizationPerformerOrganization
|
|
121
|
+
* @excerpt Immunization Performer Organization
|
|
122
|
+
*/
|
|
123
|
+
type ImmunizationPerformerOrganization = {
|
|
124
|
+
/** The GraphQL typename for the organization. */
|
|
125
|
+
__typename: "Organization";
|
|
126
|
+
/** A list of identifiers associated with the organization, or null if none. */
|
|
127
|
+
identifier: (Identifier | null)[] | null;
|
|
128
|
+
/** The name of the organization, or null if not available. */
|
|
129
|
+
organizationName: string | null;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Represents an entry in an immunization bundle.
|
|
133
|
+
* Contains an immunization resource and metadata.
|
|
134
|
+
*
|
|
135
|
+
* @category Models
|
|
136
|
+
* @title ImmunizationEntry
|
|
137
|
+
* @excerpt Represents an entry in an immunization bundle
|
|
138
|
+
*/
|
|
139
|
+
export type ImmunizationResourceEntry = IdentifiedResourceEntry<Immunization>;
|
|
140
|
+
/**
|
|
141
|
+
* Bundle of immunization search results.
|
|
142
|
+
* Contains multiple immunization entries from search operations.
|
|
143
|
+
*
|
|
144
|
+
* @category Models
|
|
145
|
+
* @title ImmunizationBundle
|
|
146
|
+
* @excerpt Bundle of immunization search results
|
|
147
|
+
*/
|
|
148
|
+
export type ImmunizationBundle = EntryBundle<ImmunizationResourceEntry>;
|
|
149
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,3 +13,8 @@ export type { ProcedureGroupBundle, ProcedureGroup, } from "./procedure-group.js
|
|
|
13
13
|
export type { VitalSignGroupBundle, VitalSignGroup, } from "./vital-sign-group.js";
|
|
14
14
|
export type { MedicationGroupBundle, MedicationGroup, } from "./medication-group.js";
|
|
15
15
|
export type { DiagnosticReportLabGroupBundle, DiagnosticReportLabGroup, } from "./diagnostic-report-lab-group.js";
|
|
16
|
+
export type { CarePlanBundle, CarePlan } from "./care-plan.js";
|
|
17
|
+
export { ImmunizationBundle, Immunization } from "./immunization.js";
|
|
18
|
+
export { Observation } from "./observation.js";
|
|
19
|
+
export { ConditionBundle, Condition } from "./condition.js";
|
|
20
|
+
export { ProcedureBundle, Procedure } from "./procedure.js";
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Organization, Patient, Practitioner } from "../common/index.js";
|
|
2
|
+
import { Value } from "../common/value.js";
|
|
3
|
+
import { Annotation, CodeableConcept, Component, HumanName, Identifier, Meta, Narrative, Period, Reference, ReferenceRange, ServiceRequest, Specimen } from "../index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a observation resource.
|
|
6
|
+
*
|
|
7
|
+
* @category Models
|
|
8
|
+
* @title Observation
|
|
9
|
+
* @excerpt Represents an observation resource.
|
|
10
|
+
*/
|
|
11
|
+
export type Observation = Value & {
|
|
12
|
+
/** A set of rules under which this content was created */
|
|
13
|
+
resourceType: string | null;
|
|
14
|
+
/** Logical id of this artifact */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Business identifiers for this observation */
|
|
17
|
+
identifier: (Identifier | null)[] | null;
|
|
18
|
+
/** Metadata about the resource */
|
|
19
|
+
meta: Meta | null;
|
|
20
|
+
/** Text summary of the resource, for human interpretation */
|
|
21
|
+
text: Narrative | null;
|
|
22
|
+
/** Status of the observation */
|
|
23
|
+
status: string | null;
|
|
24
|
+
/** Category of the observation */
|
|
25
|
+
category: (CodeableConcept | null)[] | null;
|
|
26
|
+
/** The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation. */
|
|
27
|
+
subject: Reference<ObservationSubject> | null;
|
|
28
|
+
/** The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified. */
|
|
29
|
+
issued: string | null;
|
|
30
|
+
/** A plan, proposal or order that is fulfilled in whole or in part by this event. For example, a MedicationRequest may require a patient to have laboratory test performed before it is dispensed. */
|
|
31
|
+
basedOn: (Reference<ObservationBasedOn> | null)[] | null;
|
|
32
|
+
/** Describes what was observed. Sometimes this is called the observation "name". */
|
|
33
|
+
code: CodeableConcept | null;
|
|
34
|
+
/** Guidance on how to interpret the value by comparison to a normal or recommended range. Multiple reference ranges are interpreted as an "OR". In other words, to represent two distinct target populations, two `referenceRange` elements would be used. */
|
|
35
|
+
referenceRange: (ReferenceRange | null)[] | null;
|
|
36
|
+
/** A categorical assessment of an observation value. For example, high, low, normal. */
|
|
37
|
+
interpretation: (CodeableConcept | null)[] | null;
|
|
38
|
+
/** Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations */
|
|
39
|
+
component: (ObservationComponent | null)[] | null;
|
|
40
|
+
/** The date and time the observation was made */
|
|
41
|
+
effectiveDateTime: string | null;
|
|
42
|
+
/** The period over which the observation was made */
|
|
43
|
+
effectivePeriod: Period | null;
|
|
44
|
+
/** Comments about the observation or the results. */
|
|
45
|
+
note: (Annotation | null)[] | null;
|
|
46
|
+
/** Who was responsible for asserting the observed value as "true". */
|
|
47
|
+
performer: (Reference<ObservationPerformer> | null)[] | null;
|
|
48
|
+
/** This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group. */
|
|
49
|
+
hasMember: (Reference<ObservationHasMember> | null)[] | null;
|
|
50
|
+
/** The specimen that was used when this observation was made. */
|
|
51
|
+
specimen: Reference<Specimen> | null;
|
|
52
|
+
/** Provides a reason why the expected value in the element Observation.value[x] is missing. */
|
|
53
|
+
dataAbsentReason: CodeableConcept | null;
|
|
54
|
+
};
|
|
55
|
+
export type ObservationBasedOn = ServiceRequest;
|
|
56
|
+
export type ObservationHasMember = ObservationHasMemberObservation;
|
|
57
|
+
/**
|
|
58
|
+
* Represents an Observation that is a member of a group observation.
|
|
59
|
+
*
|
|
60
|
+
* @category Models
|
|
61
|
+
* @type ObservationHasMemberObservation
|
|
62
|
+
* @excerpt Member Observation in Group
|
|
63
|
+
*/
|
|
64
|
+
type ObservationHasMemberObservation = {
|
|
65
|
+
/** Logical id of the member observation. */
|
|
66
|
+
id: string | null;
|
|
67
|
+
/** Code describing the member observation. */
|
|
68
|
+
code: CodeableConcept | null;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Represents the performer of the observation, which can be a practitioner, patient, or organization.
|
|
72
|
+
*
|
|
73
|
+
* @category Models
|
|
74
|
+
* @type ObservationPerformer
|
|
75
|
+
* @excerpt Performer of Observation
|
|
76
|
+
*/
|
|
77
|
+
export type ObservationPerformer = Patient | Practitioner | Organization;
|
|
78
|
+
/**
|
|
79
|
+
* Represents a component observation, combining Value and Component properties.
|
|
80
|
+
*
|
|
81
|
+
* @category Models
|
|
82
|
+
* @type ObservationComponent
|
|
83
|
+
* @excerpt Component Observation
|
|
84
|
+
*/
|
|
85
|
+
type ObservationComponent = Value & Component;
|
|
86
|
+
type ObservationSubject = ObservationSubjectPatient;
|
|
87
|
+
/**
|
|
88
|
+
* Represents a patient who is the subject of the observation.
|
|
89
|
+
*
|
|
90
|
+
* @category Models
|
|
91
|
+
* @type ObservationSubjectPatient
|
|
92
|
+
* @excerpt Subject Patient for Observation
|
|
93
|
+
*/
|
|
94
|
+
type ObservationSubjectPatient = {
|
|
95
|
+
/** The GraphQL typename for the patient. */
|
|
96
|
+
__typename: "Patient";
|
|
97
|
+
/** Name(s) of the patient. */
|
|
98
|
+
name: (HumanName | null)[] | null;
|
|
99
|
+
};
|
|
100
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { EntryBundle, IdentifiedResourceEntry } from "../common/bundle.js";
|
|
2
|
+
import { Annotation, CodeableConcept, Identifier, Location, Meta, Narrative, Organization, Patient, Period, Practitioner, Reference } from "../common/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a clinical procedure performed on a patient.
|
|
5
|
+
*/
|
|
6
|
+
export type Procedure = {
|
|
7
|
+
/** The type of resource. */
|
|
8
|
+
resourceType: "Procedure";
|
|
9
|
+
/** Logical id of the procedure resource. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Identifiers for the procedure. */
|
|
12
|
+
identifier: (Identifier | null)[] | null;
|
|
13
|
+
/** Metadata about the resource. */
|
|
14
|
+
meta: Meta | null;
|
|
15
|
+
/** Text summary of the resource, for human interpretation. */
|
|
16
|
+
text: Narrative | null;
|
|
17
|
+
/** Additional notes or comments about the procedure. */
|
|
18
|
+
note: (Annotation | null)[] | null;
|
|
19
|
+
/** The status of the procedure (e.g., completed, in-progress). */
|
|
20
|
+
status: string | null;
|
|
21
|
+
/** Classification of the procedure (e.g., surgical, diagnostic). */
|
|
22
|
+
category: CodeableConcept | null;
|
|
23
|
+
/** Specific procedure code (e.g., CPT, SNOMED). */
|
|
24
|
+
code: CodeableConcept | null;
|
|
25
|
+
/** Location where the procedure was performed. */
|
|
26
|
+
location: Reference<Location> | null;
|
|
27
|
+
/** Date and time when the procedure was performed. */
|
|
28
|
+
performedDateTime: string | null;
|
|
29
|
+
/** Period during which the procedure was performed. */
|
|
30
|
+
performedPeriod: Period | null;
|
|
31
|
+
/** Free-text description of when the procedure was performed. */
|
|
32
|
+
performedString: string | null;
|
|
33
|
+
/** List of people and organizations who performed the procedure. */
|
|
34
|
+
performer: (ProcedurePerformer | null)[] | null;
|
|
35
|
+
/** Reason codes for why the procedure was performed. */
|
|
36
|
+
reasonCode: (CodeableConcept | null)[] | null;
|
|
37
|
+
/** Anatomical site(s) on the patient where the procedure was performed. */
|
|
38
|
+
bodySite: (CodeableConcept | null)[] | null;
|
|
39
|
+
/** The result or outcome of the procedure. */
|
|
40
|
+
outcome: CodeableConcept | null;
|
|
41
|
+
/** Instructions or follow-up actions after the procedure. */
|
|
42
|
+
followUp: (CodeableConcept | null)[] | null;
|
|
43
|
+
/** Complications that occurred during or after the procedure. */
|
|
44
|
+
complication: (CodeableConcept | null)[] | null;
|
|
45
|
+
/** The patient on whom the procedure was performed. */
|
|
46
|
+
subject: Reference<Patient> | null;
|
|
47
|
+
/** The person who recorded the procedure. */
|
|
48
|
+
recorder: Reference<Patient | Practitioner> | null;
|
|
49
|
+
/** The person who asserted the procedure as having been performed. */
|
|
50
|
+
asserter: Reference<Patient | Practitioner> | null;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Indicates who performed the procedure.
|
|
54
|
+
*
|
|
55
|
+
* @category Models
|
|
56
|
+
* @title ProcedurePerformer
|
|
57
|
+
* @excerpt Indicates organization/practitioner who performed the procedure.
|
|
58
|
+
*/
|
|
59
|
+
export type ProcedurePerformer = {
|
|
60
|
+
actor: Reference<Practitioner | Organization> | null;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Entry in a procedure bundle w. procedure resource and metadata.
|
|
64
|
+
*
|
|
65
|
+
* @category Models
|
|
66
|
+
* @title ProcedureEntry
|
|
67
|
+
* @excerpt Entry in a procedure bundle
|
|
68
|
+
*/
|
|
69
|
+
export type ProcedureEntry = IdentifiedResourceEntry<Procedure>;
|
|
70
|
+
/**
|
|
71
|
+
* Bundle of procedure search results.
|
|
72
|
+
*
|
|
73
|
+
* @category Models
|
|
74
|
+
* @title ProcedureBundle
|
|
75
|
+
* @excerpt Bundle of procedure search results
|
|
76
|
+
*/
|
|
77
|
+
export type ProcedureBundle = EntryBundle<ProcedureEntry>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Coding } from "../common/coding.js";
|
|
2
2
|
import { Endpoint } from "../common/endpoint.js";
|
|
3
|
+
import { SearchResponseOrganization } from "../common/index.js";
|
|
3
4
|
import { Location } from "../common/location.js";
|
|
4
|
-
import { Organization } from "../common/organization.js";
|
|
5
5
|
import { Score } from "../common/score.js";
|
|
6
6
|
import { FilterField } from "../enums/filter-field.js";
|
|
7
7
|
import { Gender } from "../enums/gender.js";
|
|
@@ -44,7 +44,7 @@ export type HealthResource = {
|
|
|
44
44
|
/** Associated locations */
|
|
45
45
|
location: (HealthResourceLocation | null)[] | null;
|
|
46
46
|
/** Associated organizations */
|
|
47
|
-
organization: (
|
|
47
|
+
organization: (SearchResponseOrganization | null)[] | null;
|
|
48
48
|
/** Direct endpoints */
|
|
49
49
|
endpoint: Endpoint[] | null;
|
|
50
50
|
/** Detailed scoring information */
|