Sha256: 303a7f18514ee668ab59756a023778df13ffecd3fc046af5f76e32073c7040df

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

<%- eventType = patient_api_method(criteria) -%>
<%- valueSetId = criteria.code_list_id -%>
<%- valueSet = criteria.inline_code_list ? js_for_code_list(criteria) : nil -%>
<%- negationValueSetId = criteria.negation_code_list_id -%>
<%- statuses = criteria.status ? "[\"#{criteria.status}\"]" : nil -%>
<%- includeEventsWithoutStatus = criteria.hard_status ? false : true -%>
<%- start = nil -%>
<%- stop = nil -%>
<%- if criteria.effective_time -%>
  <%- startExp = js_for_value(criteria.effective_time.low) -%>
  <%- start = startExp+'.asDate()' if startExp != 'null' -%>
  <%- stopExp = js_for_value(criteria.effective_time.high) -%>
  <%- stop = stopExp+'.asDate()' if stopExp != 'null' -%>
<%- end -%>
  var eventCriteria = {"type": "<%= eventType %>"<%- -%>
<%= ", \"statuses\": #{statuses}" if statuses %> <%- -%>
<%= ", \"includeEventsWithoutStatus\": #{includeEventsWithoutStatus}" if includeEventsWithoutStatus %> <%- -%>
<%= ", \"negated\": #{criteria.negation}" if criteria.negation %> <%- -%>
<%= ", \"negationValueSetId\": \"#{negationValueSetId}\"" if criteria.negation && negationValueSetId %> <%- -%>
<%= ", \"valueSetId\": \"#{valueSetId}\"" if valueSetId %> <%- -%>
<%= ", \"valueSet\": #{valueSet}" if valueSet %> <%- -%>
<%= ", \"start\": #{start}" if start %> <%- -%>
<%= ", \"stop\": #{stop}" if stop %> <%- -%>
<%= ", \"specificOccurrence\": \"#{criteria.source_data_criteria}\"" if criteria.specific_occurrence %>};
  var events = patient.getEvents(eventCriteria);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hqmf2js-1.3.0 lib/generator/patient_data.js.erb