hquery-patient-api 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.travis.yml +17 -0
- data/Gemfile +14 -0
- data/LICENSE +57 -0
- data/README.md +34 -0
- data/Rakefile +41 -0
- data/VERSION +1 -0
- data/app/assets/javascripts/allergy.js.coffee +79 -0
- data/app/assets/javascripts/caregoal.js.coffee +18 -0
- data/app/assets/javascripts/condition.js.coffee +88 -0
- data/app/assets/javascripts/core.js.coffee +556 -0
- data/app/assets/javascripts/encounter.js.coffee +56 -0
- data/app/assets/javascripts/functionalstatus.js.coffee +48 -0
- data/app/assets/javascripts/immunization.js.coffee +115 -0
- data/app/assets/javascripts/languages.js.coffee +29 -0
- data/app/assets/javascripts/medicalequipment.js.coffee +28 -0
- data/app/assets/javascripts/medication.js.coffee +280 -0
- data/app/assets/javascripts/patient.js.coffee +302 -0
- data/app/assets/javascripts/pregnancy.js.coffee +24 -0
- data/app/assets/javascripts/procedure.js.coffee +28 -0
- data/app/assets/javascripts/provider.js.coffee +55 -0
- data/app/assets/javascripts/result.js.coffee +43 -0
- data/app/assets/javascripts/socialhistory.js.coffee +40 -0
- data/doc/jsdoc-toolkit/README.txt +183 -0
- data/doc/jsdoc-toolkit/app/frame.js +33 -0
- data/doc/jsdoc-toolkit/app/frame/Chain.js +102 -0
- data/doc/jsdoc-toolkit/app/frame/Dumper.js +144 -0
- data/doc/jsdoc-toolkit/app/frame/Hash.js +84 -0
- data/doc/jsdoc-toolkit/app/frame/Link.js +173 -0
- data/doc/jsdoc-toolkit/app/frame/Namespace.js +10 -0
- data/doc/jsdoc-toolkit/app/frame/Opt.js +134 -0
- data/doc/jsdoc-toolkit/app/frame/Reflection.js +26 -0
- data/doc/jsdoc-toolkit/app/frame/String.js +93 -0
- data/doc/jsdoc-toolkit/app/frame/Testrun.js +129 -0
- data/doc/jsdoc-toolkit/app/handlers/FOODOC.js +26 -0
- data/doc/jsdoc-toolkit/app/handlers/XMLDOC.js +26 -0
- data/doc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +159 -0
- data/doc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +16 -0
- data/doc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +292 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC.js +106 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +204 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +294 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +140 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +109 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/Lang.js +144 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/Parser.js +146 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +33 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +644 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +243 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +41 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/Token.js +18 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +332 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +133 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/Util.js +32 -0
- data/doc/jsdoc-toolkit/app/lib/JSDOC/Walker.js +507 -0
- data/doc/jsdoc-toolkit/app/main.js +111 -0
- data/doc/jsdoc-toolkit/app/plugins/commentSrcJson.js +20 -0
- data/doc/jsdoc-toolkit/app/plugins/frameworkPrototype.js +16 -0
- data/doc/jsdoc-toolkit/app/plugins/functionCall.js +10 -0
- data/doc/jsdoc-toolkit/app/plugins/publishSrcHilite.js +62 -0
- data/doc/jsdoc-toolkit/app/plugins/symbolLink.js +10 -0
- data/doc/jsdoc-toolkit/app/plugins/tagParamConfig.js +31 -0
- data/doc/jsdoc-toolkit/app/plugins/tagSynonyms.js +43 -0
- data/doc/jsdoc-toolkit/app/run.js +348 -0
- data/doc/jsdoc-toolkit/app/t/TestDoc.js +144 -0
- data/doc/jsdoc-toolkit/app/t/runner.js +13 -0
- data/doc/jsdoc-toolkit/app/test.js +342 -0
- data/doc/jsdoc-toolkit/app/test/addon.js +24 -0
- data/doc/jsdoc-toolkit/app/test/anon_inner.js +14 -0
- data/doc/jsdoc-toolkit/app/test/augments.js +31 -0
- data/doc/jsdoc-toolkit/app/test/augments2.js +26 -0
- data/doc/jsdoc-toolkit/app/test/borrows.js +46 -0
- data/doc/jsdoc-toolkit/app/test/borrows2.js +23 -0
- data/doc/jsdoc-toolkit/app/test/config.js +22 -0
- data/doc/jsdoc-toolkit/app/test/constructs.js +18 -0
- data/doc/jsdoc-toolkit/app/test/encoding.js +10 -0
- data/doc/jsdoc-toolkit/app/test/encoding_other.js +12 -0
- data/doc/jsdoc-toolkit/app/test/event.js +54 -0
- data/doc/jsdoc-toolkit/app/test/exports.js +14 -0
- data/doc/jsdoc-toolkit/app/test/functions_anon.js +39 -0
- data/doc/jsdoc-toolkit/app/test/functions_nested.js +33 -0
- data/doc/jsdoc-toolkit/app/test/global.js +13 -0
- data/doc/jsdoc-toolkit/app/test/globals.js +25 -0
- data/doc/jsdoc-toolkit/app/test/ignore.js +10 -0
- data/doc/jsdoc-toolkit/app/test/inner.js +16 -0
- data/doc/jsdoc-toolkit/app/test/jsdoc_test.js +477 -0
- data/doc/jsdoc-toolkit/app/test/lend.js +33 -0
- data/doc/jsdoc-toolkit/app/test/memberof.js +19 -0
- data/doc/jsdoc-toolkit/app/test/memberof2.js +38 -0
- data/doc/jsdoc-toolkit/app/test/memberof3.js +33 -0
- data/doc/jsdoc-toolkit/app/test/memberof_constructor.js +17 -0
- data/doc/jsdoc-toolkit/app/test/module.js +17 -0
- data/doc/jsdoc-toolkit/app/test/multi_methods.js +25 -0
- data/doc/jsdoc-toolkit/app/test/name.js +19 -0
- data/doc/jsdoc-toolkit/app/test/namespace_nested.js +23 -0
- data/doc/jsdoc-toolkit/app/test/nocode.js +13 -0
- data/doc/jsdoc-toolkit/app/test/oblit_anon.js +20 -0
- data/doc/jsdoc-toolkit/app/test/overview.js +20 -0
- data/doc/jsdoc-toolkit/app/test/param_inline.js +37 -0
- data/doc/jsdoc-toolkit/app/test/params_optional.js +8 -0
- data/doc/jsdoc-toolkit/app/test/prototype.js +17 -0
- data/doc/jsdoc-toolkit/app/test/prototype_nested.js +9 -0
- data/doc/jsdoc-toolkit/app/test/prototype_oblit.js +13 -0
- data/doc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +24 -0
- data/doc/jsdoc-toolkit/app/test/public.js +10 -0
- data/doc/jsdoc-toolkit/app/test/scripts/code.js +5 -0
- data/doc/jsdoc-toolkit/app/test/scripts/notcode.txt +5 -0
- data/doc/jsdoc-toolkit/app/test/shared.js +42 -0
- data/doc/jsdoc-toolkit/app/test/shared2.js +2 -0
- data/doc/jsdoc-toolkit/app/test/shortcuts.js +22 -0
- data/doc/jsdoc-toolkit/app/test/static_this.js +13 -0
- data/doc/jsdoc-toolkit/app/test/synonyms.js +31 -0
- data/doc/jsdoc-toolkit/app/test/tosource.js +23 -0
- data/doc/jsdoc-toolkit/app/test/variable_redefine.js +14 -0
- data/doc/jsdoc-toolkit/conf/sample.conf +31 -0
- data/doc/jsdoc-toolkit/java/build.xml +36 -0
- data/doc/jsdoc-toolkit/java/build_1.4.xml +36 -0
- data/doc/jsdoc-toolkit/java/classes/js.jar +0 -0
- data/doc/jsdoc-toolkit/java/src/JsDebugRun.java +21 -0
- data/doc/jsdoc-toolkit/java/src/JsRun.java +21 -0
- data/doc/jsdoc-toolkit/jsdebug.jar +0 -0
- data/doc/jsdoc-toolkit/jsrun.jar +0 -0
- data/doc/jsdoc-toolkit/jsrun.sh +52 -0
- data/doc/jsdoc-toolkit/out/jsdoc/files.html +218 -0
- data/doc/jsdoc-toolkit/out/jsdoc/index.html +218 -0
- data/doc/jsdoc-toolkit/out/jsdoc/symbols/Patient.html +546 -0
- data/doc/jsdoc-toolkit/out/jsdoc/symbols/_global_.html +463 -0
- data/doc/jsdoc-toolkit/out/jsdoc/symbols/src/tmp_patient.js.html +89 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +17 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +56 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/class.tmpl +649 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/index.tmpl +39 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/publish.js +201 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/static/default.css +162 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/static/header.html +2 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/static/index.html +19 -0
- data/doc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +35 -0
- data/hquery_patientapi.gemspec +14 -0
- data/lib/hquery-patient-api.rb +4 -0
- data/lib/hquery/engine.rb +4 -0
- data/lib/hquery/generator.rb +18 -0
- data/test/fixtures/patient/barry_berry.json +466 -0
- data/test/test_helper.rb +25 -0
- data/test/unit/patient_api_test.rb +178 -0
- metadata +193 -0
@@ -0,0 +1,302 @@
|
|
1
|
+
# =require core.js.coffee
|
2
|
+
# =require medication.js.coffee
|
3
|
+
# =require condition.js.coffee
|
4
|
+
# =require encounter.js.coffee
|
5
|
+
# =require procedure.js.coffee
|
6
|
+
# =require result.js.coffee
|
7
|
+
# =require immunization.js.coffee
|
8
|
+
# =require allergy.js.coffee
|
9
|
+
# =require provider.js.coffee
|
10
|
+
# =require languages.js.coffee
|
11
|
+
# =require pregnancy.js.coffee
|
12
|
+
# =require socialhistory.js.coffee
|
13
|
+
# =require caregoal.js.coffee
|
14
|
+
# =require medicalequipment.js.coffee
|
15
|
+
# =require functionalstatus.js.coffee
|
16
|
+
|
17
|
+
###*
|
18
|
+
@namespace scoping into the hquery namespace
|
19
|
+
###
|
20
|
+
this.hQuery ||= {}
|
21
|
+
|
22
|
+
###*
|
23
|
+
@class Supports
|
24
|
+
@exports Supports as hQuery.Supports
|
25
|
+
###
|
26
|
+
class hQuery.Supports
|
27
|
+
constructor: (@json) ->
|
28
|
+
###*
|
29
|
+
@returns {DateRange}
|
30
|
+
###
|
31
|
+
supportDate: -> new hQuery.DateRange @json['supportDate']
|
32
|
+
|
33
|
+
###*
|
34
|
+
@returns {Person}
|
35
|
+
###
|
36
|
+
guardian: -> new hQuery.Person @json['guardian']
|
37
|
+
|
38
|
+
###*
|
39
|
+
@returns {String}
|
40
|
+
###
|
41
|
+
guardianSupportType: -> @json['guardianSupportType']
|
42
|
+
|
43
|
+
###*
|
44
|
+
@returns {Person}
|
45
|
+
###
|
46
|
+
contact: -> new hQuery.Person @json['contact']
|
47
|
+
|
48
|
+
###*
|
49
|
+
@returns {String}
|
50
|
+
###
|
51
|
+
contactSupportType: -> @json['guardianSupportType']
|
52
|
+
|
53
|
+
|
54
|
+
###*
|
55
|
+
@class Representation of a patient
|
56
|
+
@augments hQuery.Person
|
57
|
+
@exports Patient as hQuery.Patient
|
58
|
+
###
|
59
|
+
class hQuery.Patient extends hQuery.Person
|
60
|
+
###*
|
61
|
+
@returns {String} containing M or F representing the gender of the patient
|
62
|
+
###
|
63
|
+
gender: -> @json['gender']
|
64
|
+
|
65
|
+
###*
|
66
|
+
@returns {Date} containing the patient's birthdate
|
67
|
+
###
|
68
|
+
birthtime: ->
|
69
|
+
hQuery.dateFromUtcSeconds @json['birthdate']
|
70
|
+
|
71
|
+
###*
|
72
|
+
@param (Date) date the date at which the patient age is calculated, defaults to now.
|
73
|
+
@returns {number} the patient age in years
|
74
|
+
###
|
75
|
+
age: (date = new Date()) ->
|
76
|
+
oneDay = 24*60*60*1000;
|
77
|
+
oneYear = 365*oneDay;
|
78
|
+
return (date.getTime()-this.birthtime().getTime())/oneYear;
|
79
|
+
|
80
|
+
###*
|
81
|
+
@returns {CodedValue} the domestic partnership status of the patient
|
82
|
+
The following HL7 codeset is used:
|
83
|
+
A Annulled
|
84
|
+
D Divorced
|
85
|
+
I Interlocutory
|
86
|
+
L Legally separated
|
87
|
+
M Married
|
88
|
+
P Polygamous
|
89
|
+
S Never Married
|
90
|
+
T Domestic Partner
|
91
|
+
W Widowed
|
92
|
+
###
|
93
|
+
maritalStatus: ->
|
94
|
+
if @json['maritalStatus']
|
95
|
+
return new hQuery.CodedValue @json['maritalStatus']['code'], @json['maritalStatus']['codeSystem']
|
96
|
+
|
97
|
+
###*
|
98
|
+
@returns {CodedValue} of the spiritual faith affiliation of the patient
|
99
|
+
It uses the HL7 codeset. http://www.hl7.org/memonly/downloads/v3edition.cfm#V32008
|
100
|
+
###
|
101
|
+
religiousAffiliation: ->
|
102
|
+
if @json['religiousAffiliation']
|
103
|
+
return new hQuery.CodedValue @json['religiousAffiliation']['code'], @json['religiousAffiliation']['codeSystem']
|
104
|
+
|
105
|
+
###*
|
106
|
+
@returns {CodedValue} of the race of the patient
|
107
|
+
CDC codes: http://phinvads.cdc.gov/vads/ViewCodeSystemConcept.action?oid=2.16.840.1.113883.6.238&code=1000-9
|
108
|
+
###
|
109
|
+
race: ->
|
110
|
+
if @json['race']
|
111
|
+
return new hQuery.CodedValue @json['race']['code'], @json['race']['codeSystem']
|
112
|
+
|
113
|
+
###*
|
114
|
+
@returns {CodedValue} of the ethnicity of the patient
|
115
|
+
CDC codes: http://phinvads.cdc.gov/vads/ViewCodeSystemConcept.action?oid=2.16.840.1.113883.6.238&code=1000-9
|
116
|
+
###
|
117
|
+
ethnicity: ->
|
118
|
+
if @json['ethnicity']
|
119
|
+
return new hQuery.CodedValue @json['ethnicity']['code'], @json['ethnicity']['codeSystem']
|
120
|
+
|
121
|
+
###*
|
122
|
+
@returns {CodedValue} This is the code specifying the level of confidentiality of the document.
|
123
|
+
HL7 Confidentiality Code (2.16.840.1.113883.5.25)
|
124
|
+
###
|
125
|
+
confidentiality: ->
|
126
|
+
if @json['confidentiality']
|
127
|
+
return new hQuery.CodedValue @json['confidentiality']['code'], @json['confidentiality']['codeSystem']
|
128
|
+
|
129
|
+
###*
|
130
|
+
@returns {Address} of the location where the patient was born
|
131
|
+
###
|
132
|
+
birthPlace: ->
|
133
|
+
new hQuery.Address @json['birthPlace']
|
134
|
+
|
135
|
+
###*
|
136
|
+
@returns {Supports} information regarding key support contacts relative to healthcare decisions, including next of kin
|
137
|
+
###
|
138
|
+
supports: -> new hQuery.Supports @json['supports']
|
139
|
+
|
140
|
+
###*
|
141
|
+
@returns {Organization}
|
142
|
+
###
|
143
|
+
custodian: -> new hQuery.Organization @json['custodian']
|
144
|
+
|
145
|
+
###*
|
146
|
+
@returns {Provider} the providers associated with the patient
|
147
|
+
###
|
148
|
+
provider: -> new hQuery.Provider @json['provider']
|
149
|
+
|
150
|
+
|
151
|
+
###*
|
152
|
+
@returns {hQuery.CodedEntryList} A list of {@link hQuery.LanguagesSpoken} objects
|
153
|
+
Code from http://www.ietf.org/rfc/rfc4646.txt representing the name of the human language
|
154
|
+
###
|
155
|
+
languages: ->
|
156
|
+
list = new hQuery.CodedEntryList
|
157
|
+
if @json['languages']
|
158
|
+
for language in @json['languages']
|
159
|
+
list.push(new hQuery.Language(language))
|
160
|
+
list
|
161
|
+
|
162
|
+
###*
|
163
|
+
@returns {Boolean} returns true if the patient has died
|
164
|
+
###
|
165
|
+
expired: -> @json['expired']
|
166
|
+
|
167
|
+
###*
|
168
|
+
@returns {Boolean} returns true if the patient participated in a clinical trial
|
169
|
+
###
|
170
|
+
clinicalTrialParticipant: -> @json['clinicalTrialParticipant']
|
171
|
+
|
172
|
+
###*
|
173
|
+
@returns {hQuery.CodedEntryList} A list of {@link hQuery.Encounter} objects
|
174
|
+
###
|
175
|
+
encounters: ->
|
176
|
+
list = new hQuery.CodedEntryList
|
177
|
+
if @json['encounters']
|
178
|
+
for encounter in @json['encounters']
|
179
|
+
list.pushIfUsable(new hQuery.Encounter(encounter))
|
180
|
+
list
|
181
|
+
|
182
|
+
###*
|
183
|
+
@returns {hQuery.CodedEntryList} A list of {@link Medication} objects
|
184
|
+
###
|
185
|
+
medications: ->
|
186
|
+
list = new hQuery.CodedEntryList
|
187
|
+
if @json['medications']
|
188
|
+
for medication in @json['medications']
|
189
|
+
list.pushIfUsable(new hQuery.Medication(medication))
|
190
|
+
list
|
191
|
+
|
192
|
+
|
193
|
+
###*
|
194
|
+
@returns {hQuery.CodedEntryList} A list of {@link Condition} objects
|
195
|
+
###
|
196
|
+
conditions: ->
|
197
|
+
list = new hQuery.CodedEntryList
|
198
|
+
if @json['conditions']
|
199
|
+
for condition in @json['conditions']
|
200
|
+
list.pushIfUsable(new hQuery.Condition(condition))
|
201
|
+
list
|
202
|
+
|
203
|
+
###*
|
204
|
+
@returns {hQuery.CodedEntryList} A list of {@link Procedure} objects
|
205
|
+
###
|
206
|
+
procedures: ->
|
207
|
+
list = new hQuery.CodedEntryList
|
208
|
+
if @json['procedures']
|
209
|
+
for procedure in @json['procedures']
|
210
|
+
list.pushIfUsable(new hQuery.Procedure(procedure))
|
211
|
+
list
|
212
|
+
|
213
|
+
###*
|
214
|
+
@returns {hQuery.CodedEntryList} A list of {@link Result} objects
|
215
|
+
###
|
216
|
+
results: ->
|
217
|
+
list = new hQuery.CodedEntryList
|
218
|
+
if @json['results']
|
219
|
+
for result in @json['results']
|
220
|
+
list.pushIfUsable(new hQuery.Result(result))
|
221
|
+
list
|
222
|
+
|
223
|
+
###*
|
224
|
+
@returns {hQuery.CodedEntryList} A list of {@link Result} objects
|
225
|
+
###
|
226
|
+
vitalSigns: ->
|
227
|
+
list = new hQuery.CodedEntryList
|
228
|
+
if @json['vital_signs']
|
229
|
+
for vital in @json['vital_signs']
|
230
|
+
list.pushIfUsable(new hQuery.Result(vital))
|
231
|
+
list
|
232
|
+
|
233
|
+
###*
|
234
|
+
@returns {hQuery.CodedEntryList} A list of {@link Immunization} objects
|
235
|
+
###
|
236
|
+
immunizations: ->
|
237
|
+
list = new hQuery.CodedEntryList
|
238
|
+
if @json['immunizations']
|
239
|
+
for immunization in @json['immunizations']
|
240
|
+
list.pushIfUsable(new hQuery.Immunization(immunization))
|
241
|
+
list
|
242
|
+
|
243
|
+
|
244
|
+
###*
|
245
|
+
@returns {hQuery.CodedEntryList} A list of {@link Allergy} objects
|
246
|
+
###
|
247
|
+
allergies: ->
|
248
|
+
list = new hQuery.CodedEntryList
|
249
|
+
if @json['allergies']
|
250
|
+
for allergy in @json['allergies']
|
251
|
+
list.pushIfUsable(new hQuery.Allergy(allergy))
|
252
|
+
list
|
253
|
+
|
254
|
+
###*
|
255
|
+
@returns {hQuery.CodedEntryList} A list of {@link Pregnancy} objects
|
256
|
+
###
|
257
|
+
pregnancies: ->
|
258
|
+
list = new hQuery.CodedEntryList
|
259
|
+
if @json['pregnancies']
|
260
|
+
for pregnancy in @json['pregnancies']
|
261
|
+
list.pushIfUsable(new hQuery.Pregnancy(pregnancy))
|
262
|
+
list
|
263
|
+
|
264
|
+
###*
|
265
|
+
@returns {hQuery.CodedEntryList} A list of {@link Socialhistory} objects
|
266
|
+
###
|
267
|
+
socialHistories: ->
|
268
|
+
list = new hQuery.CodedEntryList
|
269
|
+
if @json['socialhistories']
|
270
|
+
for socialhistory in @json['socialhistories']
|
271
|
+
list.pushIfUsable(new hQuery.Socialhistory(socialhistory))
|
272
|
+
list
|
273
|
+
|
274
|
+
###*
|
275
|
+
@returns {hQuery.CodedEntryList} A list of {@link CareGoal} objects
|
276
|
+
###
|
277
|
+
careGoals: ->
|
278
|
+
list = new hQuery.CodedEntryList
|
279
|
+
if @json['care_goals']
|
280
|
+
for caregoal in @json['care_goals']
|
281
|
+
list.pushIfUsable(new hQuery.CareGoal(caregoal))
|
282
|
+
list
|
283
|
+
|
284
|
+
###*
|
285
|
+
@returns {hQuery.CodedEntryList} A list of {@link MedicalEquipment} objects
|
286
|
+
###
|
287
|
+
medicalEquipment: ->
|
288
|
+
list = new hQuery.CodedEntryList
|
289
|
+
if @json['medical_equipment']
|
290
|
+
for equipment in @json['medical_equipment']
|
291
|
+
list.pushIfUsable(new hQuery.MedicalEquipment(equipment))
|
292
|
+
list
|
293
|
+
|
294
|
+
###*
|
295
|
+
@returns {hQuery.CodedEntryList} A list of {@link FunctionalStatus} objects
|
296
|
+
###
|
297
|
+
functionalStatuses: ->
|
298
|
+
list = new hQuery.CodedEntryList
|
299
|
+
if @json['functional_statuses']
|
300
|
+
for fs in @json['functional_statuses']
|
301
|
+
list.pushIfUsable(new hQuery.FunctionalStatus(fs))
|
302
|
+
list
|
@@ -0,0 +1,24 @@
|
|
1
|
+
###*
|
2
|
+
@namespace scoping into the hquery namespace
|
3
|
+
###
|
4
|
+
this.hQuery ||= {}
|
5
|
+
|
6
|
+
|
7
|
+
# =require core.coffee
|
8
|
+
###*
|
9
|
+
This includes information about the patients current and past pregnancy status
|
10
|
+
The Coded Entry code system should be SNOMED-CT
|
11
|
+
@class
|
12
|
+
@augments hQuery.CodedEntry
|
13
|
+
@exports Pregnancy as hQuery.Pregnancy
|
14
|
+
###
|
15
|
+
class hQuery.Pregnancy extends hQuery.CodedEntry
|
16
|
+
constructor: (@json) ->
|
17
|
+
super(@json)
|
18
|
+
|
19
|
+
|
20
|
+
###*
|
21
|
+
@returns {String}
|
22
|
+
###
|
23
|
+
comment: -> @json['comment']
|
24
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
###*
|
2
|
+
@namespace scoping into the hquery namespace
|
3
|
+
###
|
4
|
+
this.hQuery ||= {}
|
5
|
+
|
6
|
+
|
7
|
+
# =require core.coffee
|
8
|
+
###*
|
9
|
+
This represents all interventional, surgical, diagnostic, or therapeutic procedures or
|
10
|
+
treatments pertinent to the patient.
|
11
|
+
@class
|
12
|
+
@augments hQuery.CodedEntry
|
13
|
+
@exports Procedure as hQuery.Procedure
|
14
|
+
###
|
15
|
+
class hQuery.Procedure extends hQuery.CodedEntry
|
16
|
+
constructor: (@json) ->
|
17
|
+
super(@json)
|
18
|
+
|
19
|
+
###*
|
20
|
+
@returns {hQuery.Actor} The provider that performed the procedure
|
21
|
+
###
|
22
|
+
performer: -> new hQuery.Actor @json['performer']
|
23
|
+
|
24
|
+
###*
|
25
|
+
@returns {hQuery.CodedValue} A SNOMED code indicating the body site on which the
|
26
|
+
procedure was performed
|
27
|
+
###
|
28
|
+
site: -> new hQuery.CodedValue @json['site']['code'], @json['site']['codeSystem']
|
@@ -0,0 +1,55 @@
|
|
1
|
+
###*
|
2
|
+
@namespace scoping into the hquery namespace
|
3
|
+
###
|
4
|
+
this.hQuery ||= {}
|
5
|
+
|
6
|
+
|
7
|
+
# =require core.coffee
|
8
|
+
###*
|
9
|
+
@class
|
10
|
+
|
11
|
+
@exports Provider as hQuery.Provider
|
12
|
+
###
|
13
|
+
class hQuery.Provider
|
14
|
+
constructor: (@json) ->
|
15
|
+
|
16
|
+
###*
|
17
|
+
@returns {hQuery.Person}
|
18
|
+
###
|
19
|
+
providerEntity: -> new hQuery.Person @json['providerEntity']
|
20
|
+
|
21
|
+
###*
|
22
|
+
@returns {hQuery.DateRange}
|
23
|
+
###
|
24
|
+
careProvisionDateRange: -> new hQuery.DateRange @json['careProvisionDateRange']
|
25
|
+
|
26
|
+
###*
|
27
|
+
@returns {hQuery.CodedValue}
|
28
|
+
###
|
29
|
+
role: -> new hQuery.CodedValue @json['role']['code'], @json['role']['codeSystem']
|
30
|
+
|
31
|
+
###*
|
32
|
+
@returns {String}
|
33
|
+
###
|
34
|
+
patientID: -> @json['patientID']
|
35
|
+
|
36
|
+
|
37
|
+
###*
|
38
|
+
@returns {hQuery.CodedValue}
|
39
|
+
###
|
40
|
+
providerType: -> new hQuery.CodedValue @json['providerType']['code'], @json['providerType']['codeSystem']
|
41
|
+
|
42
|
+
|
43
|
+
###*
|
44
|
+
@returns {String}
|
45
|
+
###
|
46
|
+
providerID: -> @json['providerID']
|
47
|
+
|
48
|
+
###*
|
49
|
+
@returns {hQuery.Organization}
|
50
|
+
###
|
51
|
+
organizationName: -> new hQuery.Organization @json
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
###*
|
2
|
+
@namespace scoping into the hquery namespace
|
3
|
+
###
|
4
|
+
this.hQuery ||= {}
|
5
|
+
|
6
|
+
|
7
|
+
# =require core.coffee
|
8
|
+
###*
|
9
|
+
Observations generated by laboratories, imaging procedures, and other procedures. The scope
|
10
|
+
includes hematology, chemistry, serology, virology, toxicology, microbiology, plain x-ray,
|
11
|
+
ultrasound, CT, MRI, angiography, cardiac echo, nuclear medicine, pathology, and procedure
|
12
|
+
observations.
|
13
|
+
@class
|
14
|
+
@augments hQuery.CodedEntry
|
15
|
+
@exports Result as hQuery.Result
|
16
|
+
###
|
17
|
+
class hQuery.Result extends hQuery.CodedEntry
|
18
|
+
constructor: (@json) ->
|
19
|
+
super(@json)
|
20
|
+
|
21
|
+
###*
|
22
|
+
ASTM CCR defines a restricted set of required result Type codes (see ResultTypeCode in section 7.3
|
23
|
+
Summary of CCD value sets), used to categorize a result into one of several commonly accepted values
|
24
|
+
(e.g. Hematology, Chemistry, Nuclear Medicine).
|
25
|
+
@returns {CodedValue}
|
26
|
+
###
|
27
|
+
resultType: -> this.type()
|
28
|
+
|
29
|
+
###*
|
30
|
+
@returns {CodedValue}
|
31
|
+
###
|
32
|
+
interpretation: -> new hQuery.CodedValue @json['interpretation'].code, @json['interpretation'].codeSystem
|
33
|
+
|
34
|
+
###*
|
35
|
+
@returns {String}
|
36
|
+
###
|
37
|
+
referenceRange: -> @json['referenceRange']
|
38
|
+
|
39
|
+
###*
|
40
|
+
@returns {String}
|
41
|
+
###
|
42
|
+
comment: -> @json['comment']
|
43
|
+
|