Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make the attending phys report pick the form by state and fix client …

…intake.

The attending phys report can sometimes be blank.  Make sure this doesn't generate a blank page.
  • Loading branch information...
commit 99a4202c8b2707f50b54e1101bca4f1faabb5c33 1 parent 3e12dbb
@schwern schwern authored
View
2  app/themes/Default/templates/global/print_head.html
@@ -1,4 +1,5 @@
[% UNLESS no_print_header %]
+<div id="print_header">
[% IF auto_print %]<script type="text/javascript">print()</script>[% END %]
[% UNLESS header_only %]
@@ -27,4 +28,5 @@
[%- END %]
[% END %]
+</div>
[%- END %]
View
17 app/themes/Default/templates/report/client/attending_physician_statement_display.html
@@ -1,4 +1,3 @@
-<div id="print_header">
[% INCLUDE global/print_head.html
name = 'Report'
a_href = "$script?client_id=$client.id;report_track=$report_track"
@@ -6,10 +5,14 @@
date = ''
instructions_only = 1
%]
-</div>
-
-[% INCLUDE report/client/attending_physician_statement_display/WA/main.html
- treater = data.treater
- client = data.client
- state = data.state
+
+[%# Pick the proper form for the given state %]
+[% INCLUDE util/include_with_inherit.html
+ template = 'report/client/attending_physician_statement_display/%s/main.html'
+ var = state
+ default = "Default"
+
+ treater = data.treater
+ client = data.client
+ state = data.state
%]
View
13 app/themes/Default/templates/report/client/client_intake_forms_display.html
@@ -17,9 +17,16 @@
no_print_header = 1
%]
-[% INCLUDE report/client/attending_physician_statement_display.html %]
-
-<div class="page_break"></div>
+[%# There is no default attending physician statement, so go through some effort
+ to avoid writing out a blank page.
+%]
+[% subtemplate = INCLUDE report/client/attending_physician_statement_display.html
+ quiet = 1
+%]
+[% IF subtemplate.match('\S') %]
+ [% subtemplate %]
+ <div class="page_break"></div>
+[% END %]
[% INCLUDE report/client/medical_release_display.html %]
Please sign in to comment.
Something went wrong with that request. Please try again.