cql_qdm_patientapi 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 33a7aa24e0f645f52b49e64975b73379aa01bb57
4
- data.tar.gz: b9bf894f8de2a0ec6fd91f525dbc71c599ca7034
2
+ SHA256:
3
+ metadata.gz: 902ccf42281d43b55bcd6cc3fc25b75123a661cf0e19b9b2f8708ee0acc25fc2
4
+ data.tar.gz: e511c3345200b15f699fba2eb370d110992b22207fc8479a75c3a534d4ae8ed1
5
5
  SHA512:
6
- metadata.gz: e713fa97645076726e6e4e42cc8e760fe8d2601239c3c7c3071d535f898b35d1b78dd5bb5d7fe32421ffcc328482fbb4cee2c2e24b01298fe95e583cacf9cf45
7
- data.tar.gz: c3ed8e6b125f80e01240adb029dce4fbd54f04c2a62a490215ba1a1a6c2269f36ddf22761b507e9e8853c02980bfb87ae7aad7d7dbf0b9fc9f8b2ed40e1daaba
6
+ metadata.gz: 16d8748d7888b29b0ef3ab4dc88ee2d43d5532698b00bf4bb900a020f7052cde8cf3be9e122b2e2146b21dac26116385225dc646f6e64be40681786b8bf4d9b7
7
+ data.tar.gz: fe44b4d76fc8e7dfa0b3fd4b5d2e69b7de7c2b3f3cf58a9a325db05d324e8f04682e44c914c3d218eb92fbd10fe5f1230f05aea97a84eb7e7e495df912b2bae3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cql_qdm_patientapi (1.3.1)
4
+ cql_qdm_patientapi (1.3.2)
5
5
  coffee-rails (~> 4.1)
6
6
  rails (>= 4.2, < 6.0)
7
7
  sprockets-rails (~> 2.3)
@@ -9,43 +9,43 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (5.2.1.1)
13
- actionpack (= 5.2.1.1)
12
+ actioncable (5.2.3)
13
+ actionpack (= 5.2.3)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
- actionmailer (5.2.1.1)
17
- actionpack (= 5.2.1.1)
18
- actionview (= 5.2.1.1)
19
- activejob (= 5.2.1.1)
16
+ actionmailer (5.2.3)
17
+ actionpack (= 5.2.3)
18
+ actionview (= 5.2.3)
19
+ activejob (= 5.2.3)
20
20
  mail (~> 2.5, >= 2.5.4)
21
21
  rails-dom-testing (~> 2.0)
22
- actionpack (5.2.1.1)
23
- actionview (= 5.2.1.1)
24
- activesupport (= 5.2.1.1)
22
+ actionpack (5.2.3)
23
+ actionview (= 5.2.3)
24
+ activesupport (= 5.2.3)
25
25
  rack (~> 2.0)
26
26
  rack-test (>= 0.6.3)
27
27
  rails-dom-testing (~> 2.0)
28
28
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.2.1.1)
30
- activesupport (= 5.2.1.1)
29
+ actionview (5.2.3)
30
+ activesupport (= 5.2.3)
31
31
  builder (~> 3.1)
32
32
  erubi (~> 1.4)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (5.2.1.1)
36
- activesupport (= 5.2.1.1)
35
+ activejob (5.2.3)
36
+ activesupport (= 5.2.3)
37
37
  globalid (>= 0.3.6)
38
- activemodel (5.2.1.1)
39
- activesupport (= 5.2.1.1)
40
- activerecord (5.2.1.1)
41
- activemodel (= 5.2.1.1)
42
- activesupport (= 5.2.1.1)
38
+ activemodel (5.2.3)
39
+ activesupport (= 5.2.3)
40
+ activerecord (5.2.3)
41
+ activemodel (= 5.2.3)
42
+ activesupport (= 5.2.3)
43
43
  arel (>= 9.0)
44
- activestorage (5.2.1.1)
45
- actionpack (= 5.2.1.1)
46
- activerecord (= 5.2.1.1)
44
+ activestorage (5.2.3)
45
+ actionpack (= 5.2.3)
46
+ activerecord (= 5.2.3)
47
47
  marcel (~> 0.3.1)
48
- activesupport (5.2.1.1)
48
+ activesupport (5.2.3)
49
49
  concurrent-ruby (~> 1.0, >= 1.0.2)
50
50
  i18n (>= 0.7, < 2)
51
51
  minitest (~> 5.1)
@@ -62,13 +62,13 @@ GEM
62
62
  coffee-script-source
63
63
  execjs
64
64
  coffee-script-source (1.12.2)
65
- concurrent-ruby (1.1.3)
65
+ concurrent-ruby (1.1.5)
66
66
  crass (1.0.4)
67
- erubi (1.7.1)
67
+ erubi (1.8.0)
68
68
  execjs (2.7.0)
69
- globalid (0.4.1)
69
+ globalid (0.4.2)
70
70
  activesupport (>= 4.2.0)
71
- i18n (1.1.1)
71
+ i18n (1.6.0)
72
72
  concurrent-ruby (~> 1.0)
73
73
  loofah (2.2.3)
74
74
  crass (~> 1.0.2)
@@ -78,42 +78,42 @@ GEM
78
78
  marcel (0.3.3)
79
79
  mimemagic (~> 0.3.2)
80
80
  method_source (0.9.2)
81
- mimemagic (0.3.2)
81
+ mimemagic (0.3.3)
82
82
  mini_mime (1.0.1)
83
- mini_portile2 (2.3.0)
83
+ mini_portile2 (2.4.0)
84
84
  minitest (5.11.3)
85
85
  nio4r (2.3.1)
86
- nokogiri (1.8.5)
87
- mini_portile2 (~> 2.3.0)
86
+ nokogiri (1.10.3)
87
+ mini_portile2 (~> 2.4.0)
88
88
  phantomjs (2.1.1.0)
89
- rack (2.0.6)
89
+ rack (2.0.7)
90
90
  rack-test (1.1.0)
91
91
  rack (>= 1.0, < 3)
92
- rails (5.2.1.1)
93
- actioncable (= 5.2.1.1)
94
- actionmailer (= 5.2.1.1)
95
- actionpack (= 5.2.1.1)
96
- actionview (= 5.2.1.1)
97
- activejob (= 5.2.1.1)
98
- activemodel (= 5.2.1.1)
99
- activerecord (= 5.2.1.1)
100
- activestorage (= 5.2.1.1)
101
- activesupport (= 5.2.1.1)
92
+ rails (5.2.3)
93
+ actioncable (= 5.2.3)
94
+ actionmailer (= 5.2.3)
95
+ actionpack (= 5.2.3)
96
+ actionview (= 5.2.3)
97
+ activejob (= 5.2.3)
98
+ activemodel (= 5.2.3)
99
+ activerecord (= 5.2.3)
100
+ activestorage (= 5.2.3)
101
+ activesupport (= 5.2.3)
102
102
  bundler (>= 1.3.0)
103
- railties (= 5.2.1.1)
103
+ railties (= 5.2.3)
104
104
  sprockets-rails (>= 2.0.0)
105
105
  rails-dom-testing (2.0.3)
106
106
  activesupport (>= 4.2.0)
107
107
  nokogiri (>= 1.6)
108
108
  rails-html-sanitizer (1.0.4)
109
109
  loofah (~> 2.2, >= 2.2.2)
110
- railties (5.2.1.1)
111
- actionpack (= 5.2.1.1)
112
- activesupport (= 5.2.1.1)
110
+ railties (5.2.3)
111
+ actionpack (= 5.2.3)
112
+ activesupport (= 5.2.3)
113
113
  method_source
114
114
  rake (>= 0.8.7)
115
115
  thor (>= 0.19.0, < 2.0)
116
- rake (12.3.1)
116
+ rake (12.3.2)
117
117
  sprockets (3.7.2)
118
118
  concurrent-ruby (~> 1.0)
119
119
  rack (> 1, < 3)
@@ -143,4 +143,4 @@ DEPENDENCIES
143
143
  teaspoon-jasmine (= 2.3.4)
144
144
 
145
145
  BUNDLED WITH
146
- 1.16.6
146
+ 1.17.3
@@ -194,7 +194,7 @@ class CQL_QDM.CQLPatient
194
194
  # e.g. "Encounter, Performed: Face-to-Face Interaction" becomes
195
195
  # EncounterPerformed
196
196
  # TODO: this needs to be modified to look at the HQMF template OID instead of the description
197
- classname = dc.description.substr(0, dc.description.lastIndexOf(':'))
197
+ classname = dc.description.substr(0, dc.description.indexOf(':'))
198
198
  # remove commas, slashes, and colons
199
199
  classname = classname.replace(/,/g, '').replace(/\//g, '').replace(/:/g, '')
200
200
  # make all words start upper case
@@ -14,7 +14,7 @@ class CQL_QDM.AdverseEvent extends CQL_QDM.QDMDatatype
14
14
  ###
15
15
  constructor: (entry) ->
16
16
  super entry
17
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
17
+ @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
18
18
  @_facilityLocation = entry.facility
19
19
  @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
20
20
  if entry.end_time
@@ -17,7 +17,7 @@ class CQL_QDM.AllergyIntolerance extends CQL_QDM.QDMDatatype
17
17
  ###
18
18
  constructor: (entry) ->
19
19
  super entry
20
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
20
+ @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
21
21
  @_prevalencePeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
22
22
  if entry.end_time
23
23
  @_prevalencePeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
@@ -17,7 +17,7 @@ class CQL_QDM.CareGoal extends CQL_QDM.QDMDatatype
17
17
  ###
18
18
  constructor: (entry) ->
19
19
  super entry
20
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
20
+ @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
21
21
  @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
22
22
  if entry.end_time
23
23
  @_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
@@ -22,7 +22,7 @@ class CQL_QDM.CommunicationPerformed extends CQL_QDM.QDMDatatype
22
22
  ###
23
23
  constructor: (entry) ->
24
24
  super entry
25
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
25
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
26
26
  @_negationRationale = entry.negationReason
27
27
  @_relatedTo = entry.references
28
28
  @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
@@ -18,7 +18,7 @@ class CQL_QDM.DeviceApplied extends CQL_QDM.QDMDatatype
18
18
  constructor: (entry) ->
19
19
  super entry
20
20
  @_anatomicalLocationSite = entry.anatomical_location
21
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
21
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
22
22
  @_negationRationale = entry.negationReason
23
23
  @_reason = entry.reason
24
24
  @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
@@ -21,7 +21,7 @@ class CQL_QDM.Diagnosis extends CQL_QDM.QDMDatatype
21
21
  ###
22
22
  constructor: (entry) ->
23
23
  super entry
24
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
24
+ @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
25
25
  @_prevalencePeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
26
26
  if entry.end_time
27
27
  @_prevalencePeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
@@ -62,7 +62,7 @@ class CQL_QDM.DiagnosticStudyPerformed extends CQL_QDM.QDMDatatype
62
62
  ###
63
63
  constructor: (entry) ->
64
64
  super entry
65
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
65
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
66
66
  @_facilityLocation = entry.facility
67
67
  @_method = entry.method
68
68
  @_negationRationale = entry.negationReason
@@ -67,7 +67,7 @@ class CQL_QDM.EncounterPerformed extends CQL_QDM.QDMDatatype
67
67
  constructor: (entry) ->
68
68
  super entry
69
69
  @_admissionSource = entry.admission_source
70
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
70
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
71
71
  @_diagnoses = entry.diagnosis
72
72
  @_dischargeDisposition = entry.dischargeDisposition
73
73
  @_facilityLocations = entry.facility
@@ -57,7 +57,7 @@ class CQL_QDM.InterventionPerformed extends CQL_QDM.QDMDatatype
57
57
  ###
58
58
  constructor: (entry) ->
59
59
  super entry
60
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
60
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
61
61
  @_negationRationale = entry.negationReason
62
62
  @_reason = entry.reason
63
63
  @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
@@ -55,7 +55,7 @@ class CQL_QDM.LaboratoryTestPerformed extends CQL_QDM.QDMDatatype
55
55
  ###
56
56
  constructor: (entry) ->
57
57
  super entry
58
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
58
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
59
59
  @_method = entry.method
60
60
  @_negationRationale = entry.negationReason
61
61
  @_reason = entry.reason
@@ -81,7 +81,7 @@ class CQL_QDM.MedicationAdministered extends CQL_QDM.QDMDatatype
81
81
  ###
82
82
  constructor: (entry) ->
83
83
  super entry
84
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
84
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
85
85
  @_dosage = entry.dose
86
86
  @_frequency = entry.administrationTiming
87
87
  @_negationRationale = entry.negationReason
@@ -282,7 +282,7 @@ class CQL_QDM.MedicationDispensed extends CQL_QDM.QDMDatatype
282
282
  ###
283
283
  constructor: (entry) ->
284
284
  super entry
285
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
285
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
286
286
  @_dispenserIdentifier = entry.dispenserIdentifier
287
287
  @_daysSupplied = entry.daysSupplied
288
288
  @_dosage = entry.dose
@@ -412,7 +412,7 @@ class CQL_QDM.MedicationOrder extends CQL_QDM.QDMDatatype
412
412
  ###
413
413
  constructor: (entry) ->
414
414
  super entry
415
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
415
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
416
416
  @_daysSupplied = entry.daysSupplied
417
417
  @_dosage = entry.dose
418
418
  @_frequency = entry.administrationTiming
@@ -70,7 +70,7 @@ class CQL_QDM.PhysicalExamPerformed extends CQL_QDM.QDMDatatype
70
70
  constructor: (entry) ->
71
71
  super entry
72
72
  @_anatomicalLocationSite = entry.anatomicalLocation
73
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
73
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
74
74
  @_method = entry.method
75
75
  @_negationRationale = entry.negationReason
76
76
  @_reason = entry.reason
@@ -76,7 +76,7 @@ class CQL_QDM.ProcedurePerformed extends CQL_QDM.QDMDatatype
76
76
  constructor: (entry) ->
77
77
  super entry
78
78
  @_anatomicalLocationSite = entry.anatomical_location
79
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
79
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
80
80
  @_incisionDatetime = CQL_QDM.Helpers.convertDateTime(entry.incisionTime)
81
81
  @_method = entry.method
82
82
  @_negationRationale = entry.negationReason
@@ -16,7 +16,7 @@ class CQL_QDM.SubstanceAdministered extends CQL_QDM.QDMDatatype
16
16
  ###
17
17
  constructor: (entry) ->
18
18
  super entry
19
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
19
+ @_authorDatetime = if entry.negationReason? then CQL_QDM.Helpers.convertDateTime(entry.start_time) else CQL_QDM.Helpers.convertDateTime(entry.author_datetime)
20
20
  @_dosage = entry.dose
21
21
  @_frequency = entry.administrationTiming
22
22
  @_negationRationale = entry.negationReason
@@ -1,3 +1,3 @@
1
1
  module CqlQdmPatientapi
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * no_asset_compression
3
3
  **/
4
- (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
4
+ (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
5
5
  // Generated by CoffeeScript 1.12.7
6
6
  (function() {
7
7
  var Code, CodeService, ValueSet, ref;
@@ -425,6 +425,14 @@
425
425
  this.display = display;
426
426
  }
427
427
 
428
+ Object.defineProperties(Code.prototype, {
429
+ isCode: {
430
+ get: function() {
431
+ return true;
432
+ }
433
+ }
434
+ });
435
+
428
436
  Code.prototype.hasMatch = function(code) {
429
437
  if (typeof code === 'string') {
430
438
  return code === this.code;
@@ -917,15 +925,23 @@
917
925
  };
918
926
 
919
927
  DateTime.prototype.toJSDate = function(ignoreTimezone) {
920
- var d, h, mi, mo, ms, ref1, ref2, ref3, ref4, ref5, ref6, s, y;
928
+ var d, date, h, mi, mo, ms, ref1, ref2, ref3, ref4, ref5, ref6, s, y;
921
929
  if (ignoreTimezone == null) {
922
930
  ignoreTimezone = false;
923
931
  }
924
932
  ref6 = [this.year, (this.month != null ? this.month - 1 : 0), (ref1 = this.day) != null ? ref1 : 1, (ref2 = this.hour) != null ? ref2 : 0, (ref3 = this.minute) != null ? ref3 : 0, (ref4 = this.second) != null ? ref4 : 0, (ref5 = this.millisecond) != null ? ref5 : 0], y = ref6[0], mo = ref6[1], d = ref6[2], h = ref6[3], mi = ref6[4], s = ref6[5], ms = ref6[6];
925
933
  if ((this.timezoneOffset != null) && !ignoreTimezone) {
926
- return new jsDate(jsDate.UTC(y, mo, d, h, mi, s, ms) - (this.timezoneOffset * 60 * 60 * 1000));
934
+ date = new jsDate(jsDate.UTC(y, mo, d, h, mi, s, ms) - (this.timezoneOffset * 60 * 60 * 1000));
935
+ if (y < 100) {
936
+ date.setUTCFullYear(y);
937
+ }
938
+ return date;
927
939
  } else {
928
- return new jsDate(y, mo, d, h, mi, s, ms);
940
+ date = new jsDate(y, mo, d, h, mi, s, ms);
941
+ if (y < 100) {
942
+ date.setFullYear(y);
943
+ }
944
+ return date;
929
945
  }
930
946
  };
931
947
 
@@ -1734,7 +1750,7 @@
1734
1750
 
1735
1751
 
1736
1752
 
1737
- },{"../util/util":136,"./uncertainty":11,"moment":137}],8:[function(require,module,exports){
1753
+ },{"../util/util":136,"./uncertainty":11,"moment":138}],8:[function(require,module,exports){
1738
1754
  // Generated by CoffeeScript 1.12.7
1739
1755
  (function() {
1740
1756
  var Exception;
@@ -1927,7 +1943,7 @@
1927
1943
  return [this.high, this.highClosed];
1928
1944
  case !cmp.lessThanOrEquals(a.high, b.high):
1929
1945
  return [other.high, other.highClosed];
1930
- case !areNumeric(a.low, b.low):
1946
+ case !areNumeric(a.high, b.high):
1931
1947
  return [highestNumericUncertainty(a.high, b.high), true];
1932
1948
  case !(areDateTimes(a.high, b.high) && a.high.isMorePrecise(b.high)):
1933
1949
  return [other.high, other.highClosed];
@@ -1968,7 +1984,7 @@
1968
1984
  return [this.high, this.highClosed];
1969
1985
  case !cmp.greaterThanOrEquals(a.high, b.high):
1970
1986
  return [other.high, other.highClosed];
1971
- case !areNumeric(a.low, b.low):
1987
+ case !areNumeric(a.high, b.high):
1972
1988
  return [lowestNumericUncertainty(a.high, b.high), true];
1973
1989
  case !(areDateTimes(a.high, b.high) && b.high.isMorePrecise(a.high)):
1974
1990
  return [other.high, other.highClosed];
@@ -2008,6 +2024,44 @@
2008
2024
  }
2009
2025
  };
2010
2026
 
2027
+ Interval.prototype.sameAs = function(other, precision) {
2028
+ if (((this.low != null) && (other.low != null) && (this.high == null) && (other.high != null) && !this.highClosed) || ((this.low != null) && (other.low != null) && (this.high != null) && (other.high == null) && !other.highClosed) || ((this.low != null) && (other.low != null) && (this.high == null) && (other.high == null) && !other.highClosed && !this.highClosed)) {
2029
+ if (typeof this.low === 'number') {
2030
+ if (!(this.start() === other.start())) {
2031
+ return false;
2032
+ }
2033
+ } else {
2034
+ if (!(this.start().sameAs(other.start(), precision))) {
2035
+ return false;
2036
+ }
2037
+ }
2038
+ } else if (((this.low != null) && (other.low == null) && (this.high != null) && (other.high != null)) || ((this.low == null) && (other.low != null) && (this.high != null) && (other.high != null)) || ((this.low == null) && (other.low == null) && (this.high != null) && (other.high != null))) {
2039
+ if (typeof this.high === 'number') {
2040
+ if (!(this.end() === other.end())) {
2041
+ return false;
2042
+ }
2043
+ } else {
2044
+ if (!(this.end().sameAs(other.end(), precision))) {
2045
+ return false;
2046
+ }
2047
+ }
2048
+ }
2049
+ if (((this.low == null) && !this.lowClosed) || ((this.high == null) && !this.highClosed) || ((other.low == null) && !other.lowClosed) || ((other.high == null) && !other.highClosed)) {
2050
+ return null;
2051
+ }
2052
+ if (this.lowClosed && (this.low == null) && this.highClosed && (this.high == null)) {
2053
+ return other.lowClosed && (other.low == null) && other.highClosed && (other.high == null);
2054
+ }
2055
+ if (other.lowClosed && (other.low == null) && other.highClosed && (other.high == null)) {
2056
+ return false;
2057
+ }
2058
+ if (typeof this.low === 'number') {
2059
+ return this.start() === other.start() && this.end() === other.end();
2060
+ } else {
2061
+ return this.start().sameAs(other.start(), precision) && this.end().sameAs(other.end(), precision);
2062
+ }
2063
+ };
2064
+
2011
2065
  Interval.prototype.equals = function(other) {
2012
2066
  var a, b, ref1;
2013
2067
  if (other instanceof Interval) {
@@ -2068,6 +2122,28 @@
2068
2122
  }
2069
2123
  };
2070
2124
 
2125
+ Interval.prototype.start = function() {
2126
+ if (this.low == null) {
2127
+ if (this.lowClosed) {
2128
+ return minValueForInstance(this.high);
2129
+ } else {
2130
+ return this.low;
2131
+ }
2132
+ }
2133
+ return this.toClosed().low;
2134
+ };
2135
+
2136
+ Interval.prototype.end = function() {
2137
+ if (this.high == null) {
2138
+ if (this.highClosed) {
2139
+ return maxValueForInstance(this.low);
2140
+ } else {
2141
+ return this.high;
2142
+ }
2143
+ }
2144
+ return this.toClosed().high;
2145
+ };
2146
+
2071
2147
  Interval.prototype.starts = function(other, precision) {
2072
2148
  var endLessThanOrEqual, startEqual;
2073
2149
  if ((precision != null) && this.low instanceof DateTime) {
@@ -2107,7 +2183,7 @@
2107
2183
  Interval.prototype.toClosed = function() {
2108
2184
  var high, low, point, ref1;
2109
2185
  point = (ref1 = this.low) != null ? ref1 : this.high;
2110
- if (typeof point === 'number' || point instanceof DateTime || (point != null ? point.isQuantity : void 0)) {
2186
+ if (typeof point === 'number' || point instanceof DateTime || (point != null ? point.isQuantity : void 0) || (point != null ? point.isDate : void 0)) {
2111
2187
  low = (function() {
2112
2188
  switch (false) {
2113
2189
  case !(this.lowClosed && (this.low == null)):
@@ -2234,7 +2310,7 @@
2234
2310
  };
2235
2311
 
2236
2312
  function Uncertainty(low, high) {
2237
- var gt, ref;
2313
+ var gt, isNonEnumerable, ref;
2238
2314
  this.low = low != null ? low : null;
2239
2315
  this.high = high;
2240
2316
  gt = function(a, b) {
@@ -2247,9 +2323,15 @@
2247
2323
  return a > b;
2248
2324
  }
2249
2325
  };
2326
+ isNonEnumerable = function(val) {
2327
+ return (val != null) && (val.isCode || val.isConcept || val.isValueSet);
2328
+ };
2250
2329
  if (typeof this.high === 'undefined') {
2251
2330
  this.high = this.low;
2252
2331
  }
2332
+ if (isNonEnumerable(this.low) || isNonEnumerable(this.high)) {
2333
+ this.low = this.high = null;
2334
+ }
2253
2335
  if ((this.low != null) && (this.high != null) && gt(this.low, this.high)) {
2254
2336
  ref = [this.high, this.low], this.low = ref[0], this.high = ref[1];
2255
2337
  }
@@ -2346,24 +2428,26 @@
2346
2428
  },{"./logic":10}],12:[function(require,module,exports){
2347
2429
  // Generated by CoffeeScript 1.12.7
2348
2430
  (function() {
2349
- var AggregateExpression, AllTrue, AnyTrue, Avg, Count, Exception, Expression, GeometricMean, Max, Median, Min, Mode, PopulationStdDev, PopulationVariance, Product, Quantity, StdDev, Sum, Variance, allTrue, anyTrue, build, compact, numerical_sort, productValue, quantitiesOrArg, quantityOrValue, ref, typeIsArray,
2431
+ var AggregateExpression, AllTrue, AnyTrue, Avg, Count, Exception, Expression, GeometricMean, Max, Median, Min, Mode, PopulationStdDev, PopulationVariance, Product, Quantity, StdDev, Sum, Variance, allTrue, anyTrue, build, greaterThan, lessThan, numerical_sort, productValue, quantitiesOrArg, quantityOrValue, ref, ref1, removeNulls, typeIsArray,
2350
2432
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
2351
2433
  hasProp = {}.hasOwnProperty,
2352
2434
  indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
2353
2435
 
2354
2436
  Expression = require('./expression').Expression;
2355
2437
 
2356
- ref = require('../util/util'), typeIsArray = ref.typeIsArray, allTrue = ref.allTrue, anyTrue = ref.anyTrue, compact = ref.compact, numerical_sort = ref.numerical_sort;
2438
+ ref = require('../util/util'), typeIsArray = ref.typeIsArray, allTrue = ref.allTrue, anyTrue = ref.anyTrue, removeNulls = ref.removeNulls, numerical_sort = ref.numerical_sort;
2357
2439
 
2358
2440
  build = require('./builder').build;
2359
2441
 
2360
2442
  Exception = require('../datatypes/exception').Exception;
2361
2443
 
2444
+ ref1 = require('../util/comparison'), greaterThan = ref1.greaterThan, lessThan = ref1.lessThan;
2445
+
2362
2446
  Quantity = require('./quantity');
2363
2447
 
2364
2448
  quantitiesOrArg = function(arr) {
2365
2449
  var allQs, i, j, len, someQs, unit, values;
2366
- arr = compact(arr);
2450
+ arr = removeNulls(arr);
2367
2451
  if (arr.length === 0) {
2368
2452
  return arr;
2369
2453
  }
@@ -2389,8 +2473,8 @@
2389
2473
  };
2390
2474
 
2391
2475
  quantityOrValue = function(value, arr) {
2392
- var ref1;
2393
- if (arr != null ? (ref1 = arr[0]) != null ? ref1.unit : void 0 : void 0) {
2476
+ var ref2;
2477
+ if (arr != null ? (ref2 = arr[0]) != null ? ref2.unit : void 0 : void 0) {
2394
2478
  return Quantity.createQuantity(value, arr[0].unit);
2395
2479
  } else {
2396
2480
  return value;
@@ -2420,7 +2504,7 @@
2420
2504
  var arg;
2421
2505
  arg = this.source.execute(ctx);
2422
2506
  if (typeIsArray(arg)) {
2423
- return compact(arg).length;
2507
+ return removeNulls(arg).length;
2424
2508
  }
2425
2509
  };
2426
2510
 
@@ -2459,12 +2543,23 @@
2459
2543
  }
2460
2544
 
2461
2545
  Min.prototype.exec = function(ctx) {
2462
- var arg, filtered;
2463
- arg = this.source.execute(ctx);
2464
- if (typeIsArray(arg)) {
2465
- filtered = numerical_sort(quantitiesOrArg(arg), "asc");
2466
- return quantityOrValue(filtered[0], arg);
2546
+ var element, j, len, list, listWithoutNulls, minimum;
2547
+ list = this.source.execute(ctx);
2548
+ if (list == null) {
2549
+ return null;
2550
+ }
2551
+ listWithoutNulls = removeNulls(list);
2552
+ if (!(listWithoutNulls.length > 0)) {
2553
+ return null;
2467
2554
  }
2555
+ minimum = listWithoutNulls[0];
2556
+ for (j = 0, len = listWithoutNulls.length; j < len; j++) {
2557
+ element = listWithoutNulls[j];
2558
+ if (lessThan(element, minimum)) {
2559
+ minimum = element;
2560
+ }
2561
+ }
2562
+ return minimum;
2468
2563
  };
2469
2564
 
2470
2565
  return Min;
@@ -2479,12 +2574,23 @@
2479
2574
  }
2480
2575
 
2481
2576
  Max.prototype.exec = function(ctx) {
2482
- var arg, filtered;
2483
- arg = this.source.execute(ctx);
2484
- if (typeIsArray(arg)) {
2485
- filtered = numerical_sort(quantitiesOrArg(arg), "desc");
2486
- return quantityOrValue(filtered[0], arg);
2577
+ var element, j, len, list, listWithoutNulls, maximum;
2578
+ list = this.source.execute(ctx);
2579
+ if (list == null) {
2580
+ return null;
2487
2581
  }
2582
+ listWithoutNulls = removeNulls(list);
2583
+ if (!(listWithoutNulls.length > 0)) {
2584
+ return null;
2585
+ }
2586
+ maximum = listWithoutNulls[0];
2587
+ for (j = 0, len = listWithoutNulls.length; j < len; j++) {
2588
+ element = listWithoutNulls[j];
2589
+ if (greaterThan(element, maximum)) {
2590
+ maximum = element;
2591
+ }
2592
+ }
2593
+ return maximum;
2488
2594
  };
2489
2595
 
2490
2596
  return Max;
@@ -2555,7 +2661,7 @@
2555
2661
  var arg, filtered, mode;
2556
2662
  arg = this.source.execute(ctx);
2557
2663
  if (typeIsArray(arg)) {
2558
- filtered = compact(arg);
2664
+ filtered = removeNulls(arg);
2559
2665
  mode = this.mode(filtered);
2560
2666
  if (mode.length === 1) {
2561
2667
  return mode[0];
@@ -2566,13 +2672,13 @@
2566
2672
  };
2567
2673
 
2568
2674
  Mode.prototype.mode = function(arr) {
2569
- var cnt, counts, elem, j, len, max, ref1, results;
2675
+ var cnt, counts, elem, j, len, max, ref2, results;
2570
2676
  max = 0;
2571
2677
  counts = {};
2572
2678
  results = [];
2573
2679
  for (j = 0, len = arr.length; j < len; j++) {
2574
2680
  elem = arr[j];
2575
- cnt = counts[elem] = ((ref1 = counts[elem]) != null ? ref1 : 0) + 1;
2681
+ cnt = counts[elem] = ((ref2 = counts[elem]) != null ? ref2 : 0) + 1;
2576
2682
  if (cnt === max && indexOf.call(results, elem) < 0) {
2577
2683
  results.push(elem);
2578
2684
  } else if (cnt > max) {
@@ -2651,12 +2757,12 @@
2651
2757
  }
2652
2758
 
2653
2759
  Product.prototype.exec = function(ctx) {
2654
- var filtered, listOfValues, product, ref1;
2760
+ var filtered, listOfValues, product, ref2;
2655
2761
  listOfValues = this.source.execute(ctx);
2656
2762
  if (listOfValues === null) {
2657
2763
  return null;
2658
2764
  }
2659
- ref1 = productValue(listOfValues), product = ref1[0], filtered = ref1[1];
2765
+ ref2 = productValue(listOfValues), product = ref2[0], filtered = ref2[1];
2660
2766
  if (product === null) {
2661
2767
  return null;
2662
2768
  }
@@ -2675,12 +2781,12 @@
2675
2781
  }
2676
2782
 
2677
2783
  GeometricMean.prototype.exec = function(ctx) {
2678
- var filtered, geoMean, listOfValues, product, ref1;
2784
+ var filtered, geoMean, listOfValues, product, ref2;
2679
2785
  listOfValues = this.source.execute(ctx);
2680
2786
  if (listOfValues === null) {
2681
2787
  return null;
2682
2788
  }
2683
- ref1 = productValue(listOfValues), product = ref1[0], filtered = ref1[1];
2789
+ ref2 = productValue(listOfValues), product = ref2[0], filtered = ref2[1];
2684
2790
  if (product === null) {
2685
2791
  return null;
2686
2792
  }
@@ -2696,7 +2802,7 @@
2696
2802
  var filtered, item, j, len, product;
2697
2803
  product = 1;
2698
2804
  if (typeIsArray(list)) {
2699
- filtered = compact(list);
2805
+ filtered = removeNulls(list);
2700
2806
  if (filtered.length === 0) {
2701
2807
  return [null, null];
2702
2808
  }
@@ -2788,7 +2894,7 @@
2788
2894
 
2789
2895
 
2790
2896
 
2791
- },{"../datatypes/exception":8,"../util/util":136,"./builder":14,"./expression":20,"./quantity":32}],13:[function(require,module,exports){
2897
+ },{"../datatypes/exception":8,"../util/comparison":134,"../util/util":136,"./builder":14,"./expression":20,"./quantity":32}],13:[function(require,module,exports){
2792
2898
  // Generated by CoffeeScript 1.12.7
2793
2899
  (function() {
2794
2900
  var Abs, Add, Ceiling, Divide, Exp, Expression, Floor, Ln, Log, MathUtil, MaxValue, MinValue, Modulo, Multiply, Negate, Power, Predecessor, Quantity, Round, Subtract, Successor, Truncate, TruncatedDivide, allTrue, anyTrue, build, ref, typeIsArray,
@@ -3206,8 +3312,15 @@
3206
3312
  }
3207
3313
 
3208
3314
  MinValue.prototype.exec = function(ctx) {
3315
+ var minDateTime;
3209
3316
  if (MIN_VALUES[this.valueType]) {
3210
- return MIN_VALUES[this.valueType];
3317
+ if (this.valueType === '{urn:hl7-org:elm-types:r1}DateTime') {
3318
+ minDateTime = MIN_VALUES[this.valueType].copy();
3319
+ minDateTime.timezoneOffset = ctx.getTimezoneOffset();
3320
+ return minDateTime;
3321
+ } else {
3322
+ return MIN_VALUES[this.valueType];
3323
+ }
3211
3324
  } else {
3212
3325
  throw new Error("Minimum not supported for " + this.valueType);
3213
3326
  }
@@ -3238,8 +3351,15 @@
3238
3351
  }
3239
3352
 
3240
3353
  MaxValue.prototype.exec = function(ctx) {
3354
+ var maxDateTime;
3241
3355
  if (MAX_VALUES[this.valueType] != null) {
3242
- return MAX_VALUES[this.valueType];
3356
+ if (this.valueType === '{urn:hl7-org:elm-types:r1}DateTime') {
3357
+ maxDateTime = MAX_VALUES[this.valueType].copy();
3358
+ maxDateTime.timezoneOffset = ctx.getTimezoneOffset();
3359
+ return maxDateTime;
3360
+ } else {
3361
+ return MAX_VALUES[this.valueType];
3362
+ }
3243
3363
  } else {
3244
3364
  throw new Error("Maximum not supported for " + this.valueType);
3245
3365
  }
@@ -3875,7 +3995,7 @@
3875
3995
  },{"../util/comparison":134,"./builder":14,"./expression":20}],18:[function(require,module,exports){
3876
3996
  // Generated by CoffeeScript 1.12.7
3877
3997
  (function() {
3878
- var DT, Date, DateFrom, DateTime, DateTimeComponentFrom, DifferenceBetween, DurationBetween, Expression, Literal, Now, SameAs, SameOrAfter, SameOrBefore, Time, TimeFrom, TimeOfDay, TimezoneFrom, Today, build,
3998
+ var DT, Date, DateFrom, DateTime, DateTimeComponentFrom, DifferenceBetween, DurationBetween, Expression, Literal, Now, SameOrAfter, SameOrBefore, Time, TimeFrom, TimeOfDay, TimezoneFrom, Today, build,
3879
3999
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
3880
4000
  hasProp = {}.hasOwnProperty,
3881
4001
  slice = [].slice;
@@ -4168,28 +4288,6 @@
4168
4288
 
4169
4289
  })(Expression);
4170
4290
 
4171
- module.exports.SameAs = SameAs = (function(superClass) {
4172
- extend(SameAs, superClass);
4173
-
4174
- function SameAs(json) {
4175
- SameAs.__super__.constructor.apply(this, arguments);
4176
- this.precision = json.precision;
4177
- }
4178
-
4179
- SameAs.prototype.exec = function(ctx) {
4180
- var d1, d2, ref, ref1;
4181
- ref = this.execArgs(ctx), d1 = ref[0], d2 = ref[1];
4182
- if ((d1 != null) && (d2 != null)) {
4183
- return d1.sameAs(d2, (ref1 = this.precision) != null ? ref1.toLowerCase() : void 0);
4184
- } else {
4185
- return null;
4186
- }
4187
- };
4188
-
4189
- return SameAs;
4190
-
4191
- })(Expression);
4192
-
4193
4291
  module.exports.SameOrAfter = SameOrAfter = (function(superClass) {
4194
4292
  extend(SameOrAfter, superClass);
4195
4293
 
@@ -4901,8 +4999,12 @@
4901
4999
  }
4902
5000
 
4903
5001
  Start.prototype.exec = function(ctx) {
4904
- var ref3;
4905
- return (ref3 = this.arg.execute(ctx)) != null ? ref3.low : void 0;
5002
+ var interval;
5003
+ interval = this.arg.execute(ctx);
5004
+ if (interval == null) {
5005
+ return null;
5006
+ }
5007
+ return interval.start();
4906
5008
  };
4907
5009
 
4908
5010
  return Start;
@@ -4917,8 +5019,12 @@
4917
5019
  }
4918
5020
 
4919
5021
  End.prototype.exec = function(ctx) {
4920
- var ref3;
4921
- return (ref3 = this.arg.execute(ctx)) != null ? ref3.high : void 0;
5022
+ var interval;
5023
+ interval = this.arg.execute(ctx);
5024
+ if (interval == null) {
5025
+ return null;
5026
+ }
5027
+ return interval.end();
4922
5028
  };
4923
5029
 
4924
5030
  return End;
@@ -6164,7 +6270,7 @@
6164
6270
  },{"./expression":20}],30:[function(require,module,exports){
6165
6271
  // Generated by CoffeeScript 1.12.7
6166
6272
  (function() {
6167
- var After, Contains, DT, DateTime, Equal, Equivalent, Except, Exception, Expression, IVL, In, IncludedIn, Includes, Indexer, Intersect, LIST, Length, NotEqual, ProperIncludedIn, ProperIncludes, STRING, ThreeValuedLogic, Union, build, equals, equivalent, ref, typeIsArray,
6273
+ var After, Contains, DT, DateTime, Equal, Equivalent, Except, Exception, Expression, IVL, In, IncludedIn, Includes, Indexer, Intersect, LIST, Length, NotEqual, ProperIncludedIn, ProperIncludes, STRING, SameAs, ThreeValuedLogic, Union, build, equals, equivalent, ref, typeIsArray,
6168
6274
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
6169
6275
  hasProp = {}.hasOwnProperty;
6170
6276
 
@@ -6621,6 +6727,28 @@
6621
6727
 
6622
6728
  })(Expression);
6623
6729
 
6730
+ module.exports.SameAs = SameAs = (function(superClass) {
6731
+ extend(SameAs, superClass);
6732
+
6733
+ function SameAs(json) {
6734
+ SameAs.__super__.constructor.apply(this, arguments);
6735
+ this.precision = json.precision;
6736
+ }
6737
+
6738
+ SameAs.prototype.exec = function(ctx) {
6739
+ var a, b, ref1, ref2;
6740
+ ref1 = this.execArgs(ctx), a = ref1[0], b = ref1[1];
6741
+ if ((a != null) && (b != null)) {
6742
+ return a.sameAs(b, (ref2 = this.precision) != null ? ref2.toLowerCase() : void 0);
6743
+ } else {
6744
+ return null;
6745
+ }
6746
+ };
6747
+
6748
+ return SameAs;
6749
+
6750
+ })(Expression);
6751
+
6624
6752
  }).call(this);
6625
6753
 
6626
6754
 
@@ -7124,7 +7252,7 @@
7124
7252
 
7125
7253
 
7126
7254
 
7127
- },{"../datatypes/datatypes":6,"../datatypes/exception":8,"../util/math":135,"./builder":14,"./expression":20,"./reusable":35,"ucum":146}],33:[function(require,module,exports){
7255
+ },{"../datatypes/datatypes":6,"../datatypes/exception":8,"../util/math":135,"./builder":14,"./expression":20,"./reusable":35,"ucum":147}],33:[function(require,module,exports){
7128
7256
  // Generated by CoffeeScript 1.12.7
7129
7257
  (function() {
7130
7258
  var AliasRef, AliasedQuerySource, ByColumn, ByDirection, ByExpression, Context, Expression, LetClause, MultiSource, Query, QueryLetRef, ReturnClause, Sort, SortClause, UnimplementedExpression, With, Without, allTrue, build, equals, ref, ref1, toDistinctList, typeIsArray,
@@ -7767,7 +7895,7 @@
7767
7895
  },{"./builder":14,"./expression":20}],36:[function(require,module,exports){
7768
7896
  // Generated by CoffeeScript 1.12.7
7769
7897
  (function() {
7770
- var Combine, Concatenate, EndsWith, Expression, Lower, PositionOf, Split, SplitOnMatches, StartsWith, Substring, UnimplementedExpression, Upper, build, ref,
7898
+ var Combine, Concatenate, EndsWith, Expression, Lower, Matches, PositionOf, Split, SplitOnMatches, StartsWith, Substring, UnimplementedExpression, Upper, build, ref,
7771
7899
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
7772
7900
  hasProp = {}.hasOwnProperty;
7773
7901
 
@@ -7853,13 +7981,26 @@
7853
7981
  module.exports.SplitOnMatches = SplitOnMatches = (function(superClass) {
7854
7982
  extend(SplitOnMatches, superClass);
7855
7983
 
7856
- function SplitOnMatches() {
7857
- return SplitOnMatches.__super__.constructor.apply(this, arguments);
7984
+ function SplitOnMatches(json) {
7985
+ SplitOnMatches.__super__.constructor.apply(this, arguments);
7986
+ this.stringToSplit = build(json.stringToSplit);
7987
+ this.separatorPattern = build(json.separatorPattern);
7858
7988
  }
7859
7989
 
7990
+ SplitOnMatches.prototype.exec = function(ctx) {
7991
+ var separatorPattern, stringToSplit;
7992
+ stringToSplit = this.stringToSplit.execute(ctx);
7993
+ separatorPattern = this.separatorPattern.execute(ctx);
7994
+ if (!((stringToSplit != null) && (separatorPattern != null))) {
7995
+ return null;
7996
+ } else {
7997
+ return stringToSplit.split(new RegExp(separatorPattern));
7998
+ }
7999
+ };
8000
+
7860
8001
  return SplitOnMatches;
7861
8002
 
7862
- })(UnimplementedExpression);
8003
+ })(Expression);
7863
8004
 
7864
8005
  module.exports.Upper = Upper = (function(superClass) {
7865
8006
  extend(Upper, superClass);
@@ -7927,6 +8068,30 @@
7927
8068
 
7928
8069
  })(Expression);
7929
8070
 
8071
+ module.exports.Matches = Matches = (function(superClass) {
8072
+ extend(Matches, superClass);
8073
+
8074
+ function Matches(json) {
8075
+ Matches.__super__.constructor.apply(this, arguments);
8076
+ }
8077
+
8078
+ Matches.prototype.exec = function(ctx) {
8079
+ var pattern, ref1, string;
8080
+ ref1 = this.execArgs(ctx), string = ref1[0], pattern = ref1[1];
8081
+ if (!((string != null) && (pattern != null))) {
8082
+ return null;
8083
+ }
8084
+ if (string.match(new RegExp(pattern))) {
8085
+ return true;
8086
+ } else {
8087
+ return false;
8088
+ }
8089
+ };
8090
+
8091
+ return Matches;
8092
+
8093
+ })(Expression);
8094
+
7930
8095
  module.exports.Substring = Substring = (function(superClass) {
7931
8096
  extend(Substring, superClass);
7932
8097
 
@@ -8128,7 +8293,7 @@
8128
8293
  },{"./builder":14,"./expression":20}],38:[function(require,module,exports){
8129
8294
  // Generated by CoffeeScript 1.12.7
8130
8295
  (function() {
8131
- var As, Concept, Convert, ConvertsToBoolean, ConvertsToDate, ConvertsToDateTime, ConvertsToDecimal, ConvertsToInteger, ConvertsToQuantity, ConvertsToString, ConvertsToTime, Date, DateTime, Expression, FunctionRef, IntervalTypeSpecifier, Is, ListTypeSpecifier, NamedTypeSpecifier, ToBoolean, ToConcept, ToDate, ToDateTime, ToDecimal, ToInteger, ToQuantity, ToString, ToTime, TupleTypeSpecifier, UnimplementedExpression, isValidDecimal, isValidInteger, limitDecimalPrecision, normalizeMillisecondsField, parseQuantity, ref, ref1, ref2,
8296
+ var As, Concept, Convert, ConvertsToBoolean, ConvertsToDate, ConvertsToDateTime, ConvertsToDecimal, ConvertsToInteger, ConvertsToQuantity, ConvertsToRatio, ConvertsToString, ConvertsToTime, Date, DateTime, Expression, FunctionRef, IntervalTypeSpecifier, Is, ListTypeSpecifier, NamedTypeSpecifier, Ratio, ToBoolean, ToConcept, ToDate, ToDateTime, ToDecimal, ToInteger, ToQuantity, ToRatio, ToString, ToTime, TupleTypeSpecifier, UnimplementedExpression, canConvertToType, isValidDecimal, isValidInteger, limitDecimalPrecision, normalizeMillisecondsField, parseQuantity, ref, ref1, ref2,
8132
8297
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
8133
8298
  hasProp = {}.hasOwnProperty;
8134
8299
 
@@ -8146,6 +8311,8 @@
8146
8311
 
8147
8312
  normalizeMillisecondsField = require('../util/util').normalizeMillisecondsField;
8148
8313
 
8314
+ Ratio = require('./ratio').Ratio;
8315
+
8149
8316
  module.exports.As = As = (function(superClass) {
8150
8317
  extend(As, superClass);
8151
8318
 
@@ -8182,7 +8349,7 @@
8182
8349
  } else if (strArg === "false" || strArg === "f" || strArg === "no" || strArg === "n" || strArg === "0") {
8183
8350
  return false;
8184
8351
  } else {
8185
- throw new Error("cannot convert " + strArg + " to Boolean");
8352
+ return null;
8186
8353
  }
8187
8354
  } else {
8188
8355
  return null;
@@ -8329,6 +8496,43 @@
8329
8496
 
8330
8497
  })(Expression);
8331
8498
 
8499
+ module.exports.ToRatio = ToRatio = (function(superClass) {
8500
+ extend(ToRatio, superClass);
8501
+
8502
+ function ToRatio(json) {
8503
+ ToRatio.__super__.constructor.apply(this, arguments);
8504
+ }
8505
+
8506
+ ToRatio.prototype.exec = function(ctx) {
8507
+ var arg, denominator, numerator, splitRatioString;
8508
+ arg = this.execArgs(ctx);
8509
+ if (arg != null) {
8510
+ try {
8511
+ splitRatioString = arg.toString().match(/^(\d+(\.\d+)?\s*('.+')?)\s*:\s*(\d+(\.\d+)?\s*('.+')?)$/);
8512
+ if (splitRatioString == null) {
8513
+ return null;
8514
+ }
8515
+ numerator = parseQuantity(splitRatioString[1]);
8516
+ denominator = parseQuantity(splitRatioString[4]);
8517
+ } catch (error) {
8518
+ return null;
8519
+ }
8520
+ if (!((numerator != null) && (denominator != null))) {
8521
+ return null;
8522
+ }
8523
+ return new Ratio({
8524
+ numerator: numerator,
8525
+ denominator: denominator
8526
+ });
8527
+ } else {
8528
+ return null;
8529
+ }
8530
+ };
8531
+
8532
+ return ToRatio;
8533
+
8534
+ })(Expression);
8535
+
8332
8536
  module.exports.ToString = ToString = (function(superClass) {
8333
8537
  extend(ToString, superClass);
8334
8538
 
@@ -8472,103 +8676,230 @@
8472
8676
 
8473
8677
  })(Expression);
8474
8678
 
8475
- module.exports.Is = Is = (function(superClass) {
8476
- extend(Is, superClass);
8477
-
8478
- function Is() {
8479
- return Is.__super__.constructor.apply(this, arguments);
8480
- }
8481
-
8482
- return Is;
8483
-
8484
- })(UnimplementedExpression);
8485
-
8486
8679
  module.exports.ConvertsToBoolean = ConvertsToBoolean = (function(superClass) {
8487
8680
  extend(ConvertsToBoolean, superClass);
8488
8681
 
8489
- function ConvertsToBoolean() {
8490
- return ConvertsToBoolean.__super__.constructor.apply(this, arguments);
8682
+ function ConvertsToBoolean(json) {
8683
+ ConvertsToBoolean.__super__.constructor.apply(this, arguments);
8684
+ this.operand = json.operand;
8491
8685
  }
8492
8686
 
8687
+ ConvertsToBoolean.prototype.exec = function(ctx) {
8688
+ var operatorValue;
8689
+ operatorValue = this.execArgs(ctx);
8690
+ if (operatorValue === null) {
8691
+ return null;
8692
+ } else {
8693
+ return canConvertToType(ToBoolean, this.operand, ctx);
8694
+ }
8695
+ };
8696
+
8493
8697
  return ConvertsToBoolean;
8494
8698
 
8495
- })(UnimplementedExpression);
8699
+ })(Expression);
8496
8700
 
8497
8701
  module.exports.ConvertsToDate = ConvertsToDate = (function(superClass) {
8498
8702
  extend(ConvertsToDate, superClass);
8499
8703
 
8500
- function ConvertsToDate() {
8501
- return ConvertsToDate.__super__.constructor.apply(this, arguments);
8704
+ function ConvertsToDate(json) {
8705
+ ConvertsToDate.__super__.constructor.apply(this, arguments);
8706
+ this.operand = json.operand;
8502
8707
  }
8503
8708
 
8709
+ ConvertsToDate.prototype.exec = function(ctx) {
8710
+ var operatorValue;
8711
+ operatorValue = this.execArgs(ctx);
8712
+ if (operatorValue === null) {
8713
+ return null;
8714
+ } else {
8715
+ return canConvertToType(ToDate, this.operand, ctx);
8716
+ }
8717
+ };
8718
+
8504
8719
  return ConvertsToDate;
8505
8720
 
8506
- })(UnimplementedExpression);
8721
+ })(Expression);
8507
8722
 
8508
8723
  module.exports.ConvertsToDateTime = ConvertsToDateTime = (function(superClass) {
8509
8724
  extend(ConvertsToDateTime, superClass);
8510
8725
 
8511
- function ConvertsToDateTime() {
8512
- return ConvertsToDateTime.__super__.constructor.apply(this, arguments);
8726
+ function ConvertsToDateTime(json) {
8727
+ ConvertsToDateTime.__super__.constructor.apply(this, arguments);
8728
+ this.operand = json.operand;
8513
8729
  }
8514
8730
 
8731
+ ConvertsToDateTime.prototype.exec = function(ctx) {
8732
+ var operatorValue;
8733
+ operatorValue = this.execArgs(ctx);
8734
+ if (operatorValue === null) {
8735
+ return null;
8736
+ } else {
8737
+ return canConvertToType(ToDateTime, this.operand, ctx);
8738
+ }
8739
+ };
8740
+
8515
8741
  return ConvertsToDateTime;
8516
8742
 
8517
- })(UnimplementedExpression);
8743
+ })(Expression);
8518
8744
 
8519
8745
  module.exports.ConvertsToDecimal = ConvertsToDecimal = (function(superClass) {
8520
8746
  extend(ConvertsToDecimal, superClass);
8521
8747
 
8522
- function ConvertsToDecimal() {
8523
- return ConvertsToDecimal.__super__.constructor.apply(this, arguments);
8748
+ function ConvertsToDecimal(json) {
8749
+ ConvertsToDecimal.__super__.constructor.apply(this, arguments);
8750
+ this.operand = json.operand;
8524
8751
  }
8525
8752
 
8753
+ ConvertsToDecimal.prototype.exec = function(ctx) {
8754
+ var operatorValue;
8755
+ operatorValue = this.execArgs(ctx);
8756
+ if (operatorValue === null) {
8757
+ return null;
8758
+ } else {
8759
+ return canConvertToType(ToDecimal, this.operand, ctx);
8760
+ }
8761
+ };
8762
+
8526
8763
  return ConvertsToDecimal;
8527
8764
 
8528
- })(UnimplementedExpression);
8765
+ })(Expression);
8529
8766
 
8530
8767
  module.exports.ConvertsToInteger = ConvertsToInteger = (function(superClass) {
8531
8768
  extend(ConvertsToInteger, superClass);
8532
8769
 
8533
- function ConvertsToInteger() {
8534
- return ConvertsToInteger.__super__.constructor.apply(this, arguments);
8770
+ function ConvertsToInteger(json) {
8771
+ ConvertsToInteger.__super__.constructor.apply(this, arguments);
8772
+ this.operand = json.operand;
8535
8773
  }
8536
8774
 
8775
+ ConvertsToInteger.prototype.exec = function(ctx) {
8776
+ var operatorValue;
8777
+ operatorValue = this.execArgs(ctx);
8778
+ if (operatorValue === null) {
8779
+ return null;
8780
+ } else {
8781
+ return canConvertToType(ToInteger, this.operand, ctx);
8782
+ }
8783
+ };
8784
+
8537
8785
  return ConvertsToInteger;
8538
8786
 
8539
- })(UnimplementedExpression);
8787
+ })(Expression);
8540
8788
 
8541
8789
  module.exports.ConvertsToQuantity = ConvertsToQuantity = (function(superClass) {
8542
8790
  extend(ConvertsToQuantity, superClass);
8543
8791
 
8544
- function ConvertsToQuantity() {
8545
- return ConvertsToQuantity.__super__.constructor.apply(this, arguments);
8792
+ function ConvertsToQuantity(json) {
8793
+ ConvertsToQuantity.__super__.constructor.apply(this, arguments);
8794
+ this.operand = json.operand;
8546
8795
  }
8547
8796
 
8797
+ ConvertsToQuantity.prototype.exec = function(ctx) {
8798
+ var operatorValue;
8799
+ operatorValue = this.execArgs(ctx);
8800
+ if (operatorValue === null) {
8801
+ return null;
8802
+ } else {
8803
+ return canConvertToType(ToQuantity, this.operand, ctx);
8804
+ }
8805
+ };
8806
+
8548
8807
  return ConvertsToQuantity;
8549
8808
 
8550
- })(UnimplementedExpression);
8809
+ })(Expression);
8810
+
8811
+ module.exports.ConvertsToRatio = ConvertsToRatio = (function(superClass) {
8812
+ extend(ConvertsToRatio, superClass);
8813
+
8814
+ function ConvertsToRatio(json) {
8815
+ ConvertsToRatio.__super__.constructor.apply(this, arguments);
8816
+ this.operand = json.operand;
8817
+ }
8818
+
8819
+ ConvertsToRatio.prototype.exec = function(ctx) {
8820
+ var operatorValue;
8821
+ operatorValue = this.execArgs(ctx);
8822
+ if (operatorValue === null) {
8823
+ return null;
8824
+ } else {
8825
+ return canConvertToType(ToRatio, this.operand, ctx);
8826
+ }
8827
+ };
8828
+
8829
+ return ConvertsToRatio;
8830
+
8831
+ })(Expression);
8551
8832
 
8552
8833
  module.exports.ConvertsToString = ConvertsToString = (function(superClass) {
8553
8834
  extend(ConvertsToString, superClass);
8554
8835
 
8555
- function ConvertsToString() {
8556
- return ConvertsToString.__super__.constructor.apply(this, arguments);
8836
+ function ConvertsToString(json) {
8837
+ ConvertsToString.__super__.constructor.apply(this, arguments);
8838
+ this.operand = json.operand;
8557
8839
  }
8558
8840
 
8841
+ ConvertsToString.prototype.exec = function(ctx) {
8842
+ var operatorValue;
8843
+ operatorValue = this.execArgs(ctx);
8844
+ if (operatorValue === null) {
8845
+ return null;
8846
+ } else {
8847
+ return canConvertToType(ToString, this.operand, ctx);
8848
+ }
8849
+ };
8850
+
8559
8851
  return ConvertsToString;
8560
8852
 
8561
- })(UnimplementedExpression);
8853
+ })(Expression);
8562
8854
 
8563
8855
  module.exports.ConvertsToTime = ConvertsToTime = (function(superClass) {
8564
8856
  extend(ConvertsToTime, superClass);
8565
8857
 
8566
- function ConvertsToTime() {
8567
- return ConvertsToTime.__super__.constructor.apply(this, arguments);
8858
+ function ConvertsToTime(json) {
8859
+ ConvertsToTime.__super__.constructor.apply(this, arguments);
8860
+ this.operand = json.operand;
8568
8861
  }
8569
8862
 
8863
+ ConvertsToTime.prototype.exec = function(ctx) {
8864
+ var operatorValue;
8865
+ operatorValue = this.execArgs(ctx);
8866
+ if (operatorValue === null) {
8867
+ return null;
8868
+ } else {
8869
+ return canConvertToType(ToTime, this.operand, ctx);
8870
+ }
8871
+ };
8872
+
8570
8873
  return ConvertsToTime;
8571
8874
 
8875
+ })(Expression);
8876
+
8877
+ canConvertToType = function(toFunction, operand, ctx) {
8878
+ var value;
8879
+ try {
8880
+ value = new toFunction({
8881
+ "type": toFunction.name,
8882
+ "operand": operand
8883
+ }).execute(ctx);
8884
+ if (value != null) {
8885
+ return true;
8886
+ } else {
8887
+ return false;
8888
+ }
8889
+ } catch (error) {
8890
+ return false;
8891
+ }
8892
+ };
8893
+
8894
+ module.exports.Is = Is = (function(superClass) {
8895
+ extend(Is, superClass);
8896
+
8897
+ function Is() {
8898
+ return Is.__super__.constructor.apply(this, arguments);
8899
+ }
8900
+
8901
+ return Is;
8902
+
8572
8903
  })(UnimplementedExpression);
8573
8904
 
8574
8905
  module.exports.IntervalTypeSpecifier = IntervalTypeSpecifier = (function(superClass) {
@@ -8619,7 +8950,7 @@
8619
8950
 
8620
8951
 
8621
8952
 
8622
- },{"../datatypes/clinical":5,"../datatypes/datetime":7,"../util/math":135,"../util/util":136,"./expression":20,"./quantity":32,"./reusable":35}],39:[function(require,module,exports){
8953
+ },{"../datatypes/clinical":5,"../datatypes/datetime":7,"../util/math":135,"../util/util":136,"./expression":20,"./quantity":32,"./ratio":34,"./reusable":35}],39:[function(require,module,exports){
8623
8954
  // Generated by CoffeeScript 1.12.7
8624
8955
  (function() {
8625
8956
  window.cql = require('../../cql');
@@ -45330,7 +45661,7 @@
45330
45661
  };
45331
45662
 
45332
45663
  areDateTimesOrQuantities = function(a, b) {
45333
- return (a instanceof DateTime && b instanceof DateTime) || ((a != null ? a.isQuantity : void 0) && (b != null ? b.isQuantity : void 0));
45664
+ return (a != null ? a.isDateTime : void 0) && (b != null ? b.isDateTime : void 0) || (a != null ? a.isDate : void 0) && (b != null ? b.isDate : void 0) || (a != null ? a.isTime : void 0) && (b != null ? b.isTime : void 0) || (a != null ? a.isQuantity : void 0) && (b != null ? b.isQuantity : void 0);
45334
45665
  };
45335
45666
 
45336
45667
  isUncertainty = function(x) {
@@ -45556,7 +45887,7 @@
45556
45887
  case '[object Object]':
45557
45888
  return compareObjects(a, b, equals);
45558
45889
  case '[object Function]':
45559
- return a === b;
45890
+ return a.toString() === b.toString();
45560
45891
  }
45561
45892
  return false;
45562
45893
  };
@@ -45665,6 +45996,12 @@
45665
45996
  } else {
45666
45997
  return val.successor();
45667
45998
  }
45999
+ } else if (val != null ? val.isDate : void 0) {
46000
+ if (val.sameAs(MAX_DATE_VALUE.getDate())) {
46001
+ throw new OverFlowException();
46002
+ } else {
46003
+ return val.successor();
46004
+ }
45668
46005
  } else if (val instanceof Uncertainty) {
45669
46006
  high = (function() {
45670
46007
  try {
@@ -45702,6 +46039,12 @@
45702
46039
  } else {
45703
46040
  return val.predecessor();
45704
46041
  }
46042
+ } else if (val != null ? val.isDate : void 0) {
46043
+ if (val.sameAs(MIN_DATE_VALUE.getDate())) {
46044
+ throw new OverFlowException();
46045
+ } else {
46046
+ return val.predecessor();
46047
+ }
45705
46048
  } else if (val instanceof Uncertainty) {
45706
46049
  low = (function() {
45707
46050
  try {
@@ -45731,6 +46074,8 @@
45731
46074
  }
45732
46075
  } else if (val instanceof DateTime) {
45733
46076
  return MAX_DATE_VALUE;
46077
+ } else if (val != null ? val.isDate : void 0) {
46078
+ return MAX_DATE_VALUE.getDate();
45734
46079
  } else if (val != null ? val.isQuantity : void 0) {
45735
46080
  val2 = val.clone();
45736
46081
  val2.value = maxValueForInstance(val2.value);
@@ -45750,6 +46095,8 @@
45750
46095
  }
45751
46096
  } else if (val instanceof DateTime) {
45752
46097
  return MIN_DATE_VALUE;
46098
+ } else if (val != null ? val.isDate : void 0) {
46099
+ return MIN_DATE_VALUE.getDate();
45753
46100
  } else if (val != null ? val.isQuantity : void 0) {
45754
46101
  val2 = val.clone();
45755
46102
  val2.value = minValueForInstance(val2.value);
@@ -45786,7 +46133,7 @@
45786
46133
  (function() {
45787
46134
  var getTimezoneSeparatorFromString, normalizeMillisecondsField, normalizeMillisecondsFieldInString, typeIsArray;
45788
46135
 
45789
- module.exports.compact = function(things) {
46136
+ module.exports.removeNulls = function(things) {
45790
46137
  return things.filter(function(x) {
45791
46138
  return x != null;
45792
46139
  });
@@ -45869,6 +46216,31 @@
45869
46216
 
45870
46217
 
45871
46218
  },{}],137:[function(require,module,exports){
46219
+ if (typeof Object.create === 'function') {
46220
+ // implementation from standard node.js 'util' module
46221
+ module.exports = function inherits(ctor, superCtor) {
46222
+ ctor.super_ = superCtor
46223
+ ctor.prototype = Object.create(superCtor.prototype, {
46224
+ constructor: {
46225
+ value: ctor,
46226
+ enumerable: false,
46227
+ writable: true,
46228
+ configurable: true
46229
+ }
46230
+ });
46231
+ };
46232
+ } else {
46233
+ // old school shim for old browsers
46234
+ module.exports = function inherits(ctor, superCtor) {
46235
+ ctor.super_ = superCtor
46236
+ var TempCtor = function () {}
46237
+ TempCtor.prototype = superCtor.prototype
46238
+ ctor.prototype = new TempCtor()
46239
+ ctor.prototype.constructor = ctor
46240
+ }
46241
+ }
46242
+
46243
+ },{}],138:[function(require,module,exports){
45872
46244
  //! moment.js
45873
46245
  //! version : 2.20.1
45874
46246
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
@@ -50405,7 +50777,7 @@ return hooks;
50405
50777
 
50406
50778
  })));
50407
50779
 
50408
- },{}],138:[function(require,module,exports){
50780
+ },{}],139:[function(require,module,exports){
50409
50781
  // shim for using process in browser
50410
50782
  var process = module.exports = {};
50411
50783
 
@@ -50591,7 +50963,7 @@ process.chdir = function (dir) {
50591
50963
  };
50592
50964
  process.umask = function() { return 0; };
50593
50965
 
50594
- },{}],139:[function(require,module,exports){
50966
+ },{}],140:[function(require,module,exports){
50595
50967
  module.exports={
50596
50968
  "10*": {
50597
50969
  "value": 10,
@@ -51795,10 +52167,10 @@ module.exports={
51795
52167
  }
51796
52168
  }
51797
52169
 
51798
- },{}],140:[function(require,module,exports){
52170
+ },{}],141:[function(require,module,exports){
51799
52171
  module.exports={"mol":true,"sr":true,"Hz":true,"N":true,"Pa":true,"J":true,"W":true,"A":true,"V":true,"F":true,"Ohm":true,"S":true,"Wb":true,"Cel":true,"T":true,"H":true,"lm":true,"lx":true,"Bq":true,"Gy":true,"Sv":true,"l":true,"L":true,"ar":true,"t":true,"bar":true,"u":true,"eV":true,"pc":true,"[c]":true,"[h]":true,"[k]":true,"[eps_0]":true,"[mu_0]":true,"[e]":true,"[m_e]":true,"[m_p]":true,"[G]":true,"[g]":true,"[ly]":true,"gf":true,"Ky":true,"Gal":true,"dyn":true,"erg":true,"P":true,"Bi":true,"St":true,"Mx":true,"G":true,"Oe":true,"Gb":true,"sb":true,"Lmb":true,"ph":true,"Ci":true,"R":true,"RAD":true,"REM":true,"cal_[15]":true,"cal_[20]":true,"cal_m":true,"cal_IT":true,"cal_th":true,"cal":true,"tex":true,"m[H2O]":true,"m[Hg]":true,"eq":true,"osm":true,"g%":true,"kat":true,"U":true,"[iU]":true,"[IU]":true,"Np":true,"B":true,"B[SPL]":true,"B[V]":true,"B[mV]":true,"B[uV]":true,"B[10.nV]":true,"B[W]":true,"B[kW]":true,"st":true,"mho":true,"bit":true,"By":true,"Bd":true,"m":true,"s":true,"g":true,"rad":true,"K":true,"C":true,"cd":true}
51800
52172
 
51801
- },{}],141:[function(require,module,exports){
52173
+ },{}],142:[function(require,module,exports){
51802
52174
  module.exports={
51803
52175
  "Y": {
51804
52176
  "CODE": "YA",
@@ -52162,7 +52534,7 @@ module.exports={
52162
52534
  }
52163
52535
  }
52164
52536
 
52165
- },{}],142:[function(require,module,exports){
52537
+ },{}],143:[function(require,module,exports){
52166
52538
  module.exports={
52167
52539
  "Y": 1e+24,
52168
52540
  "Z": 1e+21,
@@ -52190,7 +52562,7 @@ module.exports={
52190
52562
  "Ti": 1099511627776
52191
52563
  }
52192
52564
 
52193
- },{}],143:[function(require,module,exports){
52565
+ },{}],144:[function(require,module,exports){
52194
52566
  module.exports = function () {
52195
52567
  /*
52196
52568
  * Generated by PEG.js 0.8.0.
@@ -53347,7 +53719,7 @@ module.exports = function () {
53347
53719
  };
53348
53720
  }();
53349
53721
 
53350
- },{"../lib/helpers":145,"./metrics.json":140,"./prefixMetadata.json":141,"./prefixes.json":142,"./unitMetadata.json":144}],144:[function(require,module,exports){
53722
+ },{"../lib/helpers":146,"./metrics.json":141,"./prefixMetadata.json":142,"./prefixes.json":143,"./unitMetadata.json":145}],145:[function(require,module,exports){
53351
53723
  module.exports={
53352
53724
  "10*": {
53353
53725
  "isBase": false,
@@ -59534,7 +59906,7 @@ module.exports={
59534
59906
  }
59535
59907
  }
59536
59908
 
59537
- },{}],145:[function(require,module,exports){
59909
+ },{}],146:[function(require,module,exports){
59538
59910
  module.exports = {
59539
59911
 
59540
59912
  multiply: function multiply(t, ms) {
@@ -59604,7 +59976,7 @@ module.exports = {
59604
59976
  }
59605
59977
  };
59606
59978
 
59607
- },{}],146:[function(require,module,exports){
59979
+ },{}],147:[function(require,module,exports){
59608
59980
  parser = require('./generated/ucum-parser.js');
59609
59981
  equivalents = require('./generated/equivalents.json');
59610
59982
  helpers = require('./lib/helpers.js');
@@ -59825,32 +60197,7 @@ function unitQuery(criteria, resultFields) {
59825
60197
  });
59826
60198
  }
59827
60199
 
59828
- },{"./generated/equivalents.json":139,"./generated/ucum-parser.js":143,"./generated/unitMetadata.json":144,"./lib/helpers.js":145}],147:[function(require,module,exports){
59829
- if (typeof Object.create === 'function') {
59830
- // implementation from standard node.js 'util' module
59831
- module.exports = function inherits(ctor, superCtor) {
59832
- ctor.super_ = superCtor
59833
- ctor.prototype = Object.create(superCtor.prototype, {
59834
- constructor: {
59835
- value: ctor,
59836
- enumerable: false,
59837
- writable: true,
59838
- configurable: true
59839
- }
59840
- });
59841
- };
59842
- } else {
59843
- // old school shim for old browsers
59844
- module.exports = function inherits(ctor, superCtor) {
59845
- ctor.super_ = superCtor
59846
- var TempCtor = function () {}
59847
- TempCtor.prototype = superCtor.prototype
59848
- ctor.prototype = new TempCtor()
59849
- ctor.prototype.constructor = ctor
59850
- }
59851
- }
59852
-
59853
- },{}],148:[function(require,module,exports){
60200
+ },{"./generated/equivalents.json":140,"./generated/ucum-parser.js":144,"./generated/unitMetadata.json":145,"./lib/helpers.js":146}],148:[function(require,module,exports){
59854
60201
  module.exports = function isBuffer(arg) {
59855
60202
  return arg && typeof arg === 'object'
59856
60203
  && typeof arg.copy === 'function'
@@ -60447,4 +60794,4 @@ function hasOwnProperty(obj, prop) {
60447
60794
  }
60448
60795
 
60449
60796
  }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
60450
- },{"./support/isBuffer":148,"_process":138,"inherits":147}]},{},[39]);
60797
+ },{"./support/isBuffer":148,"_process":139,"inherits":137}]},{},[39]);