Sha256: da8092cb39b08e534d9dcd078405eda6acf6d9d063c38462b282489de2e10ff1

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

  var value = patient.<%= criteria.property %>(<%= js_for_date_bound(criteria) if criteria.property == :age %>) || null;
<%- if criteria.property == :birthtime -%>
  var events = [value];
  <%- if criteria.temporal_references -%>
    <%- criteria.temporal_references.each do |temporal_reference| -%>
  events = <%= temporal_reference.type %>(events, hqmfjs.<%= temporal_reference.reference.id %>(patient)<%= ", #{js_for_bounds(temporal_reference.range)}" if temporal_reference.range %>);
    <%- end -%>
  <%- end -%>
  events.specificContext=hqmf.SpecificsManager.identity();
  return events;
 <%- elsif criteria.property == :expired %>
  var return_value = matchingValue(value, 'true');

    <%- if criteria.temporal_references -%>
  var events = [patient.deathdate()]; 
        <%- criteria.temporal_references.each do |temporal_reference| -%>
  return_value = <%= temporal_reference.type %>(events, hqmfjs.<%= temporal_reference.reference.id %>(patient)<%= ", #{js_for_bounds(temporal_reference.range)}" if temporal_reference.range %>);
        <%- end -%>
      <%- end -%>
return_value.specificContext=hqmf.SpecificsManager.identity();
return return_value  
<%- elsif criteria.property == :clinicalTrialParticipant -%>
  matching = matchingValue(value, 'true');
  matching.specificContext=hqmf.SpecificsManager.identity();
  return matching;
<%- else -%>
  matching = matchingValue(value, <%= js_for_bounds(criteria.value) %>);
  matching.specificContext=hqmf.SpecificsManager.identity();
  return matching;
<%- end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

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