@medplum/core 4.5.1 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +7 -7
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +1159 -1149
- package/dist/esm/index.d.ts +1159 -1149
- package/dist/esm/index.mjs +7 -7
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +3 -3
package/dist/esm/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import type { HumanName } from '@medplum/fhirtypes';
|
|
|
26
26
|
import type { Identifier } from '@medplum/fhirtypes';
|
|
27
27
|
import type { ImagingStudy } from '@medplum/fhirtypes';
|
|
28
28
|
import type { Media } from '@medplum/fhirtypes';
|
|
29
|
+
import type { Meta } from '@medplum/fhirtypes';
|
|
29
30
|
import type { Money } from '@medplum/fhirtypes';
|
|
30
31
|
import type { Observation } from '@medplum/fhirtypes';
|
|
31
32
|
import type { ObservationComponent } from '@medplum/fhirtypes';
|
|
@@ -1057,6 +1058,13 @@ export declare const ExternalSecretSystems: {
|
|
|
1057
1058
|
readonly aws_ssm_parameter_store: "aws_ssm_parameter_store";
|
|
1058
1059
|
};
|
|
1059
1060
|
|
|
1061
|
+
/**
|
|
1062
|
+
* Normalizes Medplum's `meta.account` and `meta.accounts` into a singular array of FHIR references.
|
|
1063
|
+
* @param meta - The `meta` object of a FHIR resource.
|
|
1064
|
+
* @returns An array of references, or `undefined` if none.
|
|
1065
|
+
*/
|
|
1066
|
+
export declare function extractAccountReferences(meta: Meta | undefined): Reference[] | undefined;
|
|
1067
|
+
|
|
1060
1068
|
/**
|
|
1061
1069
|
* Fetches the latest Medplum release version string.
|
|
1062
1070
|
* @param appName - The name of the app to fetch the latest version for.
|
|
@@ -5026,6 +5034,7 @@ export declare interface MedplumInfraConfig {
|
|
|
5026
5034
|
[key: string]: string;
|
|
5027
5035
|
};
|
|
5028
5036
|
}[];
|
|
5037
|
+
containerRegistryCredentialsSecretArn?: string;
|
|
5029
5038
|
/** @deprecated Use containerInsightsV2 instead */
|
|
5030
5039
|
containerInsights?: boolean;
|
|
5031
5040
|
containerInsightsV2?: 'enabled' | 'disabled' | 'enhanced';
|
|
@@ -5182,6 +5191,7 @@ export declare interface MedplumSourceInfraConfig {
|
|
|
5182
5191
|
[key: string]: ValueOrExternalSecret<string>;
|
|
5183
5192
|
};
|
|
5184
5193
|
}[];
|
|
5194
|
+
containerRegistryCredentialsSecretArn?: ValueOrExternalSecret<string>;
|
|
5185
5195
|
/** @deprecated Use containerInsightsV2 instead */
|
|
5186
5196
|
containerInsights?: ValueOrExternalSecret<boolean>;
|
|
5187
5197
|
containerInsightsV2?: ValueOrExternalSecret<'enabled' | 'disabled' | 'enhanced'>;
|
|
@@ -5605,1152 +5615,1152 @@ export declare class ParserBuilder {
|
|
|
5605
5615
|
* Parses a reference and returns a tuple of [ResourceType, ID].
|
|
5606
5616
|
* @param reference - A reference to a FHIR resource.
|
|
5607
5617
|
* @returns A tuple containing the `ResourceType` and the ID of the resource.
|
|
5608
|
-
* @throws {OperationOutcomeError} If the reference cannot be parsed.
|
|
5609
|
-
|
|
5610
|
-
export declare function parseReference<T extends Resource>(reference: Reference<T> | undefined): [T['resourceType'], string];
|
|
5611
|
-
|
|
5612
|
-
/**
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
export declare function parseSearchRequest<T extends Resource = Resource>(url: T['resourceType'] | URL | string, query?: Record<string, string[] | string | undefined>): SearchRequest<T>;
|
|
5619
|
-
|
|
5620
|
-
/**
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
export declare function parseStructureDefinition(sd: StructureDefinition): InternalTypeSchema;
|
|
5628
|
-
|
|
5629
|
-
/**
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
export declare function parseXFhirQuery(query: string, variables: Record<string, TypedValue>): SearchRequest;
|
|
5647
|
-
|
|
5648
|
-
/**
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
export declare interface PatchOperation {
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
}
|
|
5657
|
-
|
|
5658
|
-
export declare type PendingSubscriptionRequest = Omit<SubscriptionRequest, 'endpoint'>;
|
|
5659
|
-
|
|
5660
|
-
/**
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
export declare function preciseEquals(a: number, b: number, precision?: number): boolean;
|
|
5668
|
-
|
|
5669
|
-
/**
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
export declare function preciseGreaterThan(a: number, b: number, precision?: number): boolean;
|
|
5677
|
-
|
|
5678
|
-
/**
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
export declare function preciseGreaterThanOrEquals(a: number, b: number, precision?: number): boolean;
|
|
5686
|
-
|
|
5687
|
-
/**
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
export declare function preciseLessThan(a: number, b: number, precision?: number): boolean;
|
|
5695
|
-
|
|
5696
|
-
/**
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
export declare function preciseLessThanOrEquals(a: number, b: number, precision?: number): boolean;
|
|
5704
|
-
|
|
5705
|
-
/**
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
export declare function preciseRound(a: number, precision: number): number;
|
|
5712
|
-
|
|
5713
|
-
export declare const preconditionFailed: OperationOutcome;
|
|
5714
|
-
|
|
5715
|
-
export declare abstract class PrefixOperatorAtom implements Atom {
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
}
|
|
5722
|
-
|
|
5723
|
-
export declare interface PrefixParselet {
|
|
5724
|
-
|
|
5725
|
-
}
|
|
5726
|
-
|
|
5727
|
-
export declare type ProfileResource = Patient | Practitioner | RelatedPerson;
|
|
5728
|
-
|
|
5729
|
-
/**
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
export declare const projectAdminResourceTypes: string[];
|
|
5734
|
-
|
|
5735
|
-
/**
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
export declare const PropertyType: {
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
};
|
|
5801
|
-
|
|
5802
|
-
/**
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
export declare const protectedResourceTypes: string[];
|
|
5807
|
-
|
|
5808
|
-
export declare type ProtocolsProvider = null | string | string[];
|
|
5809
|
-
|
|
5810
|
-
export declare interface PushToAgentOptions extends MedplumRequestOptions {
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
}
|
|
5816
|
-
|
|
5817
|
-
export declare type QuantityUnit = Pick<Quantity, 'unit' | 'code' | 'system'>;
|
|
5818
|
-
|
|
5819
|
-
/**
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
export declare type QueryTypes = URLSearchParams | string[][] | Record<string, string | number | boolean | undefined> | string | undefined;
|
|
5830
|
-
|
|
5831
|
-
export declare type RateLimitInfo = {
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
};
|
|
5836
|
-
|
|
5837
|
-
/**
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
export declare class ReadablePromise<T> implements Promise<T> {
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
}
|
|
5888
|
-
|
|
5889
|
-
export declare interface ReadHistoryOptions {
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
}
|
|
5893
|
-
|
|
5894
|
-
export declare const readInteractions: AccessPolicyInteraction[];
|
|
5895
|
-
|
|
5896
|
-
export declare class ReconnectingWebSocket<WS extends IWebSocket = WebSocket> extends TypedEventTarget<WebSocketEventMap_2> implements IReconnectingWebSocket {
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
}
|
|
6007
|
-
|
|
6008
|
-
export declare function redirect(url: URL): OperationOutcome;
|
|
6009
|
-
|
|
6010
|
-
export declare type ReleaseManifest = {
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
};
|
|
6017
|
-
|
|
6018
|
-
/**
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
export declare function removeDuplicates(arr: TypedValue[]): TypedValue[];
|
|
6024
|
-
|
|
6025
|
-
/**
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
export declare function removeProfileFromResource<T extends Resource = Resource>(resource: T, profileUrl: string): T;
|
|
6032
|
-
|
|
6033
|
-
/**
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
export declare function reorderBundle(bundle: Bundle): Bundle;
|
|
6044
|
-
|
|
6045
|
-
export declare interface RequestProfileSchemaOptions {
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
}
|
|
6049
|
-
|
|
6050
|
-
/**
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
export declare function resolveId(input: Reference | Resource | undefined): string | undefined;
|
|
6056
|
-
|
|
6057
|
-
/**
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
export declare type ResourceArray<T extends Resource = Resource> = T[] & {
|
|
6063
|
-
|
|
6064
|
-
};
|
|
6065
|
-
|
|
6066
|
-
export declare type ResourceMatchesSubscriptionCriteria = {
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
};
|
|
6073
|
-
|
|
6074
|
-
export declare function resourceMatchesSubscriptionCriteria({ resource, subscription, context, getPreviousResource, logger, }: ResourceMatchesSubscriptionCriteria): Promise<boolean>;
|
|
6075
|
-
|
|
6076
|
-
export declare type ResourceWithCode = Resource & Code;
|
|
6077
|
-
|
|
6078
|
-
export declare const RXNORM = "http://www.nlm.nih.gov/research/umls/rxnorm";
|
|
6079
|
-
|
|
6080
|
-
export declare type SamplingInfo = Omit<SampledData, 'data'>;
|
|
6081
|
-
|
|
6082
|
-
/**
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
export declare function satisfiedAccessPolicy(resource: Resource, interaction: AccessPolicyInteraction, accessPolicy: AccessPolicy | undefined): AccessPolicyResource | undefined;
|
|
6090
|
-
|
|
6091
|
-
export declare interface SearchableToken {
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
}
|
|
6095
|
-
|
|
6096
|
-
export declare interface SearchParameterDetails {
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
}
|
|
6102
|
-
|
|
6103
|
-
export declare const SearchParameterType: {
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
};
|
|
6115
|
-
|
|
6116
|
-
export declare type SearchParameterType = (typeof SearchParameterType)[keyof typeof SearchParameterType];
|
|
6117
|
-
|
|
6118
|
-
export declare interface SearchRequest<T extends Resource = Resource> {
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
}
|
|
6135
|
-
|
|
6136
|
-
/**
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
export declare interface SelectionStructure {
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
}
|
|
6150
|
-
|
|
6151
|
-
/**
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
export declare function serializeError(error: Error, depth?: number, maxDepth?: number): Record<string, any>;
|
|
6159
|
-
|
|
6160
|
-
/**
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
export declare function serializeFhircastSubscriptionRequest(subscriptionRequest: SubscriptionRequest | PendingSubscriptionRequest): string;
|
|
6167
|
-
|
|
6168
|
-
export declare function serverError(err: Error): OperationOutcome;
|
|
6169
|
-
|
|
6170
|
-
export declare function serverTimeout(msg?: string): OperationOutcome;
|
|
6171
|
-
|
|
6172
|
-
/**
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
export declare function setCodeBySystem(concept: CodeableConcept, system: string, code: string): void;
|
|
6179
|
-
|
|
6180
|
-
/**
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
export declare function setIdentifier(resource: Resource & {
|
|
6196
|
-
|
|
6197
|
-
}, system: string, value: string): void;
|
|
6198
|
-
|
|
6199
|
-
export declare function singleton(collection: TypedValue[], type?: string): TypedValue | undefined;
|
|
6200
|
-
|
|
6201
|
-
export declare function singularize<T>(value: T | T[] | undefined): T | undefined;
|
|
6202
|
-
|
|
6203
|
-
/**
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
export declare const sleep: (ms: number) => Promise<void>;
|
|
6209
|
-
|
|
6210
|
-
export declare interface SliceDefinition extends Omit<InternalSchemaElement, 'slicing'> {
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
}
|
|
6215
|
-
|
|
6216
|
-
export declare type SliceDefinitionWithTypes = SliceDefinition & {
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
};
|
|
6220
|
-
|
|
6221
|
-
export declare interface SliceDiscriminator {
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
}
|
|
6225
|
-
|
|
6226
|
-
export declare interface SlicingRules {
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
}
|
|
6232
|
-
|
|
6233
|
-
export declare const SNOMED = "http://snomed.info/sct";
|
|
6234
|
-
|
|
6235
|
-
export declare interface SortRule {
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
}
|
|
6239
|
-
|
|
6240
|
-
/**
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
export declare function sortStringArray(array: string[]): string[];
|
|
6249
|
-
|
|
6250
|
-
/**
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
export declare function splitN(str: string, delim: string, n: number): string[];
|
|
6260
|
-
|
|
6261
|
-
/**
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
export declare function splitSearchOnComma(input: string): string[];
|
|
6271
|
-
|
|
6272
|
-
export declare type StatsFn = (data: number[]) => number | Quantity;
|
|
6273
|
-
|
|
6274
|
-
/**
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
export declare function streamToBuffer(stream: Readable): Promise<Buffer>;
|
|
6280
|
-
|
|
6281
|
-
/**
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
export declare function stringify(value: any, pretty?: boolean): string;
|
|
6298
|
-
|
|
6299
|
-
/**
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
export declare function stringifyTypedValue(v: TypedValue): string;
|
|
6305
|
-
|
|
6306
|
-
export declare type StringMap = {
|
|
6307
|
-
|
|
6308
|
-
};
|
|
6309
|
-
|
|
6310
|
-
/**
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[], transformMaps?: TransformMapCollection): TypedValue[];
|
|
6321
|
-
|
|
6322
|
-
export declare interface SubManagerOptions {
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
}
|
|
6328
|
-
|
|
6329
|
-
/**
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
export declare class SubscriptionEmitter extends TypedEventTarget<SubscriptionEventMap> {
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
}
|
|
6359
|
-
|
|
6360
|
-
export declare type SubscriptionEventMap = {
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
};
|
|
6392
|
-
|
|
6393
|
-
export declare class SubscriptionManager {
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
}
|
|
6423
|
-
|
|
6424
|
-
/**
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
export declare type SubscriptionRequest = {
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
};
|
|
6436
|
-
|
|
6437
|
-
/**
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
export declare function subsetResource<T extends Resource>(resource: T | undefined, properties: string[]): T | undefined;
|
|
6446
|
-
|
|
6447
|
-
/**
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
export declare function summarizeObservations(observations: Observation[] | Bundle<Observation>, summaryCode: CodeableConcept, summarizeFn: StatsFn): Observation;
|
|
6457
|
-
|
|
6458
|
-
export declare class SymbolAtom implements Atom {
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
}
|
|
6466
|
-
|
|
6467
|
-
/**
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
export declare function toJsBoolean(obj: TypedValue[]): boolean;
|
|
6475
|
-
|
|
6476
|
-
export declare interface Token extends Marker {
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
}
|
|
6480
|
-
|
|
6481
|
-
export declare class Tokenizer {
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
}
|
|
6513
|
-
|
|
6514
|
-
export declare interface TokenizerOptions {
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
}
|
|
6518
|
-
|
|
6519
|
-
export declare interface TokenResponse {
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
}
|
|
6528
|
-
|
|
6529
|
-
export declare interface TokensContext {
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
}
|
|
6533
|
-
|
|
6534
|
-
export declare const tooManyRequests: OperationOutcome;
|
|
6535
|
-
|
|
6536
|
-
/**
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
export declare function toPeriod(input: unknown): Period | undefined;
|
|
6542
|
-
|
|
6543
|
-
/**
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
export declare function toTypedValue(value: unknown): TypedValue;
|
|
6549
|
-
|
|
6550
|
-
/**
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
export declare class TransformMapCollection {
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
}
|
|
6560
|
-
|
|
6561
|
-
/**
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
export declare function trimTrailingEmptyElements<T>(arr: T[] | undefined): T[] | undefined;
|
|
6570
|
-
|
|
6571
|
-
export declare function tryGetDataType(type: string, profileUrl?: string): InternalTypeSchema | undefined;
|
|
6572
|
-
|
|
6573
|
-
/**
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
export declare function tryGetJwtExpiration(token: string): number | undefined;
|
|
6579
|
-
|
|
6580
|
-
export declare function tryGetProfile(profileUrl: string): InternalTypeSchema | undefined;
|
|
6581
|
-
|
|
6582
|
-
export declare class TypedEventTarget<TEvents extends Record<string, Event_2>> {
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
}
|
|
6589
|
-
|
|
6590
|
-
export declare interface TypedValue {
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
}
|
|
6594
|
-
|
|
6595
|
-
/**
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
export declare function typedValueToString(typedValue: TypedValue | undefined): string;
|
|
6601
|
-
|
|
6602
|
-
export declare type TypedValueWithPath = TypedValue & {
|
|
6603
|
-
|
|
6604
|
-
};
|
|
6605
|
-
|
|
6606
|
-
/**
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
export declare interface TypeInfo {
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
}
|
|
6619
|
-
|
|
6620
|
-
export declare type TypeName<T> = T extends string ? 'string' : T extends number ? 'number' : T extends boolean ? 'boolean' : T extends undefined ? 'undefined' : 'object';
|
|
6621
|
-
|
|
6622
|
-
export declare const UCUM = "http://unitsofmeasure.org";
|
|
6623
|
-
|
|
6624
|
-
export declare class UnaryOperatorAtom extends PrefixOperatorAtom {
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
}
|
|
6630
|
-
|
|
6631
|
-
export declare const unauthorized: OperationOutcome;
|
|
6632
|
-
|
|
6633
|
-
export declare const unauthorizedTokenAudience: OperationOutcome;
|
|
6634
|
-
|
|
6635
|
-
export declare const unauthorizedTokenExpired: OperationOutcome;
|
|
6636
|
-
|
|
6637
|
-
export declare class UnionAtom extends InfixOperatorAtom {
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
}
|
|
6641
|
-
|
|
6642
|
-
export declare const VALID_HOSTNAME_REGEX: RegExp;
|
|
6643
|
-
|
|
6644
|
-
/**
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
export declare function validateFhircastSubscriptionRequest(subscriptionRequest: SubscriptionRequest | PendingSubscriptionRequest): boolean;
|
|
6651
|
-
|
|
6652
|
-
export declare function validateResource(resource: Resource, options?: ValidatorOptions): OperationOutcomeIssue[];
|
|
6653
|
-
|
|
6654
|
-
/**
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
export declare function validateResourceType(resourceType: string): void;
|
|
6692
|
-
|
|
6693
|
-
export declare function validateTypedValue(typedValue: TypedValue, options?: ValidatorOptions): OperationOutcomeIssue[];
|
|
6694
|
-
|
|
6695
|
-
export declare function validationError(details: string): OperationOutcome;
|
|
6696
|
-
|
|
6697
|
-
export declare const validationRegexes: Record<string, RegExp>;
|
|
6698
|
-
|
|
6699
|
-
export declare interface ValidatorOptions {
|
|
6700
|
-
|
|
6701
|
-
}
|
|
6702
|
-
|
|
6703
|
-
export declare type ValueOrExternalSecret<T extends ExternalSecretPrimitive> = T | ExternalSecret<T>;
|
|
6704
|
-
|
|
6705
|
-
/**
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
export declare interface ValueSetExpandParams {
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
}
|
|
6716
|
-
|
|
6717
|
-
/**
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
export declare function warnIfNewerVersionAvailable(appName: string, params?: Record<string, string>): Promise<void>;
|
|
6723
|
-
|
|
6724
|
-
declare type WebSocketEventMap_2 = {
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
};
|
|
6730
|
-
export { WebSocketEventMap_2 as WebSocketEventMap }
|
|
6731
|
-
|
|
6732
|
-
export declare type WithId<T> = T & {
|
|
6733
|
-
|
|
6734
|
-
};
|
|
6735
|
-
|
|
6736
|
-
/**
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
export declare function wordWrap(text: string, maxLength: number): string[];
|
|
6744
|
-
|
|
6745
|
-
/**
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
export declare class XorAtom extends BooleanInfixOperatorAtom {
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
}
|
|
6755
|
-
|
|
6756
|
-
export { }
|
|
5618
|
+
* @throws {@link OperationOutcomeError} If the reference cannot be parsed.
|
|
5619
|
+
*/
|
|
5620
|
+
export declare function parseReference<T extends Resource>(reference: Reference<T> | undefined): [T['resourceType'], string];
|
|
5621
|
+
|
|
5622
|
+
/**
|
|
5623
|
+
* Parses a search URL into a search request.
|
|
5624
|
+
* @param url - The original search URL or the FHIR resource type.
|
|
5625
|
+
* @param query - Optional collection of additional query string parameters.
|
|
5626
|
+
* @returns A parsed SearchRequest.
|
|
5627
|
+
*/
|
|
5628
|
+
export declare function parseSearchRequest<T extends Resource = Resource>(url: T['resourceType'] | URL | string, query?: Record<string, string[] | string | undefined>): SearchRequest<T>;
|
|
5629
|
+
|
|
5630
|
+
/**
|
|
5631
|
+
* Parses a StructureDefinition resource into an internal schema better suited for
|
|
5632
|
+
* programmatic validation and usage in internal systems
|
|
5633
|
+
* @param sd - The StructureDefinition resource to parse
|
|
5634
|
+
* @returns The parsed schema for the given resource type
|
|
5635
|
+
* @experimental
|
|
5636
|
+
*/
|
|
5637
|
+
export declare function parseStructureDefinition(sd: StructureDefinition): InternalTypeSchema;
|
|
5638
|
+
|
|
5639
|
+
/**
|
|
5640
|
+
* Parses an extended FHIR search criteria string (i.e. application/x-fhir-query).
|
|
5641
|
+
*
|
|
5642
|
+
* @example Evaluating a FHIRPath subexpression
|
|
5643
|
+
*
|
|
5644
|
+
* ```typescript
|
|
5645
|
+
* const query = 'Patient?name={{ %patient.name }}';
|
|
5646
|
+
* const variables = { patient: { name: 'John Doe' } };
|
|
5647
|
+
* const request = parseXFhirQuery(query, variables);
|
|
5648
|
+
* console.log(request.filters[0].value); // "John Doe"
|
|
5649
|
+
* ```
|
|
5650
|
+
*
|
|
5651
|
+
* @see https://hl7.org/fhir/fhir-xquery.html
|
|
5652
|
+
* @param query - The X-Fhir-Query string to parse
|
|
5653
|
+
* @param variables - Values to pass into embedded FHIRPath expressions
|
|
5654
|
+
* @returns The parsed search request
|
|
5655
|
+
*/
|
|
5656
|
+
export declare function parseXFhirQuery(query: string, variables: Record<string, TypedValue>): SearchRequest;
|
|
5657
|
+
|
|
5658
|
+
/**
|
|
5659
|
+
* JSONPatch patch operation.
|
|
5660
|
+
* Compatible with fast-json-patch and rfc6902 Operation.
|
|
5661
|
+
*/
|
|
5662
|
+
export declare interface PatchOperation {
|
|
5663
|
+
readonly op: 'add' | 'remove' | 'replace' | 'copy' | 'move' | 'test';
|
|
5664
|
+
readonly path: string;
|
|
5665
|
+
readonly value?: any;
|
|
5666
|
+
}
|
|
5667
|
+
|
|
5668
|
+
export declare type PendingSubscriptionRequest = Omit<SubscriptionRequest, 'endpoint'>;
|
|
5669
|
+
|
|
5670
|
+
/**
|
|
5671
|
+
* Returns true if the two numbers are equal to the given precision.
|
|
5672
|
+
* @param a - The first number.
|
|
5673
|
+
* @param b - The second number.
|
|
5674
|
+
* @param precision - Optional precision in number of digits.
|
|
5675
|
+
* @returns True if the two numbers are equal to the given precision.
|
|
5676
|
+
*/
|
|
5677
|
+
export declare function preciseEquals(a: number, b: number, precision?: number): boolean;
|
|
5678
|
+
|
|
5679
|
+
/**
|
|
5680
|
+
* Returns true if the first number is greater than the second number to the given precision.
|
|
5681
|
+
* @param a - The first number.
|
|
5682
|
+
* @param b - The second number.
|
|
5683
|
+
* @param precision - Optional precision in number of digits.
|
|
5684
|
+
* @returns True if the first number is greater than the second number to the given precision.
|
|
5685
|
+
*/
|
|
5686
|
+
export declare function preciseGreaterThan(a: number, b: number, precision?: number): boolean;
|
|
5687
|
+
|
|
5688
|
+
/**
|
|
5689
|
+
* Returns true if the first number is greater than or equal to the second number to the given precision.
|
|
5690
|
+
* @param a - The first number.
|
|
5691
|
+
* @param b - The second number.
|
|
5692
|
+
* @param precision - Optional precision in number of digits.
|
|
5693
|
+
* @returns True if the first number is greater than or equal to the second number to the given precision.
|
|
5694
|
+
*/
|
|
5695
|
+
export declare function preciseGreaterThanOrEquals(a: number, b: number, precision?: number): boolean;
|
|
5696
|
+
|
|
5697
|
+
/**
|
|
5698
|
+
* Returns true if the first number is less than the second number to the given precision.
|
|
5699
|
+
* @param a - The first number.
|
|
5700
|
+
* @param b - The second number.
|
|
5701
|
+
* @param precision - Optional precision in number of digits.
|
|
5702
|
+
* @returns True if the first number is less than the second number to the given precision.
|
|
5703
|
+
*/
|
|
5704
|
+
export declare function preciseLessThan(a: number, b: number, precision?: number): boolean;
|
|
5705
|
+
|
|
5706
|
+
/**
|
|
5707
|
+
* Returns true if the first number is less than or equal to the second number to the given precision.
|
|
5708
|
+
* @param a - The first number.
|
|
5709
|
+
* @param b - The second number.
|
|
5710
|
+
* @param precision - Optional precision in number of digits.
|
|
5711
|
+
* @returns True if the first number is less than or equal to the second number to the given precision.
|
|
5712
|
+
*/
|
|
5713
|
+
export declare function preciseLessThanOrEquals(a: number, b: number, precision?: number): boolean;
|
|
5714
|
+
|
|
5715
|
+
/**
|
|
5716
|
+
* Returns the input number rounded to the specified number of digits.
|
|
5717
|
+
* @param a - The input number.
|
|
5718
|
+
* @param precision - The precision in number of digits.
|
|
5719
|
+
* @returns The number rounded to the specified number of digits.
|
|
5720
|
+
*/
|
|
5721
|
+
export declare function preciseRound(a: number, precision: number): number;
|
|
5722
|
+
|
|
5723
|
+
export declare const preconditionFailed: OperationOutcome;
|
|
5724
|
+
|
|
5725
|
+
export declare abstract class PrefixOperatorAtom implements Atom {
|
|
5726
|
+
readonly operator: string;
|
|
5727
|
+
readonly child: Atom;
|
|
5728
|
+
constructor(operator: string, child: Atom);
|
|
5729
|
+
abstract eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
5730
|
+
toString(): string;
|
|
5731
|
+
}
|
|
5732
|
+
|
|
5733
|
+
export declare interface PrefixParselet {
|
|
5734
|
+
parse(parser: Parser, token: Token): Atom;
|
|
5735
|
+
}
|
|
5736
|
+
|
|
5737
|
+
export declare type ProfileResource = Patient | Practitioner | RelatedPerson;
|
|
5738
|
+
|
|
5739
|
+
/**
|
|
5740
|
+
* Project admin resource types are special resources that are only
|
|
5741
|
+
* accessible to project administrators.
|
|
5742
|
+
*/
|
|
5743
|
+
export declare const projectAdminResourceTypes: string[];
|
|
5744
|
+
|
|
5745
|
+
/**
|
|
5746
|
+
* List of property types.
|
|
5747
|
+
* http://www.hl7.org/fhir/valueset-defined-types.html
|
|
5748
|
+
* The list here includes additions found from StructureDefinition resources.
|
|
5749
|
+
*/
|
|
5750
|
+
export declare const PropertyType: {
|
|
5751
|
+
readonly Address: "Address";
|
|
5752
|
+
readonly Age: "Age";
|
|
5753
|
+
readonly Annotation: "Annotation";
|
|
5754
|
+
readonly Attachment: "Attachment";
|
|
5755
|
+
readonly BackboneElement: "BackboneElement";
|
|
5756
|
+
readonly CodeableConcept: "CodeableConcept";
|
|
5757
|
+
readonly Coding: "Coding";
|
|
5758
|
+
readonly ContactDetail: "ContactDetail";
|
|
5759
|
+
readonly ContactPoint: "ContactPoint";
|
|
5760
|
+
readonly Contributor: "Contributor";
|
|
5761
|
+
readonly Count: "Count";
|
|
5762
|
+
readonly DataRequirement: "DataRequirement";
|
|
5763
|
+
readonly Distance: "Distance";
|
|
5764
|
+
readonly Dosage: "Dosage";
|
|
5765
|
+
readonly Duration: "Duration";
|
|
5766
|
+
readonly Expression: "Expression";
|
|
5767
|
+
readonly Extension: "Extension";
|
|
5768
|
+
readonly HumanName: "HumanName";
|
|
5769
|
+
readonly Identifier: "Identifier";
|
|
5770
|
+
readonly MarketingStatus: "MarketingStatus";
|
|
5771
|
+
readonly Meta: "Meta";
|
|
5772
|
+
readonly Money: "Money";
|
|
5773
|
+
readonly Narrative: "Narrative";
|
|
5774
|
+
readonly ParameterDefinition: "ParameterDefinition";
|
|
5775
|
+
readonly Period: "Period";
|
|
5776
|
+
readonly Population: "Population";
|
|
5777
|
+
readonly ProdCharacteristic: "ProdCharacteristic";
|
|
5778
|
+
readonly ProductShelfLife: "ProductShelfLife";
|
|
5779
|
+
readonly Quantity: "Quantity";
|
|
5780
|
+
readonly Range: "Range";
|
|
5781
|
+
readonly Ratio: "Ratio";
|
|
5782
|
+
readonly Reference: "Reference";
|
|
5783
|
+
readonly RelatedArtifact: "RelatedArtifact";
|
|
5784
|
+
readonly SampledData: "SampledData";
|
|
5785
|
+
readonly Signature: "Signature";
|
|
5786
|
+
readonly SubstanceAmount: "SubstanceAmount";
|
|
5787
|
+
readonly SystemString: "http://hl7.org/fhirpath/System.String";
|
|
5788
|
+
readonly Timing: "Timing";
|
|
5789
|
+
readonly TriggerDefinition: "TriggerDefinition";
|
|
5790
|
+
readonly UsageContext: "UsageContext";
|
|
5791
|
+
readonly base64Binary: "base64Binary";
|
|
5792
|
+
readonly boolean: "boolean";
|
|
5793
|
+
readonly canonical: "canonical";
|
|
5794
|
+
readonly code: "code";
|
|
5795
|
+
readonly date: "date";
|
|
5796
|
+
readonly dateTime: "dateTime";
|
|
5797
|
+
readonly decimal: "decimal";
|
|
5798
|
+
readonly id: "id";
|
|
5799
|
+
readonly instant: "instant";
|
|
5800
|
+
readonly integer: "integer";
|
|
5801
|
+
readonly markdown: "markdown";
|
|
5802
|
+
readonly oid: "oid";
|
|
5803
|
+
readonly positiveInt: "positiveInt";
|
|
5804
|
+
readonly string: "string";
|
|
5805
|
+
readonly time: "time";
|
|
5806
|
+
readonly unsignedInt: "unsignedInt";
|
|
5807
|
+
readonly uri: "uri";
|
|
5808
|
+
readonly url: "url";
|
|
5809
|
+
readonly uuid: "uuid";
|
|
5810
|
+
};
|
|
5811
|
+
|
|
5812
|
+
/**
|
|
5813
|
+
* Protected resource types are in the "medplum" project.
|
|
5814
|
+
* Reading and writing is limited to the system account.
|
|
5815
|
+
*/
|
|
5816
|
+
export declare const protectedResourceTypes: string[];
|
|
5817
|
+
|
|
5818
|
+
export declare type ProtocolsProvider = null | string | string[];
|
|
5819
|
+
|
|
5820
|
+
export declare interface PushToAgentOptions extends MedplumRequestOptions {
|
|
5821
|
+
/**
|
|
5822
|
+
* Time to wait before request timeout in milliseconds; defaults to `10000` (10 s)
|
|
5823
|
+
*/
|
|
5824
|
+
waitTimeout?: number;
|
|
5825
|
+
}
|
|
5826
|
+
|
|
5827
|
+
export declare type QuantityUnit = Pick<Quantity, 'unit' | 'code' | 'system'>;
|
|
5828
|
+
|
|
5829
|
+
/**
|
|
5830
|
+
* QueryTypes defines the different ways to specify FHIR search parameters.
|
|
5831
|
+
*
|
|
5832
|
+
* Can be any valid input to the URLSearchParams() constructor.
|
|
5833
|
+
*
|
|
5834
|
+
* TypeScript definitions for URLSearchParams do not match runtime behavior.
|
|
5835
|
+
* The official spec only accepts string values.
|
|
5836
|
+
* Web browsers and Node.js automatically coerce values to strings.
|
|
5837
|
+
* See: https://github.com/microsoft/TypeScript/issues/32951
|
|
5838
|
+
*/
|
|
5839
|
+
export declare type QueryTypes = URLSearchParams | string[][] | Record<string, string | number | boolean | undefined> | string | undefined;
|
|
5840
|
+
|
|
5841
|
+
export declare type RateLimitInfo = {
|
|
5842
|
+
name: string;
|
|
5843
|
+
remainingUnits: number;
|
|
5844
|
+
secondsUntilReset: number;
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5847
|
+
/**
|
|
5848
|
+
* The ReadablePromise class wraps a request promise suitable for React Suspense.
|
|
5849
|
+
* See: https://blog.logrocket.com/react-suspense-data-fetching/#wrappromise-js
|
|
5850
|
+
* See: https://github.com/ovieokeh/suspense-data-fetching/blob/master/lib/api/wrapPromise.js
|
|
5851
|
+
*/
|
|
5852
|
+
export declare class ReadablePromise<T> implements Promise<T> {
|
|
5853
|
+
readonly [Symbol.toStringTag]: string;
|
|
5854
|
+
private readonly suspender;
|
|
5855
|
+
private status;
|
|
5856
|
+
private response;
|
|
5857
|
+
private error;
|
|
5858
|
+
constructor(requestPromise: Promise<T>);
|
|
5859
|
+
/**
|
|
5860
|
+
* Returns true if the promise is pending.
|
|
5861
|
+
* @returns True if the Promise is pending.
|
|
5862
|
+
*/
|
|
5863
|
+
isPending(): boolean;
|
|
5864
|
+
/**
|
|
5865
|
+
* Returns true if the promise resolved successfully.
|
|
5866
|
+
* @returns True if the Promise resolved successfully.
|
|
5867
|
+
*/
|
|
5868
|
+
isOk(): boolean;
|
|
5869
|
+
/**
|
|
5870
|
+
* Attempts to read the value of the promise.
|
|
5871
|
+
* If the promise is pending, this method will throw a promise.
|
|
5872
|
+
* If the promise rejected, this method will throw the rejection reason.
|
|
5873
|
+
* If the promise resolved, this method will return the resolved value.
|
|
5874
|
+
* @returns The resolved value of the Promise.
|
|
5875
|
+
*/
|
|
5876
|
+
read(): T;
|
|
5877
|
+
/**
|
|
5878
|
+
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
5879
|
+
* @param onfulfilled - The callback to execute when the Promise is resolved.
|
|
5880
|
+
* @param onrejected - The callback to execute when the Promise is rejected.
|
|
5881
|
+
* @returns A Promise for the completion of which ever callback is executed.
|
|
5882
|
+
*/
|
|
5883
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
5884
|
+
/**
|
|
5885
|
+
* Attaches a callback for only the rejection of the Promise.
|
|
5886
|
+
* @param onrejected - The callback to execute when the Promise is rejected.
|
|
5887
|
+
* @returns A Promise for the completion of the callback.
|
|
5888
|
+
*/
|
|
5889
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
5890
|
+
/**
|
|
5891
|
+
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
|
|
5892
|
+
* resolved value cannot be modified from the callback.
|
|
5893
|
+
* @param onfinally - The callback to execute when the Promise is settled (fulfilled or rejected).
|
|
5894
|
+
* @returns A Promise for the completion of the callback.
|
|
5895
|
+
*/
|
|
5896
|
+
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
5897
|
+
}
|
|
5898
|
+
|
|
5899
|
+
export declare interface ReadHistoryOptions {
|
|
5900
|
+
readonly count?: number;
|
|
5901
|
+
readonly offset?: number;
|
|
5902
|
+
}
|
|
5903
|
+
|
|
5904
|
+
export declare const readInteractions: AccessPolicyInteraction[];
|
|
5905
|
+
|
|
5906
|
+
export declare class ReconnectingWebSocket<WS extends IWebSocket = WebSocket> extends TypedEventTarget<WebSocketEventMap_2> implements IReconnectingWebSocket {
|
|
5907
|
+
private _ws;
|
|
5908
|
+
private _retryCount;
|
|
5909
|
+
private _uptimeTimeout;
|
|
5910
|
+
private _connectTimeout;
|
|
5911
|
+
private _shouldReconnect;
|
|
5912
|
+
private _connectLock;
|
|
5913
|
+
private _binaryType;
|
|
5914
|
+
private _closeCalled;
|
|
5915
|
+
private _messageQueue;
|
|
5916
|
+
private readonly _debugLogger;
|
|
5917
|
+
protected _url: string;
|
|
5918
|
+
protected _protocols?: ProtocolsProvider;
|
|
5919
|
+
protected _options: Options<WS>;
|
|
5920
|
+
constructor(url: string, protocols?: ProtocolsProvider, options?: Options<WS>);
|
|
5921
|
+
static get CONNECTING(): number;
|
|
5922
|
+
static get OPEN(): number;
|
|
5923
|
+
static get CLOSING(): number;
|
|
5924
|
+
static get CLOSED(): number;
|
|
5925
|
+
get CONNECTING(): number;
|
|
5926
|
+
get OPEN(): number;
|
|
5927
|
+
get CLOSING(): number;
|
|
5928
|
+
get CLOSED(): number;
|
|
5929
|
+
get binaryType(): WS['binaryType'];
|
|
5930
|
+
set binaryType(value: WS['binaryType']);
|
|
5931
|
+
/**
|
|
5932
|
+
* @returns The number or connection retries.
|
|
5933
|
+
*/
|
|
5934
|
+
get retryCount(): number;
|
|
5935
|
+
/**
|
|
5936
|
+
* @returns The number of bytes of data that have been queued using calls to send() but not yet
|
|
5937
|
+
* transmitted to the network. This value resets to zero once all queued data has been sent.
|
|
5938
|
+
* This value does not reset to zero when the connection is closed; if you keep calling send(),
|
|
5939
|
+
* this will continue to climb. Read only
|
|
5940
|
+
*
|
|
5941
|
+
*/
|
|
5942
|
+
get bufferedAmount(): number;
|
|
5943
|
+
/**
|
|
5944
|
+
* @returns The extensions selected by the server. This is currently only the empty string or a list of
|
|
5945
|
+
* extensions as negotiated by the connection
|
|
5946
|
+
*/
|
|
5947
|
+
get extensions(): string;
|
|
5948
|
+
/**
|
|
5949
|
+
* @returns A string indicating the name of the sub-protocol the server selected;
|
|
5950
|
+
* this will be one of the strings specified in the protocols parameter when creating the
|
|
5951
|
+
* WebSocket object.
|
|
5952
|
+
*/
|
|
5953
|
+
get protocol(): string;
|
|
5954
|
+
/**
|
|
5955
|
+
* @returns The current state of the connection; this is one of the Ready state constants.
|
|
5956
|
+
*/
|
|
5957
|
+
get readyState(): number;
|
|
5958
|
+
/**
|
|
5959
|
+
* @returns The URL as resolved by the constructor.
|
|
5960
|
+
*/
|
|
5961
|
+
get url(): string;
|
|
5962
|
+
/**
|
|
5963
|
+
* @returns Whether the websocket object is now in reconnectable state.
|
|
5964
|
+
*/
|
|
5965
|
+
get shouldReconnect(): boolean;
|
|
5966
|
+
/**
|
|
5967
|
+
* An event listener to be called when the WebSocket connection's readyState changes to CLOSED
|
|
5968
|
+
*/
|
|
5969
|
+
onclose: ((event: CloseEvent_2) => void) | null;
|
|
5970
|
+
/**
|
|
5971
|
+
* An event listener to be called when an error occurs
|
|
5972
|
+
*/
|
|
5973
|
+
onerror: ((event: ErrorEvent_2) => void) | null;
|
|
5974
|
+
/**
|
|
5975
|
+
* An event listener to be called when a message is received from the server
|
|
5976
|
+
*/
|
|
5977
|
+
onmessage: ((event: MessageEvent) => void) | null;
|
|
5978
|
+
/**
|
|
5979
|
+
* An event listener to be called when the WebSocket connection's readyState changes to OPEN;
|
|
5980
|
+
* this indicates that the connection is ready to send and receive data
|
|
5981
|
+
*/
|
|
5982
|
+
onopen: ((event: Event) => void) | null;
|
|
5983
|
+
/**
|
|
5984
|
+
* Closes the WebSocket connection or connection attempt, if any. If the connection is already
|
|
5985
|
+
* CLOSED, this method does nothing
|
|
5986
|
+
* @param code - The code to close with. Default is 1000.
|
|
5987
|
+
* @param reason - An optional reason for closing the connection.
|
|
5988
|
+
*/
|
|
5989
|
+
close(code?: number, reason?: string): void;
|
|
5990
|
+
/**
|
|
5991
|
+
* Closes the WebSocket connection or connection attempt and connects again.
|
|
5992
|
+
* Resets retry counter;
|
|
5993
|
+
* @param code - The code to disconnect with. Default is 1000.
|
|
5994
|
+
* @param reason - An optional reason for disconnecting the connection.
|
|
5995
|
+
*/
|
|
5996
|
+
reconnect(code?: number, reason?: string): void;
|
|
5997
|
+
/**
|
|
5998
|
+
* Enqueue specified data to be transmitted to the server over the WebSocket connection
|
|
5999
|
+
* @param data - The data to enqueue.
|
|
6000
|
+
*/
|
|
6001
|
+
send(data: Message): void;
|
|
6002
|
+
private _debug;
|
|
6003
|
+
private _getNextDelay;
|
|
6004
|
+
private _wait;
|
|
6005
|
+
private _connect;
|
|
6006
|
+
private _handleTimeout;
|
|
6007
|
+
private _disconnect;
|
|
6008
|
+
private _acceptOpen;
|
|
6009
|
+
private readonly _handleOpen;
|
|
6010
|
+
private readonly _handleMessage;
|
|
6011
|
+
private readonly _handleError;
|
|
6012
|
+
private readonly _handleClose;
|
|
6013
|
+
private _removeListeners;
|
|
6014
|
+
private _addListeners;
|
|
6015
|
+
private _clearTimeouts;
|
|
6016
|
+
}
|
|
6017
|
+
|
|
6018
|
+
export declare function redirect(url: URL): OperationOutcome;
|
|
6019
|
+
|
|
6020
|
+
export declare type ReleaseManifest = {
|
|
6021
|
+
tag_name: string;
|
|
6022
|
+
assets: {
|
|
6023
|
+
name: string;
|
|
6024
|
+
browser_download_url: string;
|
|
6025
|
+
}[];
|
|
6026
|
+
};
|
|
6027
|
+
|
|
6028
|
+
/**
|
|
6029
|
+
* Removes duplicates in array using FHIRPath equality rules.
|
|
6030
|
+
* @param arr - The input array.
|
|
6031
|
+
* @returns The result array with duplicates removed.
|
|
6032
|
+
*/
|
|
6033
|
+
export declare function removeDuplicates(arr: TypedValue[]): TypedValue[];
|
|
6034
|
+
|
|
6035
|
+
/**
|
|
6036
|
+
* Removes the supplied profileUrl from the resource.meta.profile if it is present
|
|
6037
|
+
* @param resource - A FHIR resource
|
|
6038
|
+
* @param profileUrl - The profile URL to remove
|
|
6039
|
+
* @returns The resource
|
|
6040
|
+
*/
|
|
6041
|
+
export declare function removeProfileFromResource<T extends Resource = Resource>(resource: T, profileUrl: string): T;
|
|
6042
|
+
|
|
6043
|
+
/**
|
|
6044
|
+
* Topologically sorts a `batch` or `transaction` bundle to improve reference resolution.
|
|
6045
|
+
* The bundle is sorted such that a resource is created _before_ references to that resource appear in the bundle.
|
|
6046
|
+
*
|
|
6047
|
+
* In the event of cycles, this function will first create a POST request for each resource in the cycle, and then will
|
|
6048
|
+
* append a PUT request to the bundle. This ensures that each resources in the cycle is visited twice, and all
|
|
6049
|
+
* references can be resolved
|
|
6050
|
+
* @param bundle - Input bundle with type `batch` or `transaction`
|
|
6051
|
+
* @returns Bundle of the same type, with Bundle.entry reordered
|
|
6052
|
+
*/
|
|
6053
|
+
export declare function reorderBundle(bundle: Bundle): Bundle;
|
|
6054
|
+
|
|
6055
|
+
export declare interface RequestProfileSchemaOptions {
|
|
6056
|
+
/** (optional) Whether to include nested profiles, e.g. from extensions. Defaults to false. */
|
|
6057
|
+
expandProfile?: boolean;
|
|
6058
|
+
}
|
|
6059
|
+
|
|
6060
|
+
/**
|
|
6061
|
+
* Returns the ID portion of a reference.
|
|
6062
|
+
* @param input - A FHIR reference or resource.
|
|
6063
|
+
* @returns The ID portion of a reference.
|
|
6064
|
+
*/
|
|
6065
|
+
export declare function resolveId(input: Reference | Resource | undefined): string | undefined;
|
|
6066
|
+
|
|
6067
|
+
/**
|
|
6068
|
+
* ResourceArray is an array of resources with a bundle property.
|
|
6069
|
+
* The bundle property is a FHIR Bundle containing the search results.
|
|
6070
|
+
* This is useful for retrieving bundle metadata such as total, offset, and next link.
|
|
6071
|
+
*/
|
|
6072
|
+
export declare type ResourceArray<T extends Resource = Resource> = T[] & {
|
|
6073
|
+
bundle: Bundle<T>;
|
|
6074
|
+
};
|
|
6075
|
+
|
|
6076
|
+
export declare type ResourceMatchesSubscriptionCriteria = {
|
|
6077
|
+
resource: Resource;
|
|
6078
|
+
subscription: Subscription;
|
|
6079
|
+
context: BackgroundJobContext;
|
|
6080
|
+
logger?: Logger;
|
|
6081
|
+
getPreviousResource: (currentResource: Resource) => Promise<Resource | undefined>;
|
|
6082
|
+
};
|
|
6083
|
+
|
|
6084
|
+
export declare function resourceMatchesSubscriptionCriteria({ resource, subscription, context, getPreviousResource, logger, }: ResourceMatchesSubscriptionCriteria): Promise<boolean>;
|
|
6085
|
+
|
|
6086
|
+
export declare type ResourceWithCode = Resource & Code;
|
|
6087
|
+
|
|
6088
|
+
export declare const RXNORM = "http://www.nlm.nih.gov/research/umls/rxnorm";
|
|
6089
|
+
|
|
6090
|
+
export declare type SamplingInfo = Omit<SampledData, 'data'>;
|
|
6091
|
+
|
|
6092
|
+
/**
|
|
6093
|
+
* Checks that there is an access policy permitting the given resource interaction, returning the matching policy object.
|
|
6094
|
+
* @param resource - The resource being acted upon.
|
|
6095
|
+
* @param interaction - The interaction being performed on the resource.
|
|
6096
|
+
* @param accessPolicy - The relevant access policy for the current user.
|
|
6097
|
+
* @returns The satisfied access policy, or undefined if the access policy does not permit the given interaction.
|
|
6098
|
+
*/
|
|
6099
|
+
export declare function satisfiedAccessPolicy(resource: Resource, interaction: AccessPolicyInteraction, accessPolicy: AccessPolicy | undefined): AccessPolicyResource | undefined;
|
|
6100
|
+
|
|
6101
|
+
export declare interface SearchableToken {
|
|
6102
|
+
readonly system: string | undefined;
|
|
6103
|
+
readonly value: string | undefined;
|
|
6104
|
+
}
|
|
6105
|
+
|
|
6106
|
+
export declare interface SearchParameterDetails {
|
|
6107
|
+
readonly type: SearchParameterType;
|
|
6108
|
+
readonly elementDefinitions?: InternalSchemaElement[];
|
|
6109
|
+
readonly parsedExpression: FhirPathAtom;
|
|
6110
|
+
readonly array?: boolean;
|
|
6111
|
+
}
|
|
6112
|
+
|
|
6113
|
+
export declare const SearchParameterType: {
|
|
6114
|
+
readonly BOOLEAN: "BOOLEAN";
|
|
6115
|
+
readonly NUMBER: "NUMBER";
|
|
6116
|
+
readonly QUANTITY: "QUANTITY";
|
|
6117
|
+
readonly TEXT: "TEXT";
|
|
6118
|
+
readonly REFERENCE: "REFERENCE";
|
|
6119
|
+
readonly CANONICAL: "CANONICAL";
|
|
6120
|
+
readonly DATE: "DATE";
|
|
6121
|
+
readonly DATETIME: "DATETIME";
|
|
6122
|
+
readonly PERIOD: "PERIOD";
|
|
6123
|
+
readonly UUID: "UUID";
|
|
6124
|
+
};
|
|
6125
|
+
|
|
6126
|
+
export declare type SearchParameterType = (typeof SearchParameterType)[keyof typeof SearchParameterType];
|
|
6127
|
+
|
|
6128
|
+
export declare interface SearchRequest<T extends Resource = Resource> {
|
|
6129
|
+
readonly resourceType: T['resourceType'];
|
|
6130
|
+
filters?: Filter[];
|
|
6131
|
+
sortRules?: SortRule[];
|
|
6132
|
+
cursor?: string;
|
|
6133
|
+
offset?: number;
|
|
6134
|
+
count?: number;
|
|
6135
|
+
fields?: string[];
|
|
6136
|
+
name?: string;
|
|
6137
|
+
total?: 'none' | 'estimate' | 'accurate';
|
|
6138
|
+
include?: IncludeTarget[];
|
|
6139
|
+
revInclude?: IncludeTarget[];
|
|
6140
|
+
summary?: 'true' | 'text' | 'data';
|
|
6141
|
+
format?: string;
|
|
6142
|
+
pretty?: boolean;
|
|
6143
|
+
types?: T['resourceType'][];
|
|
6144
|
+
}
|
|
6145
|
+
|
|
6146
|
+
/**
|
|
6147
|
+
* Represents a "selection structure" in the SQL-on-FHIR specification.
|
|
6148
|
+
*
|
|
6149
|
+
* In practice, this can be a ViewDefinition or ViewDefinitionSelect.
|
|
6150
|
+
*
|
|
6151
|
+
* TypeScript does not like checks for properties that are not part of the type, so we use this interface instead.
|
|
6152
|
+
*/
|
|
6153
|
+
export declare interface SelectionStructure {
|
|
6154
|
+
forEach?: string;
|
|
6155
|
+
forEachOrNull?: string;
|
|
6156
|
+
column?: ViewDefinitionSelect['column'];
|
|
6157
|
+
select?: SelectionStructure[];
|
|
6158
|
+
unionAll?: SelectionStructure[];
|
|
6159
|
+
}
|
|
6160
|
+
|
|
6161
|
+
/**
|
|
6162
|
+
* Serializes an Error object into a plain object, including nested causes and custom properties.
|
|
6163
|
+
* @param error - The error to serialize.
|
|
6164
|
+
* @param depth - The current depth of recursion.
|
|
6165
|
+
* @param maxDepth - The maximum depth of recursion.
|
|
6166
|
+
* @returns A serialized representation of the error.
|
|
6167
|
+
*/
|
|
6168
|
+
export declare function serializeError(error: Error, depth?: number, maxDepth?: number): Record<string, any>;
|
|
6169
|
+
|
|
6170
|
+
/**
|
|
6171
|
+
* Creates a serialized url-encoded payload for a `FHIRcast` subscription from a `SubscriptionRequest` object that can be directly used in an HTTP request to the Hub.
|
|
6172
|
+
*
|
|
6173
|
+
* @param subscriptionRequest - An object representing a subscription request.
|
|
6174
|
+
* @returns A serialized subscription in url-encoded form.
|
|
6175
|
+
*/
|
|
6176
|
+
export declare function serializeFhircastSubscriptionRequest(subscriptionRequest: SubscriptionRequest | PendingSubscriptionRequest): string;
|
|
6177
|
+
|
|
6178
|
+
export declare function serverError(err: Error): OperationOutcome;
|
|
6179
|
+
|
|
6180
|
+
export declare function serverTimeout(msg?: string): OperationOutcome;
|
|
6181
|
+
|
|
6182
|
+
/**
|
|
6183
|
+
* Sets a code for a given system within a given codeable concept.
|
|
6184
|
+
* @param concept - The codeable concept.
|
|
6185
|
+
* @param system - The system string.
|
|
6186
|
+
* @param code - The code value.
|
|
6187
|
+
*/
|
|
6188
|
+
export declare function setCodeBySystem(concept: CodeableConcept, system: string, code: string): void;
|
|
6189
|
+
|
|
6190
|
+
/**
|
|
6191
|
+
* Sets a resource identifier for the given system.
|
|
6192
|
+
*
|
|
6193
|
+
* Note that this method is only available on resources that have an "identifier" property,
|
|
6194
|
+
* and that property must be an array of Identifier objects,
|
|
6195
|
+
* which is not true for all FHIR resources.
|
|
6196
|
+
*
|
|
6197
|
+
* If the identifier already exists, then the value is updated.
|
|
6198
|
+
*
|
|
6199
|
+
* Otherwise a new identifier is added.
|
|
6200
|
+
*
|
|
6201
|
+
* @param resource - The resource to add the identifier to.
|
|
6202
|
+
* @param system - The identifier system.
|
|
6203
|
+
* @param value - The identifier value.
|
|
6204
|
+
*/
|
|
6205
|
+
export declare function setIdentifier(resource: Resource & {
|
|
6206
|
+
identifier?: Identifier[];
|
|
6207
|
+
}, system: string, value: string): void;
|
|
6208
|
+
|
|
6209
|
+
export declare function singleton(collection: TypedValue[], type?: string): TypedValue | undefined;
|
|
6210
|
+
|
|
6211
|
+
export declare function singularize<T>(value: T | T[] | undefined): T | undefined;
|
|
6212
|
+
|
|
6213
|
+
/**
|
|
6214
|
+
* Sleeps for the specified number of milliseconds.
|
|
6215
|
+
* @param ms - Time delay in milliseconds
|
|
6216
|
+
* @returns A promise that resolves after the specified number of milliseconds.
|
|
6217
|
+
*/
|
|
6218
|
+
export declare const sleep: (ms: number) => Promise<void>;
|
|
6219
|
+
|
|
6220
|
+
export declare interface SliceDefinition extends Omit<InternalSchemaElement, 'slicing'> {
|
|
6221
|
+
name: string;
|
|
6222
|
+
definition?: string;
|
|
6223
|
+
elements: Record<string, InternalSchemaElement>;
|
|
6224
|
+
}
|
|
6225
|
+
|
|
6226
|
+
export declare type SliceDefinitionWithTypes = SliceDefinition & {
|
|
6227
|
+
type: NonNullable<SliceDefinition['type']>;
|
|
6228
|
+
typeSchema?: InternalTypeSchema;
|
|
6229
|
+
};
|
|
6230
|
+
|
|
6231
|
+
export declare interface SliceDiscriminator {
|
|
6232
|
+
path: string;
|
|
6233
|
+
type: string;
|
|
6234
|
+
}
|
|
6235
|
+
|
|
6236
|
+
export declare interface SlicingRules {
|
|
6237
|
+
discriminator: SliceDiscriminator[];
|
|
6238
|
+
ordered: boolean;
|
|
6239
|
+
rule?: 'open' | 'closed' | 'openAtEnd';
|
|
6240
|
+
slices: SliceDefinition[];
|
|
6241
|
+
}
|
|
6242
|
+
|
|
6243
|
+
export declare const SNOMED = "http://snomed.info/sct";
|
|
6244
|
+
|
|
6245
|
+
export declare interface SortRule {
|
|
6246
|
+
code: string;
|
|
6247
|
+
descending?: boolean;
|
|
6248
|
+
}
|
|
6249
|
+
|
|
6250
|
+
/**
|
|
6251
|
+
* Sorts an array of strings in place using the localeCompare method.
|
|
6252
|
+
*
|
|
6253
|
+
* This method will mutate the input array.
|
|
6254
|
+
*
|
|
6255
|
+
* @param array - The array of strings to sort.
|
|
6256
|
+
* @returns The sorted array of strings.
|
|
6257
|
+
*/
|
|
6258
|
+
export declare function sortStringArray(array: string[]): string[];
|
|
6259
|
+
|
|
6260
|
+
/**
|
|
6261
|
+
* Splits a string into an array of strings using the specified delimiter.
|
|
6262
|
+
* Unlike the built-in split function, this function will split the string into a maximum of exactly n parts.
|
|
6263
|
+
* Trailing empty strings are included in the result.
|
|
6264
|
+
* @param str - The string to split.
|
|
6265
|
+
* @param delim - The delimiter.
|
|
6266
|
+
* @param n - The maximum number of parts to split the string into.
|
|
6267
|
+
* @returns The resulting array of strings.
|
|
6268
|
+
*/
|
|
6269
|
+
export declare function splitN(str: string, delim: string, n: number): string[];
|
|
6270
|
+
|
|
6271
|
+
/**
|
|
6272
|
+
* Splits a FHIR search value on commas.
|
|
6273
|
+
* Respects backslash escape.
|
|
6274
|
+
*
|
|
6275
|
+
* See: https://hl7.org/fhir/r4/search.html#escaping
|
|
6276
|
+
*
|
|
6277
|
+
* @param input - The FHIR search value to split.
|
|
6278
|
+
* @returns The individual search values.
|
|
6279
|
+
*/
|
|
6280
|
+
export declare function splitSearchOnComma(input: string): string[];
|
|
6281
|
+
|
|
6282
|
+
export declare type StatsFn = (data: number[]) => number | Quantity;
|
|
6283
|
+
|
|
6284
|
+
/**
|
|
6285
|
+
* Reads data from a Readable stream and returns a Promise that resolves with a Buffer containing all the data.
|
|
6286
|
+
* @param stream - The Readable stream to read from.
|
|
6287
|
+
* @returns A Promise that resolves with a Buffer containing all the data from the Readable stream.
|
|
6288
|
+
*/
|
|
6289
|
+
export declare function streamToBuffer(stream: Readable): Promise<Buffer>;
|
|
6290
|
+
|
|
6291
|
+
/**
|
|
6292
|
+
* Returns the FHIR JSON string representation of the input value.
|
|
6293
|
+
*
|
|
6294
|
+
* Removes properties with empty string values.
|
|
6295
|
+
* Removes objects with zero properties.
|
|
6296
|
+
*
|
|
6297
|
+
* Does not modify the input value.
|
|
6298
|
+
* If the input value does not contain any empty properties, then the original value is returned.
|
|
6299
|
+
* Otherwise, a new value is returned with the empty properties removed.
|
|
6300
|
+
*
|
|
6301
|
+
* See: https://www.hl7.org/fhir/json.html
|
|
6302
|
+
*
|
|
6303
|
+
* @param value - The input value.
|
|
6304
|
+
* @param pretty - Optional flag to pretty-print the JSON.
|
|
6305
|
+
* @returns The resulting JSON string.
|
|
6306
|
+
*/
|
|
6307
|
+
export declare function stringify(value: any, pretty?: boolean): string;
|
|
6308
|
+
|
|
6309
|
+
/**
|
|
6310
|
+
* Output the string representation of a value, suitable for use as part of a search query.
|
|
6311
|
+
* @param v - The value to format as a string
|
|
6312
|
+
* @returns The stringified value
|
|
6313
|
+
*/
|
|
6314
|
+
export declare function stringifyTypedValue(v: TypedValue): string;
|
|
6315
|
+
|
|
6316
|
+
export declare type StringMap = {
|
|
6317
|
+
[key: string]: string;
|
|
6318
|
+
};
|
|
6319
|
+
|
|
6320
|
+
/**
|
|
6321
|
+
* Transforms input values using a FHIR StructureMap.
|
|
6322
|
+
*
|
|
6323
|
+
* See: https://www.hl7.org/fhir/mapping-language.html
|
|
6324
|
+
*
|
|
6325
|
+
* @param structureMap - The StructureMap to transform.
|
|
6326
|
+
* @param input - The input values.
|
|
6327
|
+
* @param transformMaps - Optional collection of imported StructureMaps and ConceptMaps.
|
|
6328
|
+
* @returns The transformed values.
|
|
6329
|
+
*/
|
|
6330
|
+
export declare function structureMapTransform(structureMap: StructureMap, input: TypedValue[], transformMaps?: TransformMapCollection): TypedValue[];
|
|
6331
|
+
|
|
6332
|
+
export declare interface SubManagerOptions {
|
|
6333
|
+
ReconnectingWebSocket?: IReconnectingWebSocketCtor;
|
|
6334
|
+
pingIntervalMs?: number;
|
|
6335
|
+
debug?: boolean;
|
|
6336
|
+
debugLogger?: (...args: any[]) => void;
|
|
6337
|
+
}
|
|
6338
|
+
|
|
6339
|
+
/**
|
|
6340
|
+
* An `EventTarget` that emits events when new subscription notifications come in over WebSockets.
|
|
6341
|
+
*
|
|
6342
|
+
* -----
|
|
6343
|
+
*
|
|
6344
|
+
* ### Events emitted:
|
|
6345
|
+
*
|
|
6346
|
+
* - `connect` - A new subscription is connected to the `SubscriptionManager` and `message` events for this subscription can be expected.
|
|
6347
|
+
* - `disconnect` - The specified subscription is no longer being monitored by the `SubscriptionManager`.
|
|
6348
|
+
* - `error` - An error has occurred.
|
|
6349
|
+
* - `message` - A message containing a notification `Bundle` has been received.
|
|
6350
|
+
* - `open` - The WebSocket has been opened.
|
|
6351
|
+
* - `close` - The WebSocket has been closed.
|
|
6352
|
+
* - `heartbeat` - A `heartbeat` message has been received.
|
|
6353
|
+
*/
|
|
6354
|
+
export declare class SubscriptionEmitter extends TypedEventTarget<SubscriptionEventMap> {
|
|
6355
|
+
private readonly criteria;
|
|
6356
|
+
constructor(...criteria: string[]);
|
|
6357
|
+
getCriteria(): Set<string>;
|
|
6358
|
+
/**
|
|
6359
|
+
* @internal
|
|
6360
|
+
* @param criteria - The criteria to add to this `SubscriptionEmitter`.
|
|
6361
|
+
*/
|
|
6362
|
+
_addCriteria(criteria: string): void;
|
|
6363
|
+
/**
|
|
6364
|
+
* @internal
|
|
6365
|
+
* @param criteria - The criteria to remove from this `SubscriptionEmitter`.
|
|
6366
|
+
*/
|
|
6367
|
+
_removeCriteria(criteria: string): void;
|
|
6368
|
+
}
|
|
6369
|
+
|
|
6370
|
+
export declare type SubscriptionEventMap = {
|
|
6371
|
+
connect: {
|
|
6372
|
+
type: 'connect';
|
|
6373
|
+
payload: {
|
|
6374
|
+
subscriptionId: string;
|
|
6375
|
+
};
|
|
6376
|
+
};
|
|
6377
|
+
disconnect: {
|
|
6378
|
+
type: 'disconnect';
|
|
6379
|
+
payload: {
|
|
6380
|
+
subscriptionId: string;
|
|
6381
|
+
};
|
|
6382
|
+
};
|
|
6383
|
+
error: {
|
|
6384
|
+
type: 'error';
|
|
6385
|
+
payload: Error;
|
|
6386
|
+
};
|
|
6387
|
+
message: {
|
|
6388
|
+
type: 'message';
|
|
6389
|
+
payload: Bundle;
|
|
6390
|
+
};
|
|
6391
|
+
open: {
|
|
6392
|
+
type: 'open';
|
|
6393
|
+
};
|
|
6394
|
+
close: {
|
|
6395
|
+
type: 'close';
|
|
6396
|
+
};
|
|
6397
|
+
heartbeat: {
|
|
6398
|
+
type: 'heartbeat';
|
|
6399
|
+
payload: Bundle;
|
|
6400
|
+
};
|
|
6401
|
+
};
|
|
6402
|
+
|
|
6403
|
+
export declare class SubscriptionManager {
|
|
6404
|
+
private readonly medplum;
|
|
6405
|
+
private readonly ws;
|
|
6406
|
+
private masterSubEmitter?;
|
|
6407
|
+
private readonly criteriaEntries;
|
|
6408
|
+
private readonly criteriaEntriesBySubscriptionId;
|
|
6409
|
+
private wsClosed;
|
|
6410
|
+
private pingTimer;
|
|
6411
|
+
private readonly pingIntervalMs;
|
|
6412
|
+
private waitingForPong;
|
|
6413
|
+
private currentProfile;
|
|
6414
|
+
constructor(medplum: MedplumClient, wsUrl: URL | string, options?: SubManagerOptions);
|
|
6415
|
+
private setupListeners;
|
|
6416
|
+
private emitError;
|
|
6417
|
+
private maybeEmitDisconnect;
|
|
6418
|
+
private getTokenForCriteria;
|
|
6419
|
+
private maybeGetCriteriaEntry;
|
|
6420
|
+
private getAllCriteriaEmitters;
|
|
6421
|
+
private addCriteriaEntry;
|
|
6422
|
+
private removeCriteriaEntry;
|
|
6423
|
+
private subscribeToCriteria;
|
|
6424
|
+
private refreshAllSubscriptions;
|
|
6425
|
+
addCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): SubscriptionEmitter;
|
|
6426
|
+
removeCriteria(criteria: string, subscriptionProps?: Partial<Subscription>): void;
|
|
6427
|
+
getWebSocket(): IReconnectingWebSocket;
|
|
6428
|
+
closeWebSocket(): void;
|
|
6429
|
+
reconnectWebSocket(): void;
|
|
6430
|
+
getCriteriaCount(): number;
|
|
6431
|
+
getMasterEmitter(): SubscriptionEmitter;
|
|
6432
|
+
}
|
|
6433
|
+
|
|
6434
|
+
/**
|
|
6435
|
+
* A `FHIRcast` subscription request.
|
|
6436
|
+
*
|
|
6437
|
+
* Can be passed to `MedplumClient.fhircastConnect` or `MedplumClient.fhircastUnsubscribe` to either open a `FHIRcast` connection, or unsubscribe from the subscription.
|
|
6438
|
+
*/
|
|
6439
|
+
export declare type SubscriptionRequest = {
|
|
6440
|
+
channelType: 'websocket';
|
|
6441
|
+
mode: 'subscribe' | 'unsubscribe';
|
|
6442
|
+
events: FhircastEventName[];
|
|
6443
|
+
topic: string;
|
|
6444
|
+
endpoint: string;
|
|
6445
|
+
};
|
|
6446
|
+
|
|
6447
|
+
/**
|
|
6448
|
+
* Construct the subset of a resource containing a minimum set of fields. The returned resource is not guaranteed
|
|
6449
|
+
* to contain only the provided properties, and may contain others (e.g. `resourceType` and `id`)
|
|
6450
|
+
*
|
|
6451
|
+
* @param resource - The resource to subset
|
|
6452
|
+
* @param properties - The minimum properties to include in the subset
|
|
6453
|
+
* @returns The modified resource, containing the listed properties and possibly other mandatory ones
|
|
6454
|
+
*/
|
|
6455
|
+
export declare function subsetResource<T extends Resource>(resource: T | undefined, properties: string[]): T | undefined;
|
|
6456
|
+
|
|
6457
|
+
/**
|
|
6458
|
+
* Summarizes a group of Observations into a single computed summary value, with the individual values
|
|
6459
|
+
* preserved in `Observation.component.valueSampledData`.
|
|
6460
|
+
*
|
|
6461
|
+
* @param observations - The Observations to summarize.
|
|
6462
|
+
* @param summaryCode - The code for the summarized value.
|
|
6463
|
+
* @param summarizeFn - Function to summarize the data points.
|
|
6464
|
+
* @returns - The summary Observation resource.
|
|
6465
|
+
*/
|
|
6466
|
+
export declare function summarizeObservations(observations: Observation[] | Bundle<Observation>, summaryCode: CodeableConcept, summarizeFn: StatsFn): Observation;
|
|
6467
|
+
|
|
6468
|
+
export declare class SymbolAtom implements Atom {
|
|
6469
|
+
readonly name: string;
|
|
6470
|
+
constructor(name: string);
|
|
6471
|
+
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
6472
|
+
private getVariable;
|
|
6473
|
+
private evalValue;
|
|
6474
|
+
toString(): string;
|
|
6475
|
+
}
|
|
6476
|
+
|
|
6477
|
+
/**
|
|
6478
|
+
* Converts unknown object into a JavaScript boolean.
|
|
6479
|
+
* Note that this is different than the FHIRPath "toBoolean",
|
|
6480
|
+
* which has particular semantics around arrays, empty arrays, and type conversions.
|
|
6481
|
+
* @param obj - Any value or array of values.
|
|
6482
|
+
* @returns The converted boolean value according to FHIRPath rules.
|
|
6483
|
+
*/
|
|
6484
|
+
export declare function toJsBoolean(obj: TypedValue[]): boolean;
|
|
6485
|
+
|
|
6486
|
+
export declare interface Token extends Marker {
|
|
6487
|
+
id: string;
|
|
6488
|
+
value: string;
|
|
6489
|
+
}
|
|
6490
|
+
|
|
6491
|
+
export declare class Tokenizer {
|
|
6492
|
+
private readonly str;
|
|
6493
|
+
private readonly keywords;
|
|
6494
|
+
private readonly operators;
|
|
6495
|
+
private readonly dateTimeLiterals;
|
|
6496
|
+
private readonly symbolRegex;
|
|
6497
|
+
private readonly result;
|
|
6498
|
+
private readonly pos;
|
|
6499
|
+
private readonly markStack;
|
|
6500
|
+
constructor(str: string, keywords: string[], operators: string[], options?: TokenizerOptions);
|
|
6501
|
+
tokenize(): Token[];
|
|
6502
|
+
private prevToken;
|
|
6503
|
+
private peekToken;
|
|
6504
|
+
private consumeToken;
|
|
6505
|
+
private consumeWhitespace;
|
|
6506
|
+
private consumeMultiLineComment;
|
|
6507
|
+
private consumeSingleLineComment;
|
|
6508
|
+
private consumeString;
|
|
6509
|
+
private consumeChar;
|
|
6510
|
+
private consumeQuotedSymbol;
|
|
6511
|
+
private consumeDateTime;
|
|
6512
|
+
private consumeNumber;
|
|
6513
|
+
private consumeSymbol;
|
|
6514
|
+
private consumeOperator;
|
|
6515
|
+
private consumeWhile;
|
|
6516
|
+
private curr;
|
|
6517
|
+
private peek;
|
|
6518
|
+
private mark;
|
|
6519
|
+
private reset;
|
|
6520
|
+
private advance;
|
|
6521
|
+
private buildToken;
|
|
6522
|
+
}
|
|
6523
|
+
|
|
6524
|
+
export declare interface TokenizerOptions {
|
|
6525
|
+
dateTimeLiterals?: boolean;
|
|
6526
|
+
symbolRegex?: RegExp;
|
|
6527
|
+
}
|
|
6528
|
+
|
|
6529
|
+
export declare interface TokenResponse {
|
|
6530
|
+
readonly token_type: string;
|
|
6531
|
+
readonly id_token: string;
|
|
6532
|
+
readonly access_token: string;
|
|
6533
|
+
readonly refresh_token: string;
|
|
6534
|
+
readonly expires_in: number;
|
|
6535
|
+
readonly project: Reference<Project>;
|
|
6536
|
+
readonly profile: Reference<ProfileResource>;
|
|
6537
|
+
}
|
|
6538
|
+
|
|
6539
|
+
export declare interface TokensContext {
|
|
6540
|
+
caseInsensitive?: boolean;
|
|
6541
|
+
textSearchSystem?: string;
|
|
6542
|
+
}
|
|
6543
|
+
|
|
6544
|
+
export declare const tooManyRequests: OperationOutcome;
|
|
6545
|
+
|
|
6546
|
+
/**
|
|
6547
|
+
* Tries to convert an unknown input value to a Period object.
|
|
6548
|
+
* @param input - Unknown input value.
|
|
6549
|
+
* @returns A Period object or undefined.
|
|
6550
|
+
*/
|
|
6551
|
+
export declare function toPeriod(input: unknown): Period | undefined;
|
|
6552
|
+
|
|
6553
|
+
/**
|
|
6554
|
+
* Returns a "best guess" TypedValue for a given value.
|
|
6555
|
+
* @param value - The unknown value to check.
|
|
6556
|
+
* @returns A "best guess" TypedValue for the given value.
|
|
6557
|
+
*/
|
|
6558
|
+
export declare function toTypedValue(value: unknown): TypedValue;
|
|
6559
|
+
|
|
6560
|
+
/**
|
|
6561
|
+
* The TransformMapCollection class is a collection of StructureMap and ConceptMap resources.
|
|
6562
|
+
* It is used to store and retrieve imported StructureMaps and ConceptMaps by URL.
|
|
6563
|
+
*/
|
|
6564
|
+
export declare class TransformMapCollection {
|
|
6565
|
+
readonly resources: (StructureMap | ConceptMap)[];
|
|
6566
|
+
constructor(resources?: (StructureMap | ConceptMap)[]);
|
|
6567
|
+
get<K extends ResourceType>(resourceType: K, url: string): ExtractResource<K>[];
|
|
6568
|
+
private matchesUrl;
|
|
6569
|
+
}
|
|
6570
|
+
|
|
6571
|
+
/**
|
|
6572
|
+
* Returns an array with trailing empty elements removed.
|
|
6573
|
+
* For example, [1, 2, 3, null, undefined, ''] becomes [1, 2, 3].
|
|
6574
|
+
* This is useful for FHIR arrays, which by default must maintain the same length,
|
|
6575
|
+
* but while editing we may want to trim trailing empty elements.
|
|
6576
|
+
* @param arr - The input array.
|
|
6577
|
+
* @returns The array with trailing empty elements removed.
|
|
6578
|
+
*/
|
|
6579
|
+
export declare function trimTrailingEmptyElements<T>(arr: T[] | undefined): T[] | undefined;
|
|
6580
|
+
|
|
6581
|
+
export declare function tryGetDataType(type: string, profileUrl?: string): InternalTypeSchema | undefined;
|
|
6582
|
+
|
|
6583
|
+
/**
|
|
6584
|
+
* Returns the JWT expiration time in number of milliseconds elapsed since the epoch.
|
|
6585
|
+
* @param token - The JWT token.
|
|
6586
|
+
* @returns The JWT expiration time in number of milliseconds elapsed since the epoch if available, undefined if unknown.
|
|
6587
|
+
*/
|
|
6588
|
+
export declare function tryGetJwtExpiration(token: string): number | undefined;
|
|
6589
|
+
|
|
6590
|
+
export declare function tryGetProfile(profileUrl: string): InternalTypeSchema | undefined;
|
|
6591
|
+
|
|
6592
|
+
export declare class TypedEventTarget<TEvents extends Record<string, Event_2>> {
|
|
6593
|
+
private readonly emitter;
|
|
6594
|
+
dispatchEvent<TEventType extends keyof TEvents & string>(event: TEvents[TEventType]): void;
|
|
6595
|
+
addEventListener<TEventType extends keyof TEvents & string>(type: TEventType, handler: (event: TEvents[TEventType]) => void): void;
|
|
6596
|
+
removeEventListener<TEventType extends keyof TEvents & string>(type: TEventType, handler: (event: TEvents[TEventType]) => void): void;
|
|
6597
|
+
removeAllListeners(): void;
|
|
6598
|
+
}
|
|
6599
|
+
|
|
6600
|
+
export declare interface TypedValue {
|
|
6601
|
+
readonly type: string;
|
|
6602
|
+
readonly value: any;
|
|
6603
|
+
}
|
|
6604
|
+
|
|
6605
|
+
/**
|
|
6606
|
+
* Converts a typed value to a string.
|
|
6607
|
+
* @param typedValue - The typed value to convert to a string.
|
|
6608
|
+
* @returns The string representation of the typed value.
|
|
6609
|
+
*/
|
|
6610
|
+
export declare function typedValueToString(typedValue: TypedValue | undefined): string;
|
|
6611
|
+
|
|
6612
|
+
export declare type TypedValueWithPath = TypedValue & {
|
|
6613
|
+
path: string;
|
|
6614
|
+
};
|
|
6615
|
+
|
|
6616
|
+
/**
|
|
6617
|
+
* An indexed TypeSchema.
|
|
6618
|
+
*
|
|
6619
|
+
* Example: The IndexedStructureDefinition for "Patient" would include the following TypeSchemas:
|
|
6620
|
+
* 1) Patient
|
|
6621
|
+
* 2) Patient_Contact
|
|
6622
|
+
* 3) Patient_Communication
|
|
6623
|
+
* 4) Patient_Link
|
|
6624
|
+
*/
|
|
6625
|
+
export declare interface TypeInfo {
|
|
6626
|
+
searchParams?: Record<string, SearchParameter>;
|
|
6627
|
+
searchParamsDetails?: Record<string, SearchParameterDetails>;
|
|
6628
|
+
}
|
|
6629
|
+
|
|
6630
|
+
export declare type TypeName<T> = T extends string ? 'string' : T extends number ? 'number' : T extends boolean ? 'boolean' : T extends undefined ? 'undefined' : 'object';
|
|
6631
|
+
|
|
6632
|
+
export declare const UCUM = "http://unitsofmeasure.org";
|
|
6633
|
+
|
|
6634
|
+
export declare class UnaryOperatorAtom extends PrefixOperatorAtom {
|
|
6635
|
+
readonly impl: (x: TypedValue[]) => TypedValue[];
|
|
6636
|
+
constructor(operator: string, child: Atom, impl: (x: TypedValue[]) => TypedValue[]);
|
|
6637
|
+
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
6638
|
+
toString(): string;
|
|
6639
|
+
}
|
|
6640
|
+
|
|
6641
|
+
export declare const unauthorized: OperationOutcome;
|
|
6642
|
+
|
|
6643
|
+
export declare const unauthorizedTokenAudience: OperationOutcome;
|
|
6644
|
+
|
|
6645
|
+
export declare const unauthorizedTokenExpired: OperationOutcome;
|
|
6646
|
+
|
|
6647
|
+
export declare class UnionAtom extends InfixOperatorAtom {
|
|
6648
|
+
constructor(left: Atom, right: Atom);
|
|
6649
|
+
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
6650
|
+
}
|
|
6651
|
+
|
|
6652
|
+
export declare const VALID_HOSTNAME_REGEX: RegExp;
|
|
6653
|
+
|
|
6654
|
+
/**
|
|
6655
|
+
* Validates that a `SubscriptionRequest`.
|
|
6656
|
+
*
|
|
6657
|
+
* @param subscriptionRequest - The `SubscriptionRequest` to validate.
|
|
6658
|
+
* @returns A `boolean` indicating whether or not the `SubscriptionRequest` is valid.
|
|
6659
|
+
*/
|
|
6660
|
+
export declare function validateFhircastSubscriptionRequest(subscriptionRequest: SubscriptionRequest | PendingSubscriptionRequest): boolean;
|
|
6661
|
+
|
|
6662
|
+
export declare function validateResource(resource: Resource, options?: ValidatorOptions): OperationOutcomeIssue[];
|
|
6663
|
+
|
|
6664
|
+
/**
|
|
6665
|
+
* Validates that the given string is a valid FHIR resource type.
|
|
6666
|
+
*
|
|
6667
|
+
* On success, silently returns void.
|
|
6668
|
+
* On failure, throws an OperationOutcomeError.
|
|
6669
|
+
*
|
|
6670
|
+
* @example
|
|
6671
|
+
* ```ts
|
|
6672
|
+
* validateResourceType('Patient'); // nothing
|
|
6673
|
+
* validateResourceType('XYZ'); // throws OperationOutcomeError
|
|
6674
|
+
* ```
|
|
6675
|
+
*
|
|
6676
|
+
* Note that this depends on globalSchema, which is populated by the StructureDefinition loader.
|
|
6677
|
+
*
|
|
6678
|
+
* @example
|
|
6679
|
+
* In a server context, you can load all schema definitions:
|
|
6680
|
+
*
|
|
6681
|
+
* ```ts
|
|
6682
|
+
* import { indexStructureDefinitionBundle } from '@medplum/core';
|
|
6683
|
+
* import { readJson } from '@medplum/definitions';
|
|
6684
|
+
* import { Bundle } from '@medplum/fhirtypes';
|
|
6685
|
+
*
|
|
6686
|
+
* indexStructureDefinitionBundle(readJson('fhir/r4/profiles-resources.json') as Bundle);
|
|
6687
|
+
* ```
|
|
6688
|
+
*
|
|
6689
|
+
* @example
|
|
6690
|
+
* In a client context, you can load the schema definitions using MedplumClient:
|
|
6691
|
+
*
|
|
6692
|
+
* ```ts
|
|
6693
|
+
* import { MedplumClient } from '@medplum/core';
|
|
6694
|
+
*
|
|
6695
|
+
* const medplum = new MedplumClient();
|
|
6696
|
+
* await medplum.requestSchema('Patient');
|
|
6697
|
+
* ```
|
|
6698
|
+
*
|
|
6699
|
+
* @param resourceType - The candidate resource type string.
|
|
6700
|
+
*/
|
|
6701
|
+
export declare function validateResourceType(resourceType: string): void;
|
|
6702
|
+
|
|
6703
|
+
export declare function validateTypedValue(typedValue: TypedValue, options?: ValidatorOptions): OperationOutcomeIssue[];
|
|
6704
|
+
|
|
6705
|
+
export declare function validationError(details: string): OperationOutcome;
|
|
6706
|
+
|
|
6707
|
+
export declare const validationRegexes: Record<string, RegExp>;
|
|
6708
|
+
|
|
6709
|
+
export declare interface ValidatorOptions {
|
|
6710
|
+
profile?: StructureDefinition;
|
|
6711
|
+
}
|
|
6712
|
+
|
|
6713
|
+
export declare type ValueOrExternalSecret<T extends ExternalSecretPrimitive> = T | ExternalSecret<T>;
|
|
6714
|
+
|
|
6715
|
+
/**
|
|
6716
|
+
* ValueSet $expand operation parameters.
|
|
6717
|
+
* See {@link https://hl7.org/fhir/r4/valueset-operation-expand.html | FHIR ValueSet $expand Operation Parameters} for full details.
|
|
6718
|
+
*/
|
|
6719
|
+
export declare interface ValueSetExpandParams {
|
|
6720
|
+
url?: string;
|
|
6721
|
+
filter?: string;
|
|
6722
|
+
date?: string;
|
|
6723
|
+
offset?: number;
|
|
6724
|
+
count?: number;
|
|
6725
|
+
}
|
|
6726
|
+
|
|
6727
|
+
/**
|
|
6728
|
+
* Checks if a newer version of Medplum is available and logs a warning if so.
|
|
6729
|
+
* @param appName - The name of the app to check the version for.
|
|
6730
|
+
* @param params - An optional list of key-value pairs to be appended to the URL query string.
|
|
6731
|
+
*/
|
|
6732
|
+
export declare function warnIfNewerVersionAvailable(appName: string, params?: Record<string, string>): Promise<void>;
|
|
6733
|
+
|
|
6734
|
+
declare type WebSocketEventMap_2 = {
|
|
6735
|
+
close: CloseEvent_2;
|
|
6736
|
+
error: ErrorEvent_2;
|
|
6737
|
+
message: MessageEvent;
|
|
6738
|
+
open: Event;
|
|
6739
|
+
};
|
|
6740
|
+
export { WebSocketEventMap_2 as WebSocketEventMap }
|
|
6741
|
+
|
|
6742
|
+
export declare type WithId<T> = T & {
|
|
6743
|
+
id: string;
|
|
6744
|
+
};
|
|
6745
|
+
|
|
6746
|
+
/**
|
|
6747
|
+
* Returns a word-wrapped string.
|
|
6748
|
+
* Based on: https://stackoverflow.com/a/38709683
|
|
6749
|
+
* @param text - Original input string.
|
|
6750
|
+
* @param maxLength - Width in number of characters.
|
|
6751
|
+
* @returns Array of lines.
|
|
6752
|
+
*/
|
|
6753
|
+
export declare function wordWrap(text: string, maxLength: number): string[];
|
|
6754
|
+
|
|
6755
|
+
/**
|
|
6756
|
+
* 6.5.4. xor
|
|
6757
|
+
* Returns true if exactly one of the operands evaluates to true,
|
|
6758
|
+
* false if either both operands evaluate to true or both operands evaluate to false,
|
|
6759
|
+
* and the empty collection otherwise.
|
|
6760
|
+
*/
|
|
6761
|
+
export declare class XorAtom extends BooleanInfixOperatorAtom {
|
|
6762
|
+
constructor(left: Atom, right: Atom);
|
|
6763
|
+
eval(context: AtomContext, input: TypedValue[]): TypedValue[];
|
|
6764
|
+
}
|
|
6765
|
+
|
|
6766
|
+
export { }
|