@astm-e1394/dictionary 0.0.0-stage → 1.0.0-beta.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/LICENSE +21 -0
- package/README.md +46 -2
- package/astm-date.util.d.ts +13 -0
- package/astm-date.util.js +90 -0
- package/astm-dictionary.d.ts +36 -0
- package/astm-dictionary.js +69 -0
- package/astm-number.util.d.ts +4 -0
- package/astm-number.util.js +43 -0
- package/astm-records.d.ts +2 -0
- package/astm-records.js +164 -0
- package/astm-types.d.ts +2 -0
- package/astm-types.js +66 -0
- package/index.d.ts +9 -0
- package/index.js +9 -0
- package/package.json +22 -3
- package/record-fields/c-record.enum.d.ts +8 -0
- package/record-fields/c-record.enum.js +9 -0
- package/record-fields/h-record.enum.d.ts +17 -0
- package/record-fields/h-record.enum.js +18 -0
- package/record-fields/index.d.ts +9 -0
- package/record-fields/index.js +9 -0
- package/record-fields/l-record.enum.d.ts +6 -0
- package/record-fields/l-record.enum.js +7 -0
- package/record-fields/m-record.enum.d.ts +5 -0
- package/record-fields/m-record.enum.js +6 -0
- package/record-fields/o-record.enum.d.ts +34 -0
- package/record-fields/o-record.enum.js +35 -0
- package/record-fields/p-record.enum.d.ts +38 -0
- package/record-fields/p-record.enum.js +39 -0
- package/record-fields/q-record.enum.d.ts +16 -0
- package/record-fields/q-record.enum.js +17 -0
- package/record-fields/r-record.enum.d.ts +17 -0
- package/record-fields/r-record.enum.js +18 -0
- package/record-fields/s-record.enum.d.ts +24 -0
- package/record-fields/s-record.enum.js +25 -0
- package/tables/astm-tables.d.ts +2 -0
- package/tables/astm-tables.js +128 -0
- package/tables/codes.enum.d.ts +125 -0
- package/tables/codes.enum.js +141 -0
- package/tables/index.d.ts +2 -0
- package/tables/index.js +2 -0
- package/type-fields/ad-type.enum.d.ts +8 -0
- package/type-fields/ad-type.enum.js +9 -0
- package/type-fields/cn-type.enum.d.ts +9 -0
- package/type-fields/cn-type.enum.js +10 -0
- package/type-fields/cq-type.enum.d.ts +5 -0
- package/type-fields/cq-type.enum.js +6 -0
- package/type-fields/index.d.ts +6 -0
- package/type-fields/index.js +6 -0
- package/type-fields/pn-type.enum.d.ts +8 -0
- package/type-fields/pn-type.enum.js +9 -0
- package/type-fields/spd-type.enum.d.ts +5 -0
- package/type-fields/spd-type.enum.js +6 -0
- package/type-fields/uti-type.enum.d.ts +7 -0
- package/type-fields/uti-type.enum.js +8 -0
- package/types.d.ts +36 -0
- package/types.js +1 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* The codes of the tables in astm-tables.ts, by name */
|
|
2
|
+
export var ProcessingID;
|
|
3
|
+
(function (ProcessingID) {
|
|
4
|
+
ProcessingID["Production"] = "P";
|
|
5
|
+
ProcessingID["Training"] = "T";
|
|
6
|
+
ProcessingID["Debugging"] = "D";
|
|
7
|
+
ProcessingID["QualityControl"] = "Q";
|
|
8
|
+
})(ProcessingID || (ProcessingID = {}));
|
|
9
|
+
export var Sex;
|
|
10
|
+
(function (Sex) {
|
|
11
|
+
Sex["Male"] = "M";
|
|
12
|
+
Sex["Female"] = "F";
|
|
13
|
+
Sex["Unknown"] = "U";
|
|
14
|
+
})(Sex || (Sex = {}));
|
|
15
|
+
export var AdmissionStatus;
|
|
16
|
+
(function (AdmissionStatus) {
|
|
17
|
+
AdmissionStatus["Outpatient"] = "OP";
|
|
18
|
+
AdmissionStatus["Preadmit"] = "PR";
|
|
19
|
+
AdmissionStatus["Inpatient"] = "IP";
|
|
20
|
+
AdmissionStatus["EmergencyRoom"] = "ER";
|
|
21
|
+
})(AdmissionStatus || (AdmissionStatus = {}));
|
|
22
|
+
export var MaritalStatus;
|
|
23
|
+
(function (MaritalStatus) {
|
|
24
|
+
MaritalStatus["Married"] = "M";
|
|
25
|
+
MaritalStatus["Single"] = "S";
|
|
26
|
+
MaritalStatus["Divorced"] = "D";
|
|
27
|
+
MaritalStatus["Widowed"] = "W";
|
|
28
|
+
MaritalStatus["Separated"] = "A";
|
|
29
|
+
})(MaritalStatus || (MaritalStatus = {}));
|
|
30
|
+
export var Priority;
|
|
31
|
+
(function (Priority) {
|
|
32
|
+
Priority["Stat"] = "S";
|
|
33
|
+
Priority["ASAP"] = "A";
|
|
34
|
+
Priority["Routine"] = "R";
|
|
35
|
+
Priority["Callback"] = "C";
|
|
36
|
+
Priority["Preoperative"] = "P";
|
|
37
|
+
})(Priority || (Priority = {}));
|
|
38
|
+
export var ActionCode;
|
|
39
|
+
(function (ActionCode) {
|
|
40
|
+
ActionCode["Cancel"] = "C";
|
|
41
|
+
ActionCode["Add"] = "A";
|
|
42
|
+
ActionCode["New"] = "N";
|
|
43
|
+
ActionCode["Pending"] = "P";
|
|
44
|
+
ActionCode["Reserved"] = "L";
|
|
45
|
+
ActionCode["InProcess"] = "X";
|
|
46
|
+
ActionCode["QualityControl"] = "Q";
|
|
47
|
+
})(ActionCode || (ActionCode = {}));
|
|
48
|
+
export var ReportType;
|
|
49
|
+
(function (ReportType) {
|
|
50
|
+
ReportType["Order"] = "O";
|
|
51
|
+
ReportType["Correction"] = "C";
|
|
52
|
+
ReportType["Preliminary"] = "P";
|
|
53
|
+
ReportType["Final"] = "F";
|
|
54
|
+
ReportType["Cancelled"] = "X";
|
|
55
|
+
ReportType["InInstrumentPending"] = "I";
|
|
56
|
+
ReportType["NoOrder"] = "Y";
|
|
57
|
+
ReportType["NoPatient"] = "Z";
|
|
58
|
+
ReportType["QueryResponse"] = "Q";
|
|
59
|
+
})(ReportType || (ReportType = {}));
|
|
60
|
+
export var AbnormalFlag;
|
|
61
|
+
(function (AbnormalFlag) {
|
|
62
|
+
AbnormalFlag["Low"] = "L";
|
|
63
|
+
AbnormalFlag["High"] = "H";
|
|
64
|
+
AbnormalFlag["PanicLow"] = "LL";
|
|
65
|
+
AbnormalFlag["PanicHigh"] = "HH";
|
|
66
|
+
AbnormalFlag["BelowAbsoluteLow"] = "<";
|
|
67
|
+
AbnormalFlag["AboveAbsoluteHigh"] = ">";
|
|
68
|
+
AbnormalFlag["Normal"] = "N";
|
|
69
|
+
AbnormalFlag["Abnormal"] = "A";
|
|
70
|
+
AbnormalFlag["SignificantChangeUp"] = "U";
|
|
71
|
+
AbnormalFlag["SignificantChangeDown"] = "D";
|
|
72
|
+
AbnormalFlag["Better"] = "B";
|
|
73
|
+
AbnormalFlag["Worse"] = "W";
|
|
74
|
+
})(AbnormalFlag || (AbnormalFlag = {}));
|
|
75
|
+
/** Nature of abnormality testing (R-8): any combination of these codes */
|
|
76
|
+
export var NatureOfAbnormalityTesting;
|
|
77
|
+
(function (NatureOfAbnormalityTesting) {
|
|
78
|
+
NatureOfAbnormalityTesting["AgeBased"] = "A";
|
|
79
|
+
NatureOfAbnormalityTesting["SexBased"] = "S";
|
|
80
|
+
NatureOfAbnormalityTesting["RaceBased"] = "R";
|
|
81
|
+
NatureOfAbnormalityTesting["Generic"] = "N";
|
|
82
|
+
})(NatureOfAbnormalityTesting || (NatureOfAbnormalityTesting = {}));
|
|
83
|
+
export var ResultStatus;
|
|
84
|
+
(function (ResultStatus) {
|
|
85
|
+
ResultStatus["Correction"] = "C";
|
|
86
|
+
ResultStatus["Preliminary"] = "P";
|
|
87
|
+
ResultStatus["Final"] = "F";
|
|
88
|
+
ResultStatus["Cancelled"] = "X";
|
|
89
|
+
ResultStatus["InInstrumentPending"] = "I";
|
|
90
|
+
ResultStatus["Partial"] = "S";
|
|
91
|
+
ResultStatus["MICLevel"] = "M";
|
|
92
|
+
ResultStatus["PreviouslyTransmitted"] = "R";
|
|
93
|
+
ResultStatus["NewOrderInformation"] = "N";
|
|
94
|
+
ResultStatus["QueryResponse"] = "Q";
|
|
95
|
+
ResultStatus["OperatorVerified"] = "V";
|
|
96
|
+
ResultStatus["Warning"] = "W";
|
|
97
|
+
})(ResultStatus || (ResultStatus = {}));
|
|
98
|
+
export var CommentSource;
|
|
99
|
+
(function (CommentSource) {
|
|
100
|
+
CommentSource["Practice"] = "P";
|
|
101
|
+
CommentSource["InformationSystem"] = "L";
|
|
102
|
+
CommentSource["Instrument"] = "I";
|
|
103
|
+
})(CommentSource || (CommentSource = {}));
|
|
104
|
+
export var CommentType;
|
|
105
|
+
(function (CommentType) {
|
|
106
|
+
CommentType["Generic"] = "G";
|
|
107
|
+
CommentType["TestName"] = "T";
|
|
108
|
+
CommentType["Positive"] = "P";
|
|
109
|
+
CommentType["Negative"] = "N";
|
|
110
|
+
CommentType["InstrumentFlag"] = "I";
|
|
111
|
+
})(CommentType || (CommentType = {}));
|
|
112
|
+
export var RequestTimeLimits;
|
|
113
|
+
(function (RequestTimeLimits) {
|
|
114
|
+
RequestTimeLimits["SpecimenCollectDate"] = "S";
|
|
115
|
+
RequestTimeLimits["ResultTestDate"] = "R";
|
|
116
|
+
})(RequestTimeLimits || (RequestTimeLimits = {}));
|
|
117
|
+
export var RequestStatus;
|
|
118
|
+
(function (RequestStatus) {
|
|
119
|
+
RequestStatus["Correction"] = "C";
|
|
120
|
+
RequestStatus["Preliminary"] = "P";
|
|
121
|
+
RequestStatus["Final"] = "F";
|
|
122
|
+
RequestStatus["Cancelled"] = "X";
|
|
123
|
+
RequestStatus["Pending"] = "I";
|
|
124
|
+
RequestStatus["Partial"] = "S";
|
|
125
|
+
RequestStatus["MICLevel"] = "M";
|
|
126
|
+
RequestStatus["PreviouslyTransmitted"] = "R";
|
|
127
|
+
RequestStatus["Abort"] = "A";
|
|
128
|
+
RequestStatus["NewOnly"] = "N";
|
|
129
|
+
RequestStatus["OrdersAndDemographics"] = "O";
|
|
130
|
+
RequestStatus["DemographicsOnly"] = "D";
|
|
131
|
+
})(RequestStatus || (RequestStatus = {}));
|
|
132
|
+
export var TerminationCode;
|
|
133
|
+
(function (TerminationCode) {
|
|
134
|
+
TerminationCode["Normal"] = "N";
|
|
135
|
+
TerminationCode["SenderAborted"] = "T";
|
|
136
|
+
TerminationCode["ReceiverAborted"] = "R";
|
|
137
|
+
TerminationCode["SystemError"] = "E";
|
|
138
|
+
TerminationCode["QueryError"] = "Q";
|
|
139
|
+
TerminationCode["NoInformation"] = "I";
|
|
140
|
+
TerminationCode["QueryProcessed"] = "F";
|
|
141
|
+
})(TerminationCode || (TerminationCode = {}));
|
package/tables/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Component positions of the Address type (AD) */
|
|
2
|
+
export var ADType;
|
|
3
|
+
(function (ADType) {
|
|
4
|
+
ADType[ADType["StreetAddress"] = 1] = "StreetAddress";
|
|
5
|
+
ADType[ADType["City"] = 2] = "City";
|
|
6
|
+
ADType[ADType["State"] = 3] = "State";
|
|
7
|
+
ADType[ADType["ZipCode"] = 4] = "ZipCode";
|
|
8
|
+
ADType[ADType["CountryCode"] = 5] = "CountryCode";
|
|
9
|
+
})(ADType || (ADType = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Component positions of the Physician type (CN) */
|
|
2
|
+
export var CNType;
|
|
3
|
+
(function (CNType) {
|
|
4
|
+
CNType[CNType["ID"] = 1] = "ID";
|
|
5
|
+
CNType[CNType["LastName"] = 2] = "LastName";
|
|
6
|
+
CNType[CNType["FirstName"] = 3] = "FirstName";
|
|
7
|
+
CNType[CNType["MiddleName"] = 4] = "MiddleName";
|
|
8
|
+
CNType[CNType["Suffix"] = 5] = "Suffix";
|
|
9
|
+
CNType[CNType["Title"] = 6] = "Title";
|
|
10
|
+
})(CNType || (CNType = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Component positions of the Person name type (PN) */
|
|
2
|
+
export var PNType;
|
|
3
|
+
(function (PNType) {
|
|
4
|
+
PNType[PNType["LastName"] = 1] = "LastName";
|
|
5
|
+
PNType[PNType["FirstName"] = 2] = "FirstName";
|
|
6
|
+
PNType[PNType["MiddleName"] = 3] = "MiddleName";
|
|
7
|
+
PNType[PNType["Suffix"] = 4] = "Suffix";
|
|
8
|
+
PNType[PNType["Title"] = 5] = "Title";
|
|
9
|
+
})(PNType || (PNType = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Component positions of the Universal test ID type (UTI) */
|
|
2
|
+
export var UTIType;
|
|
3
|
+
(function (UTIType) {
|
|
4
|
+
UTIType[UTIType["UniversalTestID"] = 1] = "UniversalTestID";
|
|
5
|
+
UTIType[UTIType["UniversalTestIDName"] = 2] = "UniversalTestIDName";
|
|
6
|
+
UTIType[UTIType["UniversalTestIDType"] = 3] = "UniversalTestIDType";
|
|
7
|
+
UTIType[UTIType["ManufacturerLocalCode"] = 4] = "ManufacturerLocalCode";
|
|
8
|
+
})(UTIType || (UTIType = {}));
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** A record type: H, P, O, R, C, Q, M, S or L */
|
|
2
|
+
export interface AstmRecordDefinition {
|
|
3
|
+
desc?: string;
|
|
4
|
+
fields: Record<string, // field position, the record type ID being field 1
|
|
5
|
+
AstmFieldDefinition>;
|
|
6
|
+
}
|
|
7
|
+
export interface AstmFieldDefinition {
|
|
8
|
+
/** The data type: a key of AstmDictionary.types */
|
|
9
|
+
type: string;
|
|
10
|
+
desc?: string;
|
|
11
|
+
/** Whether the field may repeat */
|
|
12
|
+
rep?: boolean;
|
|
13
|
+
/** The table its codes are from: a key of AstmDictionary.tables */
|
|
14
|
+
table?: string;
|
|
15
|
+
encode?: (v: any) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Reads a value into what the library holds. `read` is true for a value
|
|
18
|
+
* from ASTM text, which must be in ASTM's own format; false for one given
|
|
19
|
+
* in code, which may be more (a Date, an ISO 8601 date/time).
|
|
20
|
+
*/
|
|
21
|
+
decode?: (v: any, read?: boolean) => any;
|
|
22
|
+
}
|
|
23
|
+
export interface AstmDataTypeDefinition {
|
|
24
|
+
desc?: string;
|
|
25
|
+
/** The components of a composite type, by position from 1 */
|
|
26
|
+
fields?: Record<string, AstmFieldDefinition>;
|
|
27
|
+
encode?: (v: any) => string;
|
|
28
|
+
/** See AstmFieldDefinition.decode */
|
|
29
|
+
decode?: (v: any, read?: boolean) => any;
|
|
30
|
+
}
|
|
31
|
+
/** The values a coded field takes */
|
|
32
|
+
export interface AstmTableDefinition {
|
|
33
|
+
desc?: string;
|
|
34
|
+
/** Code: its text */
|
|
35
|
+
values: Record<string, string>;
|
|
36
|
+
}
|
package/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|