-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.d.ts
55 lines (50 loc) · 2.15 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
type RecordObject = import('cql-execution').RecordObject;
type PatientObject = import('cql-execution').PatientObject;
type DataProvider = import('cql-execution').DataProvider;
type RetrieveDetails = import('cql-execution').RetrieveDetails;
type Code = import('cql-execution').Code;
type DateTime = import('cql-execution').DateTime;
type Interval = import('cql-execution').Interval;
class FHIRObject implements RecordObject {
constructor(json: any, typeInfo: any, modelInfo: any);
get(field: string): any;
getId(): string;
getCode(field: string): Code;
getDate(field: string): DateTime;
getInterval(field: string): Interval;
getDateOrInterval(field: string): DateTime | Interval;
_is(typeSpecifier: any): boolean;
_typeHierarchy(): any[];
getTypeInfo(): any;
}
class Patient extends FHIRObject implements PatientObject {
constructor(bundle: any, modelInfo: any, patientSourceOptions: PatientSourceOptions);
findRecords(profile: string, retrieveDetails?: RetrieveDetails): FHIRObject[];
findRecord(profile: string, retrieveDetails?: RetrieveDetails): FHIRObject;
}
declare module 'cql-exec-fhir' {
export interface PatientSourceOptions {
requireProfileTagging?: boolean;
}
export class PatientSource implements DataProvider {
constructor(filePathOrXML: string, patientSourceOptions?: PatientSourceOptions);
static FHIRv102(patientSourceOptions?: PatientSourceOptions): PatientSource;
static FHIRv300(patientSourceOptions?: PatientSourceOptions): PatientSource;
static FHIRv400(patientSourceOptions?: PatientSourceOptions): PatientSource;
static FHIRv401(patientSourceOptions?: PatientSourceOptions): PatientSource;
get version(): string;
loadBundles(bundles: any[]): void;
currentPatient(): Patient | undefined;
nextPatient(): Patient | undefined;
reset(): void;
}
export class FHIRWrapper {
constructor(filePathOrXML: string);
static FHIRv102(): FHIRWrapper;
static FHIRv300(): FHIRWrapper;
static FHIRv400(): FHIRWrapper;
static FHIRv401(): FHIRWrapper;
wrap(fhirJson: any, fhirResourceType?: string): FHIRObject;
_typeCastIsAllowed(currentClass: any, targetClass: any): boolean;
}
}