@icanbwell/bwell-sdk-ts 1.113.0 → 1.114.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.
- package/dist/__version__.d.ts +1 -1
- package/dist/__version__.js +1 -1
- package/dist/api/base/health-data/health-manager.d.ts +17 -1
- package/dist/api/base/health-data/index.d.ts +2 -0
- package/dist/api/base/health-data/index.js +1 -0
- package/dist/api/base/health-data/upload-document-request.d.ts +36 -0
- package/dist/api/base/health-data/upload-document-request.js +37 -0
- package/dist/api/base/health-data/upload-document-result.d.ts +67 -0
- package/dist/api/base/health-data/upload-document-result.js +1 -0
- package/dist/api/base/support/upload-support-attachment-request.d.ts +0 -1
- package/dist/api/base/support/upload-support-attachment-request.js +5 -4
- package/dist/api/graphql-api/healthdata/graphql-health-manager.d.ts +4 -1
- package/dist/api/graphql-api/healthdata/graphql-health-manager.js +26 -4
- package/dist/api/graphql-api/healthdata/graphql-upload-document-request-factory.d.ts +6 -0
- package/dist/api/graphql-api/healthdata/graphql-upload-document-request-factory.js +37 -0
- package/dist/api/graphql-api/healthdata/graphql-upload-document-response-factory.d.ts +24 -0
- package/dist/api/graphql-api/healthdata/graphql-upload-document-response-factory.js +71 -0
- package/dist/api/graphql-api/user/graphql-user-manager.js +1 -1
- package/dist/graphql/operations/index.d.ts +8 -0
- package/dist/graphql/operations/index.js +30 -0
- package/dist/graphql/operations/types.d.ts +28 -0
- package/dist/graphql/schema.d.ts +7 -0
- package/dist/utils/data-uri-utils.d.ts +46 -0
- package/dist/utils/data-uri-utils.js +74 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
package/dist/__version__.d.ts
CHANGED
package/dist/__version__.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ValidationError } from "../../../errors/index.js";
|
|
1
2
|
import { GetAllergyIntoleranceGroupsQueryResults, GetAllergyIntolerancesQueryResults, GetBinaryQueryResults, GetBodySystemScoreQueryResults, GetCarePlanGroupsQueryResults, GetCarePlansQueryResults, GetCareTeamsQueryResults, GetConditionGroupsQueryResults, GetConditionsQueryResults, GetDeviceMetricsGroupsQueryResults, GetDiagnosticReportLabGroupsQueryResults, GetDiagnosticReportsQueryResults, GetDocumentReferencesListQueryResults, GetDocumentReferencesQueryResults, GetEncounterQueryResults, GetEncountersGroupQueryResults, GetHealthScoreQueryResults, GetHealthSummaryQueryResults, GetImmunizationGroupsQueryResults, GetImmunizationsQueryResults, GetLabGroupsQueryResults, GetLabKnowledgeQueryResults, GetLabsQueryResults, GetMedicationGroupsQueryResults, GetMedicationKnowledgeQueryResults, GetMedicationPricingQueryResults, GetMedicationStatementsQueryResults, GetObservationsQueryResults, GetProcedureGroupsQueryResults, GetProceduresQueryResults, GetVitalSignGroupsQueryResults, UpdateMedicationStatementMutationResults } from "../../../graphql/operations/types.js";
|
|
2
3
|
import { BWellQueryResult, BWellTransactionResult } from "../../../results/index.js";
|
|
3
4
|
import { MedicationDispenseResultsType } from "../../graphql-api/healthdata/graphql-get-medication-dispense-bwell-response-factory.js";
|
|
@@ -9,6 +10,8 @@ import { LabKnowledgeRequest } from "./lab-knowledge-request.js";
|
|
|
9
10
|
import { MedicationKnowledgeRequest } from "./medication-knowledge-request.js";
|
|
10
11
|
import { MedicationPricingRequest } from "./medication-pricing-request.js";
|
|
11
12
|
import { UpdateMedicationStatementRequest } from "./medication-statement-request.js";
|
|
13
|
+
import { UploadDocumentRequest } from "./upload-document-request.js";
|
|
14
|
+
import { UploadDocumentResult } from "./upload-document-result.js";
|
|
12
15
|
type HealthSummaryResultsType = GetHealthSummaryQueryResults["getHealthSummary"];
|
|
13
16
|
export interface HealthSummaryResults extends HealthSummaryResultsType {
|
|
14
17
|
}
|
|
@@ -353,7 +356,20 @@ export interface HealthManager {
|
|
|
353
356
|
* @param {UpdateMedicationStatementRequest} request The request object specifying the medication statement to update and the fields to update.
|
|
354
357
|
* @returns {Promise<BWellQueryResult<UpdateMedicationStatementResult>>} A promise resolving to the result of the update operation.
|
|
355
358
|
*/
|
|
356
|
-
updateMedicationStatement(request: UpdateMedicationStatementRequest): Promise<BWellTransactionResult<UpdateMedicationStatementResult, BaseManagerError>>;
|
|
359
|
+
updateMedicationStatement(request: UpdateMedicationStatementRequest): Promise<BWellTransactionResult<UpdateMedicationStatementResult, ValidationError | BaseManagerError>>;
|
|
360
|
+
/**
|
|
361
|
+
* Uploads a document reference resource (e.g. a member-provided file).
|
|
362
|
+
*
|
|
363
|
+
* The server stamps `category = patient-uploaded` and derives `subject` from
|
|
364
|
+
* the caller's identity; neither can be set by the caller.
|
|
365
|
+
*
|
|
366
|
+
* @category Manager Methods
|
|
367
|
+
* @title uploadDocument
|
|
368
|
+
* @excerpt Upload a member-provided file as a new DocumentReference
|
|
369
|
+
* @param {UploadDocumentRequest} request The request object specifying the file content (as a data URI), title, and type coding.
|
|
370
|
+
* @returns {Promise<BWellTransactionResult<UploadDocumentResult>>} A promise resolving to the result of the upload operation.
|
|
371
|
+
*/
|
|
372
|
+
uploadDocument(request: UploadDocumentRequest): Promise<BWellTransactionResult<UploadDocumentResult, ValidationError | BaseManagerError>>;
|
|
357
373
|
/**
|
|
358
374
|
* Retrieves a list of medication groups resources.
|
|
359
375
|
*
|
|
@@ -4,4 +4,6 @@ export { BodySystemScoreRequest, BodySystemScoreRequestInput, } from "./body-sys
|
|
|
4
4
|
export { MedicationKnowledgeRequest, MedicationKnowledgeRequestInput, } from "./medication-knowledge-request.js";
|
|
5
5
|
export { LabKnowledgeRequest, LabKnowledgeRequestInput, } from "./lab-knowledge-request.js";
|
|
6
6
|
export { UpdateMedicationStatementRequest, UpdateMedicationStatementInput, UpdateMedicationStatementStatus, } from "./medication-statement-request.js";
|
|
7
|
+
export { UploadDocumentRequest, UploadDocumentRequestInput, UploadDocumentTypeCoding, } from "./upload-document-request.js";
|
|
8
|
+
export { UploadDocumentAttachment, UploadDocumentCategory, UploadDocumentContent, UploadDocumentResult, UploadDocumentSubject, } from "./upload-document-result.js";
|
|
7
9
|
export { HealthSummaryResults, HealthScoreResults, BodySystemScoreResults, AllergyIntolerancesResults, AllergyIntolerancesGroupsResults, BinaryResults, ConditionsResults, ConditionGroupsResults, DiagnosticReportsResults, DocumentReferencesResults, DocumentReferencesListResults, LabsResults, LabGroupsResults, CarePlansResults, CarePlanGroupsResults, CareTeamsResults, EncountersResults, EncounterGroupsResults, ImmunizationsResults, ImmunizationGroupsResults, ProceduresResults, ProcedureGroupsResults, VitalSignsResults, VitalSignGroupsResults, DeviceMetricsResults, DeviceMetricsGroupsResults, MedicationDispenseResults, MedicationRequestResults, MedicationStatementsResults, MedicationKnowledgeResults, MedicationGroupsResults, LabKnowledgeResults, HealthManager, MedicationPricingResults, DiagnosticReportLabGroupsResults, UpdateMedicationStatementResult, } from "./health-manager.js";
|
|
@@ -4,3 +4,4 @@ export { BodySystemScoreRequest, } from "./body-system-score-request.js";
|
|
|
4
4
|
export { MedicationKnowledgeRequest, } from "./medication-knowledge-request.js";
|
|
5
5
|
export { LabKnowledgeRequest, } from "./lab-knowledge-request.js";
|
|
6
6
|
export { UpdateMedicationStatementRequest, UpdateMedicationStatementStatus, } from "./medication-statement-request.js";
|
|
7
|
+
export { UploadDocumentRequest, } from "./upload-document-request.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Coding } from "../../../models/coding.js";
|
|
2
|
+
import { ErrorsCollector, ValidationRequest, Validator } from "../../../requests/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* The code — e.g. LOINC — describing what kind of document this is.
|
|
5
|
+
*/
|
|
6
|
+
export type UploadDocumentTypeCoding = Coding;
|
|
7
|
+
/**
|
|
8
|
+
* Input for uploading a document reference.
|
|
9
|
+
* @category Inputs
|
|
10
|
+
* @title UploadDocumentRequestInput
|
|
11
|
+
* @excerpt Input for uploading a member-provided file as a DocumentReference
|
|
12
|
+
*/
|
|
13
|
+
export type UploadDocumentRequestInput = {
|
|
14
|
+
/**
|
|
15
|
+
* The file content as a data URI with base64 encoding and MIME type.
|
|
16
|
+
* Format: data:<MIME-type>;base64,<base64-encoded-data>
|
|
17
|
+
* Example: "data:application/pdf;base64,JVBERi0xLjQKJeLjz9MK..."
|
|
18
|
+
*/
|
|
19
|
+
file: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
typeCoding?: UploadDocumentTypeCoding;
|
|
22
|
+
};
|
|
23
|
+
declare class UploadDocumentRequestValidator implements Validator<UploadDocumentRequestInput> {
|
|
24
|
+
validate(data: UploadDocumentRequestInput, errors: ErrorsCollector): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Request class for uploading a document reference.
|
|
28
|
+
* Validates that the file is provided as a data URI with base64 encoding and a MIME type.
|
|
29
|
+
* @category Requests
|
|
30
|
+
* @title UploadDocumentRequest
|
|
31
|
+
* @excerpt Request object for uploading a document reference with validation
|
|
32
|
+
*/
|
|
33
|
+
export declare class UploadDocumentRequest extends ValidationRequest<UploadDocumentRequestInput> {
|
|
34
|
+
protected validator: UploadDocumentRequestValidator;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
import { isNullOrUndefinedOrEmptyString, MAX_DOCUMENT_DATA_LENGTH, MAX_DOCUMENT_FILE_BYTES, parseDataUri, } from "../../../utils/index.js";
|
|
3
|
+
class UploadDocumentRequestValidator {
|
|
4
|
+
validate(data, errors) {
|
|
5
|
+
if (isNullOrUndefinedOrEmptyString(data.file)) {
|
|
6
|
+
errors.add("File content is required");
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
// Note: the bound is checked against the parsed base64 *payload*
|
|
10
|
+
// length, not `data.file.length` — the raw data URI string also
|
|
11
|
+
// includes the "data:<mime-type>;base64," prefix (and any RFC 2397
|
|
12
|
+
// params baked into the MIME type), whose length varies independently
|
|
13
|
+
// of the actual file content and would otherwise make the bound
|
|
14
|
+
// inconsistent for otherwise-identical file sizes.
|
|
15
|
+
const parsed = parseDataUri(data.file);
|
|
16
|
+
if (parsed === null) {
|
|
17
|
+
errors.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (parsed.data.length > MAX_DOCUMENT_DATA_LENGTH) {
|
|
21
|
+
errors.add(`File content must not exceed ${MAX_DOCUMENT_FILE_BYTES / (1024 * 1024)} MB`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Request class for uploading a document reference.
|
|
27
|
+
* Validates that the file is provided as a data URI with base64 encoding and a MIME type.
|
|
28
|
+
* @category Requests
|
|
29
|
+
* @title UploadDocumentRequest
|
|
30
|
+
* @excerpt Request object for uploading a document reference with validation
|
|
31
|
+
*/
|
|
32
|
+
export class UploadDocumentRequest extends ValidationRequest {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.validator = new UploadDocumentRequestValidator();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Coding } from "../../../models/coding.js";
|
|
2
|
+
/**
|
|
3
|
+
* The coding/text describing what category the uploaded document falls
|
|
4
|
+
* under. The server always stamps `category = patient-uploaded`; callers
|
|
5
|
+
* cannot set this, but may read it back.
|
|
6
|
+
* @category Results
|
|
7
|
+
* @title UploadDocumentCategory
|
|
8
|
+
* @excerpt The server-stamped category on an uploaded document result
|
|
9
|
+
*/
|
|
10
|
+
export type UploadDocumentCategory = {
|
|
11
|
+
coding?: Coding[];
|
|
12
|
+
text?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The subject (patient) the uploaded document is attached to, as derived
|
|
16
|
+
* server-side from the caller's identity.
|
|
17
|
+
* @category Results
|
|
18
|
+
* @title UploadDocumentSubject
|
|
19
|
+
* @excerpt The server-derived patient subject on an uploaded document result
|
|
20
|
+
*/
|
|
21
|
+
export type UploadDocumentSubject = {
|
|
22
|
+
reference?: string;
|
|
23
|
+
display?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The attachment metadata for the uploaded document's content.
|
|
27
|
+
*
|
|
28
|
+
* NOTE: `data` (the base64 file bytes) is deliberately NOT included here —
|
|
29
|
+
* never echo a member's uploaded file bytes back through the SDK. If you're
|
|
30
|
+
* editing the `.graphql` selection set for `uploadDocument` to add fields,
|
|
31
|
+
* read this comment first before adding `data` back to the selection or to
|
|
32
|
+
* this type.
|
|
33
|
+
* @category Results
|
|
34
|
+
* @title UploadDocumentAttachment
|
|
35
|
+
* @excerpt The attachment metadata (no file bytes) on an uploaded document result
|
|
36
|
+
*/
|
|
37
|
+
export type UploadDocumentAttachment = {
|
|
38
|
+
contentType?: string;
|
|
39
|
+
title?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The content entry (attachment wrapper) for the uploaded document.
|
|
43
|
+
* @category Results
|
|
44
|
+
* @title UploadDocumentContent
|
|
45
|
+
* @excerpt The content entry wrapping an uploaded document's attachment
|
|
46
|
+
*/
|
|
47
|
+
export type UploadDocumentContent = {
|
|
48
|
+
attachment?: UploadDocumentAttachment;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* SDK-owned result shape for `uploadDocument`. Unlike most other result
|
|
52
|
+
* types in this SDK, this type is intentionally NOT derived from the
|
|
53
|
+
* generated GraphQL mutation result type (see `health-manager.ts` for the
|
|
54
|
+
* rationale) — it's hand-written so that codegen's `any`-typed scalars
|
|
55
|
+
* never leak through to SDK consumers.
|
|
56
|
+
* @category Results
|
|
57
|
+
* @title UploadDocumentResult
|
|
58
|
+
* @excerpt SDK-owned result shape for the uploadDocument mutation
|
|
59
|
+
*/
|
|
60
|
+
export type UploadDocumentResult = {
|
|
61
|
+
id: string;
|
|
62
|
+
resourceType: string;
|
|
63
|
+
status?: string;
|
|
64
|
+
category?: UploadDocumentCategory[];
|
|
65
|
+
subject?: UploadDocumentSubject;
|
|
66
|
+
content?: UploadDocumentContent[];
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,7 +12,6 @@ export type UploadSupportAttachmentRequestInput = {
|
|
|
12
12
|
fileName: string;
|
|
13
13
|
};
|
|
14
14
|
declare class UploadSupportAttachmentRequestValidator implements Validator<UploadSupportAttachmentRequestInput> {
|
|
15
|
-
private readonly dataURIRegex;
|
|
16
15
|
validate(data: UploadSupportAttachmentRequestInput, errors: ErrorsCollector): void;
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ValidationRequest, } from "../../../requests/index.js";
|
|
2
|
+
import { isDataUri } from "../../../utils/index.js";
|
|
2
3
|
class UploadSupportAttachmentRequestValidator {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.dataURIRegex = /^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/;
|
|
5
|
-
}
|
|
6
4
|
validate(data, errors) {
|
|
7
5
|
if (!data.file.trim()) {
|
|
8
6
|
errors.add("File content is required");
|
|
9
7
|
}
|
|
10
|
-
|
|
8
|
+
// No size bound here, deliberately: unlike UploadDocumentRequest, this
|
|
9
|
+
// request type's server-side cap is unrelated/unknown, so the payload
|
|
10
|
+
// length is left unbounded for support attachments.
|
|
11
|
+
if (data.file.trim() && !isDataUri(data.file)) {
|
|
11
12
|
errors.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)");
|
|
12
13
|
}
|
|
13
14
|
if (!data.fileName.trim()) {
|
|
@@ -10,13 +10,15 @@ import { GraphQLGetDiagnosticReportRequestFactory } from "./graphql-diagnostic-r
|
|
|
10
10
|
import { GraphQLGetMedicationDispenseBWellResponseFactory } from "./graphql-get-medication-dispense-bwell-response-factory.js";
|
|
11
11
|
import { GraphQLGetMedicationRequestBWellResponseFactory } from "./graphql-get-medication-request-bwell-response-factory.js";
|
|
12
12
|
import { GraphqlUpdateMedicationStatementRequestFactory } from "./graphql-update-medication-statement-request-factory.js";
|
|
13
|
+
import { GraphQLUploadDocumentRequestFactory } from "./graphql-upload-document-request-factory.js";
|
|
14
|
+
import { GraphQLUploadDocumentResponseFactory } from "./graphql-upload-document-response-factory.js";
|
|
13
15
|
export type RenameKey<T, OldKey extends string, NewKey extends string> = T extends unknown[] ? RenameKeyInArray<T, OldKey, NewKey> : T extends object ? {
|
|
14
16
|
[K in keyof T as K extends OldKey ? NewKey : K]: RenameKey<T[K], OldKey, NewKey>;
|
|
15
17
|
} : T;
|
|
16
18
|
export type RenameKeyInArray<T extends unknown[], OldKey extends string, NewKey extends string> = Array<RenameKey<T[number], OldKey, NewKey>>;
|
|
17
19
|
export declare class GraphQLHealthManager extends GraphQLManager implements HealthManager {
|
|
18
20
|
#private;
|
|
19
|
-
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider, medicationRequestResponseFactory?: GraphQLGetMedicationRequestBWellResponseFactory, medicationDispenseResponseFactory?: GraphQLGetMedicationDispenseBWellResponseFactory, diagnosticReportRequestFactory?: GraphQLGetDiagnosticReportRequestFactory, updateMedicationStatementRequestFactory?: GraphqlUpdateMedicationStatementRequestFactory);
|
|
21
|
+
constructor(sdk: GraphQLSdk, loggerProvider?: LoggerProvider, medicationRequestResponseFactory?: GraphQLGetMedicationRequestBWellResponseFactory, medicationDispenseResponseFactory?: GraphQLGetMedicationDispenseBWellResponseFactory, diagnosticReportRequestFactory?: GraphQLGetDiagnosticReportRequestFactory, updateMedicationStatementRequestFactory?: GraphqlUpdateMedicationStatementRequestFactory, uploadDocumentRequestFactory?: GraphQLUploadDocumentRequestFactory, uploadDocumentResponseFactory?: GraphQLUploadDocumentResponseFactory);
|
|
20
22
|
getHealthSummary(): Promise<BWellQueryResult<health.HealthSummaryResults, BaseManagerError>>;
|
|
21
23
|
getAllergyIntolerances(request?: health.AllergyIntolerancesRequest): Promise<BWellQueryResult<health.AllergyIntolerancesResults, ValidationError | BaseManagerError>>;
|
|
22
24
|
getAllergyIntoleranceGroups(request?: health.AllergyIntoleranceGroupsRequest): Promise<BWellQueryResult<health.AllergyIntolerancesGroupsResults, ValidationError | BaseManagerError>>;
|
|
@@ -45,6 +47,7 @@ export declare class GraphQLHealthManager extends GraphQLManager implements Heal
|
|
|
45
47
|
getMedicationRequest(request?: health.MedicationRequestRequest): Promise<BWellQueryResult<health.MedicationRequestResults, ValidationError | BaseManagerError>>;
|
|
46
48
|
getMedicationStatements(request?: health.MedicationStatementsRequest): Promise<BWellQueryResult<health.MedicationStatementsResults, ValidationError | BaseManagerError>>;
|
|
47
49
|
updateMedicationStatement(request: health.UpdateMedicationStatementRequest): Promise<BWellTransactionResult<health.UpdateMedicationStatementResult, ValidationError | BaseManagerError>>;
|
|
50
|
+
uploadDocument(request: health.UploadDocumentRequest): Promise<BWellTransactionResult<health.UploadDocumentResult, ValidationError | BaseManagerError>>;
|
|
48
51
|
getMedicationGroups(request?: health.MedicationGroupsRequest): Promise<BWellQueryResult<health.MedicationGroupsResults, ValidationError | BaseManagerError>>;
|
|
49
52
|
getMedicationKnowledge(request: health.MedicationKnowledgeRequest): Promise<BWellQueryResult<health.MedicationKnowledgeResults, ValidationError | BaseManagerError>>;
|
|
50
53
|
getLabKnowledge(request: health.LabKnowledgeRequest): Promise<BWellQueryResult<health.LabKnowledgeResults, ValidationError | BaseManagerError>>;
|
|
@@ -18,7 +18,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
18
18
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
19
19
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
20
20
|
};
|
|
21
|
-
var _GraphQLHealthManager_sdk, _GraphQLHealthManager_logger, _GraphQLHealthManager_medicationRequestResponseFactory, _GraphQLHealthManager_medicationDispenseResponseFactory, _GraphQLHealthManager_diagnosticReportRequestFactory, _GraphQLHealthManager_updateMedicationStatementRequestFactory;
|
|
21
|
+
var _GraphQLHealthManager_sdk, _GraphQLHealthManager_logger, _GraphQLHealthManager_medicationRequestResponseFactory, _GraphQLHealthManager_medicationDispenseResponseFactory, _GraphQLHealthManager_diagnosticReportRequestFactory, _GraphQLHealthManager_updateMedicationStatementRequestFactory, _GraphQLHealthManager_uploadDocumentRequestFactory, _GraphQLHealthManager_uploadDocumentResponseFactory;
|
|
22
22
|
import { ObservationCategory } from "../../../graphql/schema.js";
|
|
23
23
|
import { ConsoleLoggerProvider, } from "../../../logger/index.js";
|
|
24
24
|
import { BWellQueryResult, BWellTransactionResult, } from "../../../results/index.js";
|
|
@@ -27,8 +27,10 @@ import { GraphQLGetDiagnosticReportRequestFactory } from "./graphql-diagnostic-r
|
|
|
27
27
|
import { GraphQLGetMedicationDispenseBWellResponseFactory } from "./graphql-get-medication-dispense-bwell-response-factory.js";
|
|
28
28
|
import { GraphQLGetMedicationRequestBWellResponseFactory } from "./graphql-get-medication-request-bwell-response-factory.js";
|
|
29
29
|
import { GraphqlUpdateMedicationStatementRequestFactory } from "./graphql-update-medication-statement-request-factory.js";
|
|
30
|
+
import { GraphQLUploadDocumentRequestFactory } from "./graphql-upload-document-request-factory.js";
|
|
31
|
+
import { GraphQLUploadDocumentResponseFactory } from "./graphql-upload-document-response-factory.js";
|
|
30
32
|
export class GraphQLHealthManager extends GraphQLManager {
|
|
31
|
-
constructor(sdk, loggerProvider = new ConsoleLoggerProvider(), medicationRequestResponseFactory = new GraphQLGetMedicationRequestBWellResponseFactory(), medicationDispenseResponseFactory = new GraphQLGetMedicationDispenseBWellResponseFactory(), diagnosticReportRequestFactory = new GraphQLGetDiagnosticReportRequestFactory(), updateMedicationStatementRequestFactory = new GraphqlUpdateMedicationStatementRequestFactory()) {
|
|
33
|
+
constructor(sdk, loggerProvider = new ConsoleLoggerProvider(), medicationRequestResponseFactory = new GraphQLGetMedicationRequestBWellResponseFactory(), medicationDispenseResponseFactory = new GraphQLGetMedicationDispenseBWellResponseFactory(), diagnosticReportRequestFactory = new GraphQLGetDiagnosticReportRequestFactory(), updateMedicationStatementRequestFactory = new GraphqlUpdateMedicationStatementRequestFactory(), uploadDocumentRequestFactory = new GraphQLUploadDocumentRequestFactory(), uploadDocumentResponseFactory = new GraphQLUploadDocumentResponseFactory()) {
|
|
32
34
|
super();
|
|
33
35
|
_GraphQLHealthManager_sdk.set(this, void 0);
|
|
34
36
|
_GraphQLHealthManager_logger.set(this, void 0);
|
|
@@ -36,12 +38,16 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
36
38
|
_GraphQLHealthManager_medicationDispenseResponseFactory.set(this, void 0);
|
|
37
39
|
_GraphQLHealthManager_diagnosticReportRequestFactory.set(this, void 0);
|
|
38
40
|
_GraphQLHealthManager_updateMedicationStatementRequestFactory.set(this, void 0);
|
|
41
|
+
_GraphQLHealthManager_uploadDocumentRequestFactory.set(this, void 0);
|
|
42
|
+
_GraphQLHealthManager_uploadDocumentResponseFactory.set(this, void 0);
|
|
39
43
|
__classPrivateFieldSet(this, _GraphQLHealthManager_sdk, sdk, "f");
|
|
40
44
|
__classPrivateFieldSet(this, _GraphQLHealthManager_logger, loggerProvider.getLogger("GraphQLHealthManager"), "f");
|
|
41
45
|
__classPrivateFieldSet(this, _GraphQLHealthManager_medicationRequestResponseFactory, medicationRequestResponseFactory, "f");
|
|
42
46
|
__classPrivateFieldSet(this, _GraphQLHealthManager_medicationDispenseResponseFactory, medicationDispenseResponseFactory, "f");
|
|
43
47
|
__classPrivateFieldSet(this, _GraphQLHealthManager_diagnosticReportRequestFactory, diagnosticReportRequestFactory, "f");
|
|
44
48
|
__classPrivateFieldSet(this, _GraphQLHealthManager_updateMedicationStatementRequestFactory, updateMedicationStatementRequestFactory, "f");
|
|
49
|
+
__classPrivateFieldSet(this, _GraphQLHealthManager_uploadDocumentRequestFactory, uploadDocumentRequestFactory, "f");
|
|
50
|
+
__classPrivateFieldSet(this, _GraphQLHealthManager_uploadDocumentResponseFactory, uploadDocumentResponseFactory, "f");
|
|
45
51
|
}
|
|
46
52
|
getHealthSummary() {
|
|
47
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -528,12 +534,28 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
528
534
|
const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").updateMedicationStatement(__classPrivateFieldGet(this, _GraphQLHealthManager_updateMedicationStatementRequestFactory, "f").create(request)));
|
|
529
535
|
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("updateMedicationStatement complete");
|
|
530
536
|
if (result.failure()) {
|
|
531
|
-
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("updateMedicationStatement failed", result.error);
|
|
537
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("updateMedicationStatement failed", result.error());
|
|
532
538
|
return result.intoFailure();
|
|
533
539
|
}
|
|
534
540
|
return BWellTransactionResult.success(result.data().updateMedicationStatement);
|
|
535
541
|
});
|
|
536
542
|
}
|
|
543
|
+
uploadDocument(request) {
|
|
544
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
545
|
+
const validationResult = this.validateRequest(request);
|
|
546
|
+
if (validationResult.failure()) {
|
|
547
|
+
return validationResult.intoFailure();
|
|
548
|
+
}
|
|
549
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("calling uploadDocument mutation...");
|
|
550
|
+
const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLHealthManager_sdk, "f").UploadDocument(__classPrivateFieldGet(this, _GraphQLHealthManager_uploadDocumentRequestFactory, "f").create(request)));
|
|
551
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").verbose("uploadDocument mutation complete");
|
|
552
|
+
if (result.failure()) {
|
|
553
|
+
__classPrivateFieldGet(this, _GraphQLHealthManager_logger, "f").error("uploadDocument mutation failed", result.error());
|
|
554
|
+
return result.intoFailure();
|
|
555
|
+
}
|
|
556
|
+
return BWellTransactionResult.success(__classPrivateFieldGet(this, _GraphQLHealthManager_uploadDocumentResponseFactory, "f").create(result.data().uploadDocument));
|
|
557
|
+
});
|
|
558
|
+
}
|
|
537
559
|
getMedicationGroups(request) {
|
|
538
560
|
return __awaiter(this, void 0, void 0, function* () {
|
|
539
561
|
var _a, _b;
|
|
@@ -653,4 +675,4 @@ export class GraphQLHealthManager extends GraphQLManager {
|
|
|
653
675
|
});
|
|
654
676
|
}
|
|
655
677
|
}
|
|
656
|
-
_GraphQLHealthManager_sdk = new WeakMap(), _GraphQLHealthManager_logger = new WeakMap(), _GraphQLHealthManager_medicationRequestResponseFactory = new WeakMap(), _GraphQLHealthManager_medicationDispenseResponseFactory = new WeakMap(), _GraphQLHealthManager_diagnosticReportRequestFactory = new WeakMap(), _GraphQLHealthManager_updateMedicationStatementRequestFactory = new WeakMap();
|
|
678
|
+
_GraphQLHealthManager_sdk = new WeakMap(), _GraphQLHealthManager_logger = new WeakMap(), _GraphQLHealthManager_medicationRequestResponseFactory = new WeakMap(), _GraphQLHealthManager_medicationDispenseResponseFactory = new WeakMap(), _GraphQLHealthManager_diagnosticReportRequestFactory = new WeakMap(), _GraphQLHealthManager_updateMedicationStatementRequestFactory = new WeakMap(), _GraphQLHealthManager_uploadDocumentRequestFactory = new WeakMap(), _GraphQLHealthManager_uploadDocumentResponseFactory = new WeakMap();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UploadDocumentMutationVariables } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { RequestFactory } from "../../../requests/index.js";
|
|
3
|
+
import { UploadDocumentRequest } from "../../base/health-data/upload-document-request.js";
|
|
4
|
+
export declare class GraphQLUploadDocumentRequestFactory implements RequestFactory<UploadDocumentRequest, UploadDocumentMutationVariables> {
|
|
5
|
+
create(request: UploadDocumentRequest): UploadDocumentMutationVariables;
|
|
6
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ValidationError } from "../../../errors/index.js";
|
|
2
|
+
import { parseDataUri } from "../../../utils/index.js";
|
|
3
|
+
export class GraphQLUploadDocumentRequestFactory {
|
|
4
|
+
create(request) {
|
|
5
|
+
const data = request.data();
|
|
6
|
+
const parsed = parseDataUri(data.file);
|
|
7
|
+
// The request validator (`UploadDocumentRequestValidator`) rejects a
|
|
8
|
+
// malformed `data.file` before a `BWellTransactionResult` is returned
|
|
9
|
+
// to the caller — but nothing stops a caller from constructing this
|
|
10
|
+
// factory directly against an unvalidated `UploadDocumentRequest`, or
|
|
11
|
+
// ignoring a failed `validate()` result. Falling back to empty strings
|
|
12
|
+
// here would silently send an empty/garbage payload to the server
|
|
13
|
+
// instead of failing loudly, so treat a `null` parse as an explicit
|
|
14
|
+
// error rather than a non-null assertion.
|
|
15
|
+
if (parsed === null) {
|
|
16
|
+
throw new ValidationError([
|
|
17
|
+
"File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)",
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
const contentType = parsed.contentType;
|
|
21
|
+
const base64Data = parsed.data;
|
|
22
|
+
return {
|
|
23
|
+
input: {
|
|
24
|
+
data: base64Data,
|
|
25
|
+
contentType,
|
|
26
|
+
title: data.title,
|
|
27
|
+
typeCoding: data.typeCoding !== undefined
|
|
28
|
+
? {
|
|
29
|
+
system: data.typeCoding.system,
|
|
30
|
+
code: data.typeCoding.code,
|
|
31
|
+
display: data.typeCoding.display,
|
|
32
|
+
}
|
|
33
|
+
: undefined,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UploadDocumentMutationResults } from "../../../graphql/operations/types.js";
|
|
2
|
+
import { UploadDocumentResult } from "../../base/health-data/upload-document-result.js";
|
|
3
|
+
/**
|
|
4
|
+
* Codegen's shape for the raw `uploadDocument` mutation result, i.e. the
|
|
5
|
+
* value of `result.data().uploadDocument` in `GraphQLHealthManager`.
|
|
6
|
+
*/
|
|
7
|
+
export type UploadDocumentMutationResultsType = UploadDocumentMutationResults["uploadDocument"];
|
|
8
|
+
/**
|
|
9
|
+
* Factory to map the raw GraphQL `uploadDocument` mutation result into the
|
|
10
|
+
* SDK-owned `UploadDocumentResult` shape. Unlike the query-side response
|
|
11
|
+
* factories in this directory (e.g.
|
|
12
|
+
* `GraphQLGetMedicationDispenseBWellResponseFactory`), this factory doesn't
|
|
13
|
+
* wrap/unwrap a `BWellQueryResult` — `uploadDocument` is a transaction, so
|
|
14
|
+
* by the time this factory runs, `result.data().uploadDocument` is already
|
|
15
|
+
* the unwrapped mutation payload. Each field is mapped explicitly by name
|
|
16
|
+
* (no spread), so codegen's `any`-typed scalars never leak through to SDK
|
|
17
|
+
* consumers.
|
|
18
|
+
* @category Factories
|
|
19
|
+
* @title GraphQLUploadDocumentResponseFactory
|
|
20
|
+
* @excerpt Maps the raw uploadDocument mutation result into UploadDocumentResult
|
|
21
|
+
*/
|
|
22
|
+
export declare class GraphQLUploadDocumentResponseFactory {
|
|
23
|
+
create(result: UploadDocumentMutationResultsType): UploadDocumentResult;
|
|
24
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ValidationError } from "../../../errors/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Factory to map the raw GraphQL `uploadDocument` mutation result into the
|
|
4
|
+
* SDK-owned `UploadDocumentResult` shape. Unlike the query-side response
|
|
5
|
+
* factories in this directory (e.g.
|
|
6
|
+
* `GraphQLGetMedicationDispenseBWellResponseFactory`), this factory doesn't
|
|
7
|
+
* wrap/unwrap a `BWellQueryResult` — `uploadDocument` is a transaction, so
|
|
8
|
+
* by the time this factory runs, `result.data().uploadDocument` is already
|
|
9
|
+
* the unwrapped mutation payload. Each field is mapped explicitly by name
|
|
10
|
+
* (no spread), so codegen's `any`-typed scalars never leak through to SDK
|
|
11
|
+
* consumers.
|
|
12
|
+
* @category Factories
|
|
13
|
+
* @title GraphQLUploadDocumentResponseFactory
|
|
14
|
+
* @excerpt Maps the raw uploadDocument mutation result into UploadDocumentResult
|
|
15
|
+
*/
|
|
16
|
+
export class GraphQLUploadDocumentResponseFactory {
|
|
17
|
+
create(result) {
|
|
18
|
+
var _a, _b, _c, _d, _e;
|
|
19
|
+
// `id` and `resourceType` are `required` on `UploadDocumentResult` — a
|
|
20
|
+
// persisted document always has both, so a `null`/`undefined` value
|
|
21
|
+
// here means the server response was malformed, not that the field is
|
|
22
|
+
// legitimately absent. Fail loudly instead of smuggling a `null` into a
|
|
23
|
+
// field the type promises is a `string`.
|
|
24
|
+
if (result.id === null || result.id === undefined) {
|
|
25
|
+
throw new ValidationError([
|
|
26
|
+
"uploadDocument response is missing required field: id",
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
if (result.resourceType === null || result.resourceType === undefined) {
|
|
30
|
+
throw new ValidationError([
|
|
31
|
+
"uploadDocument response is missing required field: resourceType",
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
id: result.id,
|
|
36
|
+
resourceType: result.resourceType,
|
|
37
|
+
status: (_a = result.status) !== null && _a !== void 0 ? _a : undefined,
|
|
38
|
+
category: (_b = result.category) === null || _b === void 0 ? void 0 : _b.map((category) => {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
return ({
|
|
41
|
+
coding: (_a = category === null || category === void 0 ? void 0 : category.coding) === null || _a === void 0 ? void 0 : _a.map((coding) => {
|
|
42
|
+
var _a;
|
|
43
|
+
return ({
|
|
44
|
+
system: coding === null || coding === void 0 ? void 0 : coding.system,
|
|
45
|
+
code: coding === null || coding === void 0 ? void 0 : coding.code,
|
|
46
|
+
display: (_a = coding === null || coding === void 0 ? void 0 : coding.display) !== null && _a !== void 0 ? _a : undefined,
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
text: (_b = category === null || category === void 0 ? void 0 : category.text) !== null && _b !== void 0 ? _b : undefined,
|
|
50
|
+
});
|
|
51
|
+
}),
|
|
52
|
+
subject: result.subject
|
|
53
|
+
? {
|
|
54
|
+
reference: (_c = result.subject.reference) !== null && _c !== void 0 ? _c : undefined,
|
|
55
|
+
display: (_d = result.subject.display) !== null && _d !== void 0 ? _d : undefined,
|
|
56
|
+
}
|
|
57
|
+
: undefined,
|
|
58
|
+
content: (_e = result.content) === null || _e === void 0 ? void 0 : _e.map((content) => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
return ({
|
|
61
|
+
attachment: (content === null || content === void 0 ? void 0 : content.attachment)
|
|
62
|
+
? {
|
|
63
|
+
contentType: (_a = content.attachment.contentType) !== null && _a !== void 0 ? _a : undefined,
|
|
64
|
+
title: (_b = content.attachment.title) !== null && _b !== void 0 ? _b : undefined,
|
|
65
|
+
}
|
|
66
|
+
: undefined,
|
|
67
|
+
});
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -76,7 +76,7 @@ export class GraphQLUserManager extends GraphQLManager {
|
|
|
76
76
|
const result = yield this.handleTransaction(__classPrivateFieldGet(this, _GraphQLUserManager_sdk, "f").delete());
|
|
77
77
|
__classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").verbose("delete complete");
|
|
78
78
|
if (result.failure()) {
|
|
79
|
-
__classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").error("delete failed", result.error);
|
|
79
|
+
__classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").error("delete failed", result.error());
|
|
80
80
|
return result.intoFailure();
|
|
81
81
|
}
|
|
82
82
|
__classPrivateFieldGet(this, _GraphQLUserManager_logger, "f").info("successfully called delete");
|
|
@@ -147,6 +147,7 @@ export declare const GetProcedureGroupsDocument = "\n query getProcedureGroup
|
|
|
147
147
|
export declare const GetProceduresDocument = "\n query GetProcedures($request: ProcedureRequest) {\n getProcedures(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n resourceType\n identifier {\n ...IdentifierFields\n }\n location {\n ...LocationFields\n }\n subject {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n }\n recorder {\n ...RecorderFields\n }\n asserter {\n ...AsserterFields\n }\n text {\n ...NarrativeFields\n }\n code {\n ...CodeableConceptFields\n }\n category {\n ...CodeableConceptFields\n }\n meta {\n ...MetaFields\n }\n performedDateTime\n performedPeriod {\n ...PeriodFields\n }\n performedString\n performer {\n ...PerformerFields\n }\n encounter {\n ...EncounterFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n outcome {\n ...CodeableConceptFields\n }\n followUp {\n ...CodeableConceptFields\n }\n complication {\n ...CodeableConceptFields\n }\n note {\n authorString\n time\n text\n }\n status {\n code\n display\n }\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment LocationFields on Location {\n name\n identifier {\n ...IdentifierFields\n }\n alias\n description\n address {\n ...AddressFields\n }\n position {\n lat\n lon\n }\n distanceInMiles\n telecom {\n ...ContactPointFields\n }\n type {\n ...CodeableConceptFields\n }\n status\n managingOrganization {\n ...LocationManagingOrganizationReferenceFields\n }\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment AddressFields on Address {\n use\n type\n text\n line\n city\n district\n state\n postalCode\n country\n}\n \n\n fragment ContactPointFields on ContactPoint {\n id\n system\n value\n use\n rank\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment LocationManagingOrganizationReferenceFields on LocationManagingOrganizationReference {\n id\n reference\n identifier {\n ...IdentifierFields\n }\n display\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment AsserterFields on Asserter {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment NarrativeFields on Narrative {\n div\n status\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment PerformerFields on Performer {\n actor {\n ...ActorFields\n }\n}\n \n fragment ActorFields on Actor {\n __typename\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Organization {\n organizationName: name\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment EncounterFields on EncounterResource {\n meta {\n ...MetaFields\n }\n id\n resourceType\n text {\n ...NarrativeFields\n }\n encounterLocations: locations {\n location {\n ...LocationFields\n }\n status\n physicalType {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n }\n identifier {\n ...IdentifierFields\n }\n type {\n ...CodeableConceptFields\n }\n status {\n display\n code\n }\n participant {\n ...ParticipantFields\n }\n period {\n ...PeriodFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n class {\n system\n code\n display\n }\n location {\n ...LocationFields\n }\n serviceProvider {\n name\n endpoint {\n name\n status\n connectionType {\n system\n code\n display\n }\n address\n }\n }\n subject {\n id\n name {\n ...HumanNameFields\n }\n gender\n birthDate\n communication {\n language {\n ...CodeableConceptFields\n }\n }\n }\n reasonReference {\n ...ConditionFields\n }\n hospitalization {\n dischargeDisposition {\n ...CodeableConceptFields\n }\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment NarrativeFields on Narrative {\n div\n status\n}\n \n\n fragment LocationFields on Location {\n name\n identifier {\n ...IdentifierFields\n }\n alias\n description\n address {\n ...AddressFields\n }\n position {\n lat\n lon\n }\n distanceInMiles\n telecom {\n ...ContactPointFields\n }\n type {\n ...CodeableConceptFields\n }\n status\n managingOrganization {\n ...LocationManagingOrganizationReferenceFields\n }\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment AddressFields on Address {\n use\n type\n text\n line\n city\n district\n state\n postalCode\n country\n}\n \n\n fragment ContactPointFields on ContactPoint {\n id\n system\n value\n use\n rank\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment LocationManagingOrganizationReferenceFields on LocationManagingOrganizationReference {\n id\n reference\n identifier {\n ...IdentifierFields\n }\n display\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ParticipantFields on Participant {\n individual {\n id\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n type {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ConditionFields on ConditionResource {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n ";
|
|
148
148
|
export declare const GetVitalSignGroupsDocument = "\n query getVitalSignGroups($request: VitalSignGroupQueryRequest) {\n getVitalSignGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n source\n sourceDisplay\n category {\n ...CodeableConceptFields\n }\n coding {\n ...CodingFields\n }\n effectiveDateTime\n interpretation {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n component {\n ...ComponentFields\n }\n references\n effectiveDateTime\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment ComponentFields on Component {\n code {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n dataAbsentReason {\n ...CodeableConceptFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n ";
|
|
149
149
|
export declare const GetVitalSignsDocument = "\n query getVitalSigns($request: VitalSignRequest) {\n getVitalSigns(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n ...ObservationFields\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment ObservationFields on ObservationResource {\n id\n meta {\n ...MetaFields\n }\n resourceType\n text {\n ...NarrativeFields\n }\n identifier {\n ...IdentifierFields\n }\n subject {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n }\n issued\n basedOn {\n ...ObservationBasedOnFields\n }\n code {\n ...CodeableConceptFields\n }\n category {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n component {\n ...ComponentFields\n }\n effectiveDateTime\n effectivePeriod {\n ...PeriodFields\n }\n note {\n authorString\n time\n text\n }\n encounter {\n ...EncounterFields\n }\n performer {\n ...PerformerFields\n }\n hasMember {\n ... on ObservationResource {\n id\n code {\n ...CodeableConceptFields\n }\n }\n }\n specimen {\n ...SpecimenResourceFields\n }\n status {\n display\n code\n }\n dataAbsentReason {\n ...CodeableConceptFields\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment NarrativeFields on Narrative {\n div\n status\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ObservationBasedOnFields on ObservationBasedOn {\n ... on ServiceRequest {\n resourceType\n id\n reasonCode {\n ...CodeableConceptFields\n }\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment ComponentFields on Component {\n code {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n dataAbsentReason {\n ...CodeableConceptFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment EncounterFields on EncounterResource {\n meta {\n ...MetaFields\n }\n id\n resourceType\n text {\n ...NarrativeFields\n }\n encounterLocations: locations {\n location {\n ...LocationFields\n }\n status\n physicalType {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n }\n identifier {\n ...IdentifierFields\n }\n type {\n ...CodeableConceptFields\n }\n status {\n display\n code\n }\n participant {\n ...ParticipantFields\n }\n period {\n ...PeriodFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n class {\n system\n code\n display\n }\n location {\n ...LocationFields\n }\n serviceProvider {\n name\n endpoint {\n name\n status\n connectionType {\n system\n code\n display\n }\n address\n }\n }\n subject {\n id\n name {\n ...HumanNameFields\n }\n gender\n birthDate\n communication {\n language {\n ...CodeableConceptFields\n }\n }\n }\n reasonReference {\n ...ConditionFields\n }\n hospitalization {\n dischargeDisposition {\n ...CodeableConceptFields\n }\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment NarrativeFields on Narrative {\n div\n status\n}\n \n\n fragment LocationFields on Location {\n name\n identifier {\n ...IdentifierFields\n }\n alias\n description\n address {\n ...AddressFields\n }\n position {\n lat\n lon\n }\n distanceInMiles\n telecom {\n ...ContactPointFields\n }\n type {\n ...CodeableConceptFields\n }\n status\n managingOrganization {\n ...LocationManagingOrganizationReferenceFields\n }\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment AddressFields on Address {\n use\n type\n text\n line\n city\n district\n state\n postalCode\n country\n}\n \n\n fragment ContactPointFields on ContactPoint {\n id\n system\n value\n use\n rank\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment LocationManagingOrganizationReferenceFields on LocationManagingOrganizationReference {\n id\n reference\n identifier {\n ...IdentifierFields\n }\n display\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ParticipantFields on Participant {\n individual {\n id\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n type {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ConditionFields on ConditionResource {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment PerformerFields on Performer {\n actor {\n ...ActorFields\n }\n}\n \n fragment ActorFields on Actor {\n __typename\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Organization {\n organizationName: name\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment SpecimenResourceFields on SpecimenResource {\n identifier {\n ...IdentifierFields\n }\n accessionIdentifier {\n ...IdentifierFields\n }\n type {\n ...CodeableConceptFields\n }\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
|
|
150
|
+
export declare const UploadDocumentDocument = "\n mutation UploadDocument($input: CreateDocumentReferenceInput!) {\n uploadDocument: createDocumentReference(input: $input) {\n id\n resourceType\n status\n category {\n coding {\n code\n system\n display\n }\n text\n }\n subject {\n reference\n display\n }\n content {\n attachment {\n contentType\n title\n }\n }\n }\n}\n ";
|
|
150
151
|
export declare const GetLabGroupsDocument = "\n query getLabGroups($request: LabGroupQueryRequest) {\n getLabGroups(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n id\n name\n source\n sourceDisplay\n category {\n ...CodeableConceptFields\n }\n coding {\n ...CodingFields\n }\n effectiveDateTime\n referenceRange {\n ...ReferenceRangeFields\n }\n value {\n ...ValueFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n component {\n ...ComponentFields\n }\n references\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ComponentFields on Component {\n code {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n dataAbsentReason {\n ...CodeableConceptFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n ";
|
|
151
152
|
export declare const GetLabKnowledgeDocument = "\n query getLabKnowledge($request: LabKnowledgeRequest) {\n getLabKnowledge(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n content\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n ";
|
|
152
153
|
export declare const GetLabsDocument = "\n query getLabs($request: LabRequest) {\n getLabs(request: $request) {\n paging_info {\n ...PagingFields\n }\n resources {\n ...ObservationFields\n }\n }\n}\n \n fragment PagingFields on PagingResults {\n page_number\n page_size\n total_pages\n total_items\n}\n \n\n fragment ObservationFields on ObservationResource {\n id\n meta {\n ...MetaFields\n }\n resourceType\n text {\n ...NarrativeFields\n }\n identifier {\n ...IdentifierFields\n }\n subject {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n }\n issued\n basedOn {\n ...ObservationBasedOnFields\n }\n code {\n ...CodeableConceptFields\n }\n category {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n component {\n ...ComponentFields\n }\n effectiveDateTime\n effectivePeriod {\n ...PeriodFields\n }\n note {\n authorString\n time\n text\n }\n encounter {\n ...EncounterFields\n }\n performer {\n ...PerformerFields\n }\n hasMember {\n ... on ObservationResource {\n id\n code {\n ...CodeableConceptFields\n }\n }\n }\n specimen {\n ...SpecimenResourceFields\n }\n status {\n display\n code\n }\n dataAbsentReason {\n ...CodeableConceptFields\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment NarrativeFields on Narrative {\n div\n status\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ObservationBasedOnFields on ObservationBasedOn {\n ... on ServiceRequest {\n resourceType\n id\n reasonCode {\n ...CodeableConceptFields\n }\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment ComponentFields on Component {\n code {\n ...CodeableConceptFields\n }\n value {\n ...ValueFields\n }\n referenceRange {\n ...ReferenceRangeFields\n }\n interpretation {\n ...CodeableConceptFields\n }\n dataAbsentReason {\n ...CodeableConceptFields\n }\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ValueFields on Value {\n valueQuantity {\n ...QuantityFields\n }\n valueCodeableConcept {\n ...CodeableConceptFields\n }\n valueString\n valueBoolean\n valueInteger\n valueRatio {\n ...RatioFields\n }\n valueRange {\n ...RangeFields\n }\n valueTime\n valueDateTime\n valuePeriod {\n ...PeriodFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RatioFields on Ratio {\n numerator {\n ...QuantityFields\n }\n denominator {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment RangeFields on Range {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment ReferenceRangeFields on ReferenceRange {\n low {\n ...QuantityFields\n }\n high {\n ...QuantityFields\n }\n text\n}\n \n fragment QuantityFields on Quantity {\n value\n unit\n code\n comparator\n system\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment EncounterFields on EncounterResource {\n meta {\n ...MetaFields\n }\n id\n resourceType\n text {\n ...NarrativeFields\n }\n encounterLocations: locations {\n location {\n ...LocationFields\n }\n status\n physicalType {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n }\n identifier {\n ...IdentifierFields\n }\n type {\n ...CodeableConceptFields\n }\n status {\n display\n code\n }\n participant {\n ...ParticipantFields\n }\n period {\n ...PeriodFields\n }\n reasonCode {\n ...CodeableConceptFields\n }\n class {\n system\n code\n display\n }\n location {\n ...LocationFields\n }\n serviceProvider {\n name\n endpoint {\n name\n status\n connectionType {\n system\n code\n display\n }\n address\n }\n }\n subject {\n id\n name {\n ...HumanNameFields\n }\n gender\n birthDate\n communication {\n language {\n ...CodeableConceptFields\n }\n }\n }\n reasonReference {\n ...ConditionFields\n }\n hospitalization {\n dischargeDisposition {\n ...CodeableConceptFields\n }\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment NarrativeFields on Narrative {\n div\n status\n}\n \n\n fragment LocationFields on Location {\n name\n identifier {\n ...IdentifierFields\n }\n alias\n description\n address {\n ...AddressFields\n }\n position {\n lat\n lon\n }\n distanceInMiles\n telecom {\n ...ContactPointFields\n }\n type {\n ...CodeableConceptFields\n }\n status\n managingOrganization {\n ...LocationManagingOrganizationReferenceFields\n }\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment AddressFields on Address {\n use\n type\n text\n line\n city\n district\n state\n postalCode\n country\n}\n \n\n fragment ContactPointFields on ContactPoint {\n id\n system\n value\n use\n rank\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment LocationManagingOrganizationReferenceFields on LocationManagingOrganizationReference {\n id\n reference\n identifier {\n ...IdentifierFields\n }\n display\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment ParticipantFields on Participant {\n individual {\n id\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n type {\n ...CodeableConceptFields\n }\n period {\n ...PeriodFields\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment ConditionFields on ConditionResource {\n id\n meta {\n ...MetaFields\n }\n code {\n ...CodeableConceptFields\n }\n clinicalStatus {\n ...CodeableConceptFields\n }\n onsetDateTime\n recordedDate\n recorder {\n ...RecorderFields\n }\n note {\n authorString\n time\n text\n }\n onsetPeriod {\n ...PeriodFields\n }\n abatementDateTime\n abatementPeriod {\n ...PeriodFields\n }\n category {\n ...CodeableConceptFields\n }\n severity {\n ...CodeableConceptFields\n }\n verificationStatus {\n ...CodeableConceptFields\n }\n bodySite {\n ...CodeableConceptFields\n }\n}\n \n fragment MetaFields on Meta {\n versionId\n lastUpdated\n source\n security {\n ...CodingFields\n }\n tag {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment RecorderFields on Recorder {\n __typename\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment PeriodFields on Period {\n start\n end\n}\n \n\n fragment PerformerFields on Performer {\n actor {\n ...ActorFields\n }\n}\n \n fragment ActorFields on Actor {\n __typename\n ... on Practitioner {\n name {\n ...HumanNameFields\n }\n identifier {\n ...IdentifierFields\n }\n }\n ... on Patient {\n name {\n ...HumanNameFields\n }\n }\n ... on Organization {\n organizationName: name\n }\n}\n \n fragment HumanNameFields on HumanName {\n text\n family\n given\n prefix\n suffix\n}\n \n\n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment SpecimenResourceFields on SpecimenResource {\n identifier {\n ...IdentifierFields\n }\n accessionIdentifier {\n ...IdentifierFields\n }\n type {\n ...CodeableConceptFields\n }\n}\n \n fragment IdentifierFields on Identifier {\n id\n type {\n ...CodeableConceptFields\n }\n system\n value\n}\n \n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n \n\n fragment CodeableConceptFields on CodeableConcept {\n text\n coding {\n ...CodingFields\n }\n}\n \n fragment CodingFields on Coding {\n system\n code\n display\n}\n ";
|
|
@@ -565,6 +566,13 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
565
566
|
headers: Headers;
|
|
566
567
|
status: number;
|
|
567
568
|
}>;
|
|
569
|
+
UploadDocument(variables: Types.UploadDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
|
|
570
|
+
data: Types.UploadDocumentMutationResults;
|
|
571
|
+
errors?: GraphQLError[];
|
|
572
|
+
extensions?: any;
|
|
573
|
+
headers: Headers;
|
|
574
|
+
status: number;
|
|
575
|
+
}>;
|
|
568
576
|
getLabGroups(variables?: Types.GetLabGroupsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<{
|
|
569
577
|
data: Types.GetLabGroupsQueryResults;
|
|
570
578
|
errors?: GraphQLError[];
|
|
@@ -3722,6 +3722,33 @@ export const GetVitalSignsDocument = `
|
|
|
3722
3722
|
}
|
|
3723
3723
|
${PagingFieldsFragmentDoc}
|
|
3724
3724
|
${ObservationFieldsFragmentDoc}`;
|
|
3725
|
+
export const UploadDocumentDocument = `
|
|
3726
|
+
mutation UploadDocument($input: CreateDocumentReferenceInput!) {
|
|
3727
|
+
uploadDocument: createDocumentReference(input: $input) {
|
|
3728
|
+
id
|
|
3729
|
+
resourceType
|
|
3730
|
+
status
|
|
3731
|
+
category {
|
|
3732
|
+
coding {
|
|
3733
|
+
code
|
|
3734
|
+
system
|
|
3735
|
+
display
|
|
3736
|
+
}
|
|
3737
|
+
text
|
|
3738
|
+
}
|
|
3739
|
+
subject {
|
|
3740
|
+
reference
|
|
3741
|
+
display
|
|
3742
|
+
}
|
|
3743
|
+
content {
|
|
3744
|
+
attachment {
|
|
3745
|
+
contentType
|
|
3746
|
+
title
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
`;
|
|
3725
3752
|
export const GetLabGroupsDocument = `
|
|
3726
3753
|
query getLabGroups($request: LabGroupQueryRequest) {
|
|
3727
3754
|
getLabGroups(request: $request) {
|
|
@@ -5464,6 +5491,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
5464
5491
|
getVitalSigns(variables, requestHeaders) {
|
|
5465
5492
|
return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetVitalSignsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getVitalSigns', 'query', variables);
|
|
5466
5493
|
},
|
|
5494
|
+
UploadDocument(variables, requestHeaders) {
|
|
5495
|
+
return withWrapper((wrappedRequestHeaders) => client.rawRequest(UploadDocumentDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'UploadDocument', 'mutation', variables);
|
|
5496
|
+
},
|
|
5467
5497
|
getLabGroups(variables, requestHeaders) {
|
|
5468
5498
|
return withWrapper((wrappedRequestHeaders) => client.rawRequest(GetLabGroupsDocument, variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getLabGroups', 'query', variables);
|
|
5469
5499
|
},
|
|
@@ -19473,6 +19473,34 @@ export type GetVitalSignsQueryResults = {
|
|
|
19473
19473
|
}>;
|
|
19474
19474
|
};
|
|
19475
19475
|
};
|
|
19476
|
+
export type UploadDocumentMutationVariables = Types.Exact<{
|
|
19477
|
+
input: Types.CreateDocumentReferenceInput;
|
|
19478
|
+
}>;
|
|
19479
|
+
export type UploadDocumentMutationResults = {
|
|
19480
|
+
uploadDocument: {
|
|
19481
|
+
id: string | null;
|
|
19482
|
+
resourceType: string | null;
|
|
19483
|
+
status: string | null;
|
|
19484
|
+
category: Array<{
|
|
19485
|
+
text: string | null;
|
|
19486
|
+
coding: Array<{
|
|
19487
|
+
system: any | null;
|
|
19488
|
+
code: any | null;
|
|
19489
|
+
display: string | null;
|
|
19490
|
+
} | null> | null;
|
|
19491
|
+
} | null> | null;
|
|
19492
|
+
subject: {
|
|
19493
|
+
reference: string | null;
|
|
19494
|
+
display: string | null;
|
|
19495
|
+
} | null;
|
|
19496
|
+
content: Array<{
|
|
19497
|
+
attachment: {
|
|
19498
|
+
contentType: string | null;
|
|
19499
|
+
title: string | null;
|
|
19500
|
+
} | null;
|
|
19501
|
+
} | null> | null;
|
|
19502
|
+
};
|
|
19503
|
+
};
|
|
19476
19504
|
export type GetLabGroupsQueryVariables = Types.Exact<{
|
|
19477
19505
|
request: Types.InputMaybe<Types.LabGroupQueryRequest>;
|
|
19478
19506
|
}>;
|
package/dist/graphql/schema.d.ts
CHANGED
|
@@ -2982,6 +2982,12 @@ export type Fhir_Extension = {
|
|
|
2982
2982
|
url?: Maybe<Scalars['String']['output']>;
|
|
2983
2983
|
valueString?: Maybe<Scalars['String']['output']>;
|
|
2984
2984
|
};
|
|
2985
|
+
export type FaqType = {
|
|
2986
|
+
__typename?: 'FaqType';
|
|
2987
|
+
answer: Scalars['String']['output'];
|
|
2988
|
+
question: Scalars['String']['output'];
|
|
2989
|
+
sequence?: Maybe<Scalars['Int']['output']>;
|
|
2990
|
+
};
|
|
2985
2991
|
export type FeatureFlag = {
|
|
2986
2992
|
__typename?: 'FeatureFlag';
|
|
2987
2993
|
id: Scalars['String']['output'];
|
|
@@ -6030,6 +6036,7 @@ export type ProviderLocation = {
|
|
|
6030
6036
|
description?: Maybe<Scalars['String']['output']>;
|
|
6031
6037
|
distanceInMiles?: Maybe<Scalars['Float']['output']>;
|
|
6032
6038
|
facilityId?: Maybe<Scalars['String']['output']>;
|
|
6039
|
+
faqs?: Maybe<Array<FaqType>>;
|
|
6033
6040
|
hoursOfOperation?: Maybe<Array<Maybe<HoursOfOperationType>>>;
|
|
6034
6041
|
identifier?: Maybe<Array<Maybe<ProviderIdentifier>>>;
|
|
6035
6042
|
name?: Maybe<Scalars['String']['output']>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parsed parts of a data URI: the MIME type (including any RFC 2397
|
|
3
|
+
* parameters, e.g. `text/plain;charset=utf-8`) and the base64 payload.
|
|
4
|
+
* @category Utils
|
|
5
|
+
* @title DataUriParts
|
|
6
|
+
* @excerpt The parsed MIME type and base64 payload of a data URI
|
|
7
|
+
*/
|
|
8
|
+
export type DataUriParts = {
|
|
9
|
+
contentType: string;
|
|
10
|
+
data: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Checks whether a string is a well-formed base64 data URI with a non-empty
|
|
14
|
+
* payload.
|
|
15
|
+
*
|
|
16
|
+
* @category Utils
|
|
17
|
+
* @title isDataUri
|
|
18
|
+
* @excerpt Checks whether a string is a well-formed base64 data URI
|
|
19
|
+
* @param {string} value - The string to test.
|
|
20
|
+
* @returns {boolean} True if `value` matches the data URI format.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isDataUri(value: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Parses a data URI into its MIME type and base64 payload.
|
|
25
|
+
*
|
|
26
|
+
* @category Utils
|
|
27
|
+
* @title parseDataUri
|
|
28
|
+
* @excerpt Parses a data URI into its MIME type and base64 payload
|
|
29
|
+
* @param {string} value - The string to parse.
|
|
30
|
+
* @returns {DataUriParts | null} The parsed parts, or `null` if `value` is
|
|
31
|
+
* not a well-formed base64 data URI.
|
|
32
|
+
*/
|
|
33
|
+
export declare function parseDataUri(value: string): DataUriParts | null;
|
|
34
|
+
/**
|
|
35
|
+
* Provisional cap on an uploaded document's raw (decoded) file size, pending
|
|
36
|
+
* confirmation of the exact server-side limit from health-data-service#934.
|
|
37
|
+
* 10 MiB of raw file leaves headroom under both a 15 MB and a 15 MiB
|
|
38
|
+
* server-side base64 cap.
|
|
39
|
+
*/
|
|
40
|
+
export declare const MAX_DOCUMENT_FILE_BYTES: number;
|
|
41
|
+
/**
|
|
42
|
+
* The maximum length of the base64-encoded `data` payload corresponding to
|
|
43
|
+
* `MAX_DOCUMENT_FILE_BYTES` of raw file content (base64 expands 3 raw bytes
|
|
44
|
+
* into 4 encoded characters, rounded up to the nearest 4-character group).
|
|
45
|
+
*/
|
|
46
|
+
export declare const MAX_DOCUMENT_DATA_LENGTH: number;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared data URI parsing/validation for the SDK's upload request types
|
|
3
|
+
* (`UploadDocumentRequest`, `UploadSupportAttachmentRequest`). Previously
|
|
4
|
+
* each request type carried its own copy of this regex; this file is the
|
|
5
|
+
* single source of truth.
|
|
6
|
+
*
|
|
7
|
+
* Pattern notes:
|
|
8
|
+
* - Group 1 (`contentType`) uses the RFC 6838 "restricted-name" charset for
|
|
9
|
+
* the MIME type and subtype (`ALPHA / DIGIT / "!" / "#" / "$" / "&" / "^"
|
|
10
|
+
* / "_" / "." / "+" / "-"`), which is broader than a plain `[a-zA-Z0-9-.+]`
|
|
11
|
+
* match — it now also accepts `_`, `!`, `#`, `$`, `&`, and `^`.
|
|
12
|
+
* - RFC 2397 `;attribute=value` parameters (e.g. `;charset=utf-8`) are
|
|
13
|
+
* captured as part of group 1 (`contentType`) rather than stripped out,
|
|
14
|
+
* since FHIR's `Attachment.contentType` legitimately carries params like
|
|
15
|
+
* `charset` and callers expect the full string back.
|
|
16
|
+
* - Group 2 (`data`) requires one or more base64 characters (`+`, not `*`)
|
|
17
|
+
* before the optional `=`/`==` padding, so a data URI with an empty
|
|
18
|
+
* payload (e.g. `data:image/png;base64,`) is rejected instead of
|
|
19
|
+
* silently accepted.
|
|
20
|
+
*
|
|
21
|
+
* Deliberate non-goals (not bugs):
|
|
22
|
+
* - The literal `base64` token must be lowercase, matching prior behavior.
|
|
23
|
+
* `data:image/png;BASE64,...` is rejected.
|
|
24
|
+
* - RFC 2045 quoted-string parameter values (e.g. `;charset="utf-8"`) are
|
|
25
|
+
* not supported — only unquoted `token` values are.
|
|
26
|
+
*/
|
|
27
|
+
const DATA_URI_REGEX = /^data:([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*(?:;[A-Za-z0-9!#$&^_.+-]+=[A-Za-z0-9!#$&^_.+-]+)*);base64,([A-Za-z0-9+/]+={0,2})$/;
|
|
28
|
+
/**
|
|
29
|
+
* Checks whether a string is a well-formed base64 data URI with a non-empty
|
|
30
|
+
* payload.
|
|
31
|
+
*
|
|
32
|
+
* @category Utils
|
|
33
|
+
* @title isDataUri
|
|
34
|
+
* @excerpt Checks whether a string is a well-formed base64 data URI
|
|
35
|
+
* @param {string} value - The string to test.
|
|
36
|
+
* @returns {boolean} True if `value` matches the data URI format.
|
|
37
|
+
*/
|
|
38
|
+
export function isDataUri(value) {
|
|
39
|
+
return DATA_URI_REGEX.test(value);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parses a data URI into its MIME type and base64 payload.
|
|
43
|
+
*
|
|
44
|
+
* @category Utils
|
|
45
|
+
* @title parseDataUri
|
|
46
|
+
* @excerpt Parses a data URI into its MIME type and base64 payload
|
|
47
|
+
* @param {string} value - The string to parse.
|
|
48
|
+
* @returns {DataUriParts | null} The parsed parts, or `null` if `value` is
|
|
49
|
+
* not a well-formed base64 data URI.
|
|
50
|
+
*/
|
|
51
|
+
export function parseDataUri(value) {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
const match = DATA_URI_REGEX.exec(value);
|
|
54
|
+
if (match === null) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
contentType: (_a = match[1]) !== null && _a !== void 0 ? _a : "",
|
|
59
|
+
data: (_b = match[2]) !== null && _b !== void 0 ? _b : "",
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Provisional cap on an uploaded document's raw (decoded) file size, pending
|
|
64
|
+
* confirmation of the exact server-side limit from health-data-service#934.
|
|
65
|
+
* 10 MiB of raw file leaves headroom under both a 15 MB and a 15 MiB
|
|
66
|
+
* server-side base64 cap.
|
|
67
|
+
*/
|
|
68
|
+
export const MAX_DOCUMENT_FILE_BYTES = 10 * 1024 * 1024;
|
|
69
|
+
/**
|
|
70
|
+
* The maximum length of the base64-encoded `data` payload corresponding to
|
|
71
|
+
* `MAX_DOCUMENT_FILE_BYTES` of raw file content (base64 expands 3 raw bytes
|
|
72
|
+
* into 4 encoded characters, rounded up to the nearest 4-character group).
|
|
73
|
+
*/
|
|
74
|
+
export const MAX_DOCUMENT_DATA_LENGTH = Math.ceil(MAX_DOCUMENT_FILE_BYTES / 3) * 4;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED