cql_qdm_patientapi 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +4 -4
- data/app/assets/javascripts/datatypes/adverseevent.js.coffee +9 -9
- data/app/assets/javascripts/datatypes/allergyintolerance.js.coffee +8 -8
- data/app/assets/javascripts/datatypes/assessment.js.coffee +67 -38
- data/app/assets/javascripts/datatypes/careexperience.js.coffee +7 -7
- data/app/assets/javascripts/datatypes/caregoal.js.coffee +8 -8
- data/app/assets/javascripts/datatypes/communication.js.coffee +51 -65
- data/app/assets/javascripts/datatypes/datatype.js.coffee +14 -9
- data/app/assets/javascripts/datatypes/device.js.coffee +21 -31
- data/app/assets/javascripts/datatypes/diagnosis.js.coffee +8 -8
- data/app/assets/javascripts/datatypes/diagnosticstudy.js.coffee +26 -46
- data/app/assets/javascripts/datatypes/encounter.js.coffee +26 -26
- data/app/assets/javascripts/datatypes/familyhistory.js.coffee +5 -5
- data/app/assets/javascripts/datatypes/immunization.js.coffee +19 -28
- data/app/assets/javascripts/datatypes/intervention.js.coffee +23 -23
- data/app/assets/javascripts/datatypes/laboratorytest.js.coffee +28 -48
- data/app/assets/javascripts/datatypes/medication.js.coffee +141 -81
- data/app/assets/javascripts/datatypes/participation.js.coffee +5 -5
- data/app/assets/javascripts/datatypes/patient_characteristic.js.coffee +4 -4
- data/app/assets/javascripts/datatypes/patient_characteristic_payer.js.coffee +6 -6
- data/app/assets/javascripts/datatypes/physicalexam.js.coffee +27 -47
- data/app/assets/javascripts/datatypes/procedure.js.coffee +32 -82
- data/app/assets/javascripts/datatypes/substance.js.coffee +31 -70
- data/app/assets/javascripts/datatypes/symptom.js.coffee +6 -6
- data/app/assets/javascripts/utils/helpers.js.coffee +8 -2
- data/lib/cql_qdm_patientapi/version.rb +1 -1
- data/vendor/assets/javascripts/cql4browsers.js +1520 -556
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a223682b6169cd2d77aee7a38ca3641dfe08b59454fbbf070e6253c0ebe8e252
|
4
|
+
data.tar.gz: 90844909701048290940079d8ef66189a2debbbf4e3db933e03a599bf4f2314c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cde1743be206ee2d84dcfd6e5f60edb2751652656679cecaa0c79e609e9fb43d0816844bd709c8e246d0289d1134fd3f6ade97f0df763c6def298ec6b8c93b5c
|
7
|
+
data.tar.gz: 23d09bee95558466d483c11fb79bda2f2d1e2a5ea2a4d4025b0a316561850042f4ee969a075ba16e886315a1e59ec983160223cbb11647cf51946aa104d55294
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cql_qdm_patientapi (1.
|
4
|
+
cql_qdm_patientapi (1.3.0)
|
5
5
|
coffee-rails (~> 4.1)
|
6
6
|
rails (~> 4.2)
|
7
7
|
sprockets-rails (~> 2.3)
|
@@ -66,12 +66,12 @@ GEM
|
|
66
66
|
loofah (2.2.2)
|
67
67
|
crass (~> 1.0.2)
|
68
68
|
nokogiri (>= 1.5.9)
|
69
|
-
mail (2.7.
|
69
|
+
mail (2.7.1)
|
70
70
|
mini_mime (>= 0.1.1)
|
71
|
-
mini_mime (1.0.
|
71
|
+
mini_mime (1.0.1)
|
72
72
|
mini_portile2 (2.3.0)
|
73
73
|
minitest (5.10.3)
|
74
|
-
nokogiri (1.8.
|
74
|
+
nokogiri (1.8.5)
|
75
75
|
mini_portile2 (~> 2.3.0)
|
76
76
|
phantomjs (2.1.1.0)
|
77
77
|
rack (1.6.8)
|
@@ -12,18 +12,18 @@ class CQL_QDM.AdverseEvent extends CQL_QDM.QDMDatatype
|
|
12
12
|
###
|
13
13
|
@param {Object} entry - the HDS data criteria object to convert
|
14
14
|
###
|
15
|
-
constructor: (
|
16
|
-
super
|
17
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
18
|
-
@_facilityLocation =
|
19
|
-
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(
|
20
|
-
if
|
21
|
-
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
15
|
+
constructor: (entry) ->
|
16
|
+
super entry
|
17
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
18
|
+
@_facilityLocation = entry.facility
|
19
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
20
|
+
if entry.end_time
|
21
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
22
22
|
else
|
23
23
|
# No end time; high is set to infinity
|
24
24
|
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
25
|
-
@_severity =
|
26
|
-
@_type =
|
25
|
+
@_severity = entry.severity
|
26
|
+
@_type = entry.type
|
27
27
|
|
28
28
|
###
|
29
29
|
@returns {Date}
|
@@ -15,17 +15,17 @@ class CQL_QDM.AllergyIntolerance extends CQL_QDM.QDMDatatype
|
|
15
15
|
###
|
16
16
|
@param {Object} entry - the HDS data criteria object to convert
|
17
17
|
###
|
18
|
-
constructor: (
|
19
|
-
super
|
20
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
21
|
-
@_prevalencePeriodLow = CQL_QDM.Helpers.convertDateTime(
|
22
|
-
if
|
23
|
-
@_prevalencePeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
18
|
+
constructor: (entry) ->
|
19
|
+
super entry
|
20
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
21
|
+
@_prevalencePeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
22
|
+
if entry.end_time
|
23
|
+
@_prevalencePeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
24
24
|
else
|
25
25
|
# No end time; high is set to infinity
|
26
26
|
@_prevalencePeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
27
|
-
@_severity =
|
28
|
-
@_type =
|
27
|
+
@_severity = entry.severity
|
28
|
+
@_type = entry.type
|
29
29
|
|
30
30
|
###
|
31
31
|
@returns {Date}
|
@@ -4,6 +4,54 @@ their methods will be accessable through the CQL_QDM namespace)
|
|
4
4
|
###
|
5
5
|
@CQL_QDM ||= {}
|
6
6
|
|
7
|
+
###
|
8
|
+
Data elements that meet these criteria using this datatype should document an
|
9
|
+
order by a clinician or appropriately licensed care provider to a patient or
|
10
|
+
an appropriate provider or organization to perform an assessment indicated by
|
11
|
+
the QDM category and its corresponding value set.
|
12
|
+
|
13
|
+
Timing: The time the order is authored (i.e., provided to the patient).
|
14
|
+
|
15
|
+
NOTE: Orders address the time that the order is authored, a single point in time.
|
16
|
+
Some assessment orders will be addressed as components of a care plan which
|
17
|
+
incorporates the period (or timing) when the order is to be carried out. Measure
|
18
|
+
developers should address feasibility of clinical workflow to capture Assessment,
|
19
|
+
Order when evaluating measures.
|
20
|
+
###
|
21
|
+
class CQL_QDM.AssessmentOrder extends CQL_QDM.QDMDatatype
|
22
|
+
###
|
23
|
+
@param {Object} entry - the HDS data criteria object to convert
|
24
|
+
###
|
25
|
+
constructor: (entry) ->
|
26
|
+
super entry
|
27
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
28
|
+
@_negationRationale = entry.negationReason
|
29
|
+
@_reason = entry.reason
|
30
|
+
delete entry.end_time
|
31
|
+
|
32
|
+
###
|
33
|
+
@returns {Date}
|
34
|
+
###
|
35
|
+
authorDatetime: ->
|
36
|
+
@_authorDatetime
|
37
|
+
|
38
|
+
###
|
39
|
+
@returns {Code}
|
40
|
+
###
|
41
|
+
negationRationale: ->
|
42
|
+
if @_negationRationale?
|
43
|
+
new cql.Code(@_negationRationale.code, @_negationRationale.code_system, null, @_negationRationale.title || null)
|
44
|
+
else
|
45
|
+
null
|
46
|
+
|
47
|
+
###
|
48
|
+
@returns {Code}
|
49
|
+
###
|
50
|
+
reason: ->
|
51
|
+
if @_reason?
|
52
|
+
new cql.Code(@_reason.code, @_reason.code_system, null, @_reason.title || null)
|
53
|
+
else
|
54
|
+
null
|
7
55
|
|
8
56
|
###
|
9
57
|
Data elements that meet criteria using this datatype should document completion
|
@@ -15,17 +63,17 @@ class CQL_QDM.AssessmentPerformed extends CQL_QDM.QDMDatatype
|
|
15
63
|
###
|
16
64
|
@param {Object} entry - the HDS data criteria object to convert
|
17
65
|
###
|
18
|
-
constructor: (
|
19
|
-
super
|
20
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
21
|
-
@_method =
|
22
|
-
@_negationRationale =
|
23
|
-
@_reason =
|
24
|
-
if
|
25
|
-
@_result =
|
26
|
-
@_relatedTo =
|
27
|
-
@_components =
|
28
|
-
delete
|
66
|
+
constructor: (entry) ->
|
67
|
+
super entry
|
68
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
69
|
+
@_method = entry.method
|
70
|
+
@_negationRationale = entry.negationReason
|
71
|
+
@_reason = entry.reason
|
72
|
+
if entry.values? && entry.values.length > 0
|
73
|
+
@_result = entry.values?[0]
|
74
|
+
@_relatedTo = entry.references
|
75
|
+
@_components = entry.components
|
76
|
+
delete entry.end_time
|
29
77
|
|
30
78
|
###
|
31
79
|
@returns {Date}
|
@@ -108,15 +156,14 @@ class CQL_QDM.AssessmentRecommended extends CQL_QDM.QDMDatatype
|
|
108
156
|
###
|
109
157
|
@param {Object} entry - the HDS data criteria object to convert
|
110
158
|
###
|
111
|
-
constructor: (
|
112
|
-
super
|
113
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
114
|
-
@
|
115
|
-
@
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
delete @entry.end_time
|
159
|
+
constructor: (entry) ->
|
160
|
+
super entry
|
161
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
162
|
+
@_negationRationale = entry.negationReason
|
163
|
+
@_reason = entry.reason
|
164
|
+
if entry.values? && entry.values.length > 0
|
165
|
+
@_result = entry.values?[0]
|
166
|
+
delete entry.end_time
|
120
167
|
|
121
168
|
###
|
122
169
|
@returns {Date}
|
@@ -124,15 +171,6 @@ class CQL_QDM.AssessmentRecommended extends CQL_QDM.QDMDatatype
|
|
124
171
|
authorDatetime: ->
|
125
172
|
@_authorDatetime
|
126
173
|
|
127
|
-
###
|
128
|
-
@returns {Code}
|
129
|
-
###
|
130
|
-
method: ->
|
131
|
-
if @_method?
|
132
|
-
new cql.Code(@_method.code, @_method.code_system, null, @_method.title || null)
|
133
|
-
else
|
134
|
-
null
|
135
|
-
|
136
174
|
###
|
137
175
|
@returns {Code}
|
138
176
|
###
|
@@ -150,12 +188,3 @@ class CQL_QDM.AssessmentRecommended extends CQL_QDM.QDMDatatype
|
|
150
188
|
new cql.Code(@_reason.code, @_reason.code_system, null, @_reason.title || null)
|
151
189
|
else
|
152
190
|
null
|
153
|
-
|
154
|
-
###
|
155
|
-
@returns {Code}
|
156
|
-
###
|
157
|
-
method: ->
|
158
|
-
if @_method?
|
159
|
-
new cql.Code(@_method.code, @_method.code_system, null, @_method.title || null)
|
160
|
-
else
|
161
|
-
null
|
@@ -14,10 +14,10 @@ class CQL_QDM.PatientCareExperience extends CQL_QDM.QDMDatatype
|
|
14
14
|
###
|
15
15
|
@param {Object} entry - the HDS data criteria object to convert
|
16
16
|
###
|
17
|
-
constructor: (
|
18
|
-
super
|
19
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
20
|
-
delete
|
17
|
+
constructor: (entry) ->
|
18
|
+
super entry
|
19
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
20
|
+
delete entry.end_time
|
21
21
|
|
22
22
|
###
|
23
23
|
@returns {Date}
|
@@ -37,9 +37,9 @@ class CQL_QDM.ProviderCareExperience extends CQL_QDM.QDMDatatype
|
|
37
37
|
###
|
38
38
|
@param {Object} entry - the HDS data criteria object to convert
|
39
39
|
###
|
40
|
-
constructor: (
|
41
|
-
super
|
42
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
40
|
+
constructor: (entry) ->
|
41
|
+
super entry
|
42
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
43
43
|
|
44
44
|
###
|
45
45
|
@returns {Date}
|
@@ -15,17 +15,17 @@ class CQL_QDM.CareGoal extends CQL_QDM.QDMDatatype
|
|
15
15
|
###
|
16
16
|
@param {Object} entry - the HDS data criteria object to convert
|
17
17
|
###
|
18
|
-
constructor: (
|
19
|
-
super
|
20
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
21
|
-
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(
|
22
|
-
if
|
23
|
-
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
18
|
+
constructor: (entry) ->
|
19
|
+
super entry
|
20
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
21
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
22
|
+
if entry.end_time
|
23
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
24
24
|
else
|
25
25
|
# No end time; high is set to infinity
|
26
26
|
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
27
|
-
@_relatedTo =
|
28
|
-
@_targetOutcome =
|
27
|
+
@_relatedTo = entry.references
|
28
|
+
@_targetOutcome = entry.targetOutcome
|
29
29
|
|
30
30
|
###
|
31
31
|
@returns {Interval<Date>}
|
@@ -6,20 +6,35 @@ their methods will be accessable through the CQL_QDM namespace)
|
|
6
6
|
|
7
7
|
|
8
8
|
###
|
9
|
-
To meet criteria using this datatype, the communication indicated by the
|
10
|
-
|
11
|
-
|
9
|
+
To meet criteria using this datatype, the communication indicated by the Communication
|
10
|
+
QDM category is a conveyance of information from one entity (e.g., person, organization,
|
11
|
+
or device) to another.
|
12
|
+
|
13
|
+
Timing:
|
14
|
+
Relevant Period: The time the communication is sent (start time) to the time the
|
15
|
+
communication is received (end time)
|
16
|
+
Author dateTime the time the communication is documented (specifically significant for
|
17
|
+
negation rationale, i.e., Communication Not Performed)
|
12
18
|
###
|
13
|
-
class CQL_QDM.
|
19
|
+
class CQL_QDM.CommunicationPerformed extends CQL_QDM.QDMDatatype
|
14
20
|
###
|
15
21
|
@param {Object} entry - the HDS data criteria object to convert
|
16
22
|
###
|
17
|
-
constructor: (
|
18
|
-
super
|
19
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
20
|
-
@_negationRationale =
|
21
|
-
@_relatedTo =
|
22
|
-
|
23
|
+
constructor: (entry) ->
|
24
|
+
super entry
|
25
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
26
|
+
@_negationRationale = entry.negationReason
|
27
|
+
@_relatedTo = entry.references
|
28
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
29
|
+
if entry.end_time
|
30
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
31
|
+
else
|
32
|
+
# No end time; high is set to infinity
|
33
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
34
|
+
@_category = entry.category
|
35
|
+
@_sender = entry.sender
|
36
|
+
@_recipient = entry.recipient
|
37
|
+
@_medium = entry.medium
|
23
38
|
|
24
39
|
###
|
25
40
|
@returns {Date}
|
@@ -42,78 +57,49 @@ class CQL_QDM.CommunicationFromPatientToProvider extends CQL_QDM.QDMDatatype
|
|
42
57
|
relatedTo: ->
|
43
58
|
CQL_QDM.Helpers.relatedTo(@_relatedTo)
|
44
59
|
|
45
|
-
|
46
|
-
###
|
47
|
-
To meet criteria using this datatype, the communication indicated by the
|
48
|
-
Communication QDM category and its corresponding value set must be
|
49
|
-
communicated from a provider to a patient.
|
50
|
-
###
|
51
|
-
class CQL_QDM.CommunicationFromProviderToPatient extends CQL_QDM.QDMDatatype
|
52
60
|
###
|
53
|
-
@
|
61
|
+
@returns {Interval<Date>}
|
54
62
|
###
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
63
|
+
relevantPeriod: ->
|
64
|
+
low = @_relevantPeriodLow
|
65
|
+
high = @_relevantPeriodHigh
|
66
|
+
if low?
|
67
|
+
new cql.Interval(low, high)
|
68
|
+
else
|
69
|
+
null
|
61
70
|
|
62
71
|
###
|
63
72
|
@returns {Code}
|
64
73
|
###
|
65
|
-
|
66
|
-
if @
|
67
|
-
new cql.Code(@
|
74
|
+
category: ->
|
75
|
+
if @_category?
|
76
|
+
new cql.Code(@_category.code, @_category.code_system, null, @_category.title || null)
|
68
77
|
else
|
69
78
|
null
|
70
79
|
|
71
|
-
###
|
72
|
-
@returns {Date}
|
73
|
-
###
|
74
|
-
authorDatetime: ->
|
75
|
-
@_authorDatetime
|
76
|
-
|
77
|
-
###
|
78
|
-
@returns {Array}
|
79
|
-
###
|
80
|
-
relatedTo: ->
|
81
|
-
CQL_QDM.Helpers.relatedTo(@_relatedTo)
|
82
|
-
|
83
|
-
|
84
|
-
###
|
85
|
-
To meet criteria using this datatype, the communication indicated by the
|
86
|
-
Communication QDM category and its corresponding value set must be
|
87
|
-
communicated from one provider to another.
|
88
|
-
###
|
89
|
-
class CQL_QDM.CommunicationFromProviderToProvider extends CQL_QDM.QDMDatatype
|
90
|
-
###
|
91
|
-
@param {Object} entry - the HDS data criteria object to convert
|
92
|
-
###
|
93
|
-
constructor: (@entry) ->
|
94
|
-
super @entry
|
95
|
-
@_negationRationale = @entry.negationReason
|
96
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
97
|
-
@_relatedTo = @entry.references
|
98
|
-
delete @entry.end_time
|
99
|
-
|
100
80
|
###
|
101
81
|
@returns {Code}
|
102
82
|
###
|
103
|
-
|
104
|
-
if @
|
105
|
-
new cql.Code(@
|
83
|
+
sender: ->
|
84
|
+
if @_sender?
|
85
|
+
new cql.Code(@_sender.code, @_sender.code_system, null, @_sender.title || null)
|
106
86
|
else
|
107
87
|
null
|
108
88
|
|
109
89
|
###
|
110
|
-
@returns {
|
90
|
+
@returns {Code}
|
111
91
|
###
|
112
|
-
|
113
|
-
@
|
92
|
+
recipient: ->
|
93
|
+
if @_recipient?
|
94
|
+
new cql.Code(@_recipient.code, @_recipient.code_system, null, @_recipient.title || null)
|
95
|
+
else
|
96
|
+
null
|
114
97
|
|
115
98
|
###
|
116
|
-
@returns {
|
99
|
+
@returns {Code}
|
117
100
|
###
|
118
|
-
|
119
|
-
|
101
|
+
medium: ->
|
102
|
+
if @_medium?
|
103
|
+
new cql.Code(@_medium.code, @_medium.code_system, null, @_medium.title || null)
|
104
|
+
else
|
105
|
+
null
|
@@ -10,8 +10,13 @@ Base QDM datatype class; implements various functions that all implemented
|
|
10
10
|
QDM datatypes must support.
|
11
11
|
###
|
12
12
|
class CQL_QDM.QDMDatatype
|
13
|
-
constructor: (
|
14
|
-
@
|
13
|
+
constructor: (entry) ->
|
14
|
+
@_id = entry?._id
|
15
|
+
@_oid = entry?.oid
|
16
|
+
@_codes = entry?.codes
|
17
|
+
@_description = entry?.description
|
18
|
+
@_end_time = entry?.end_time
|
19
|
+
@_start_time = entry?.start_time
|
15
20
|
|
16
21
|
###
|
17
22
|
Returns any instances of this attribute currently within this namespace.
|
@@ -39,8 +44,8 @@ class CQL_QDM.QDMDatatype
|
|
39
44
|
@returns {Id}
|
40
45
|
###
|
41
46
|
id: ->
|
42
|
-
if @
|
43
|
-
return new CQL_QDM.Id(@
|
47
|
+
if @_id?
|
48
|
+
return new CQL_QDM.Id(@_id)
|
44
49
|
else
|
45
50
|
null
|
46
51
|
|
@@ -69,13 +74,13 @@ class CQL_QDM.QDMDatatype
|
|
69
74
|
###
|
70
75
|
toString: ->
|
71
76
|
# Grab description from entry; if blank use classname
|
72
|
-
description = if @
|
77
|
+
description = if @_description? then "#{@_description}\n" else "#{@constructor.name}\n"
|
73
78
|
# Grab start and end time, format for proper display
|
74
|
-
startTime = if @
|
75
|
-
endTime = if @
|
79
|
+
startTime = if @_start_time? then "START: #{moment.utc(@_start_time, 'X').format('MM/DD/YYYY h:mm A')}\n" else ""
|
80
|
+
endTime = if @_end_time? then "STOP: #{moment.utc(@_end_time, 'X').format('MM/DD/YYYY h:mm A')}\n" else ""
|
76
81
|
# TODO: Refactor getCode()/code() so that this special logic is not necessary.
|
77
|
-
#
|
78
|
-
if /PatientCharacteristic/.test(this.constructor.name)
|
82
|
+
# These PatientCharacteristics use getCode instead of code. Others still use code.
|
83
|
+
if /PatientCharacteristic(?:Ethnicity|Expired|Race|Sex|Birthdate)/.test(this.constructor.name)
|
79
84
|
code = @getCode()
|
80
85
|
else if @_codes
|
81
86
|
# Get code if this datatype has any
|