lib/generator/precondition.js.erb in hqmf2js-1.1.0 vs lib/generator/precondition.js.erb in hqmf2js-1.2.0

- old
+ new

@@ -1,14 +1,16 @@ <%- if precondition.conjunction? -%> <%- if indent>0 -%> -<%= "\n#{' '*(indent+1)}#{conjunction_code_for(precondition)}(" -%> +<%= "\n#{' '*(indent+1)}#{conjunction_code_for(precondition)}('#{precondition.id}'," -%> <%- else -%> -<%= "#{conjunction_code_for(precondition)}(" -%> +<%= "#{conjunction_code_for(precondition)}('#{precondition.id}'," -%> <%- end -%> <%- precondition.preconditions.each_with_index do |child, index| -%> -<%= "#{' '*(indent+1)}#{js_for_precondition(child, indent+1)}" -%> +<%= "#{' '*(indent+1)}#{js_for_precondition(child, indent+1, context)}" -%> <%= "," if index < precondition.preconditions.length-1 -%> <%- end -%> <%= "\n#{' '*(indent+1)})" -%> +<%- elsif context -%> +<%= " hqmfjs.#{js_name(precondition.reference)}(patient, initialSpecificContext)" -%> <%- else -%> <%= "\n#{' '*(indent+1)}hqmfjs.#{js_name(precondition.reference)}(patient)" -%> <%- end -%> \ No newline at end of file