From dd5dcb17b999be8d1efdd8fba759bbbb07d729af Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Tue, 30 May 2017 19:42:10 -0700 Subject: [PATCH] Practices gui - bootstrap light, no pure php in smarty, html escaping in smarty (#810) --- controllers/C_InsuranceCompany.class.php | 1 + library/classes/Pharmacy.class.php | 3 +- templates/document_categories/general_list.html | 24 ++--- templates/documents/general_queue.html | 54 +++++----- templates/hl7/general_parse.html | 23 +++-- templates/insurance_companies/general_edit.html | 127 ++++++++++++----------- templates/insurance_companies/general_list.html | 26 ++--- templates/insurance_numbers/general_edit.html | 91 ++++++++-------- templates/insurance_numbers/general_list.html | 59 ++++++----- templates/pharmacies/general_edit.html | 49 +++++---- templates/pharmacies/general_list.html | 62 +++++------ templates/practice_settings/general_list.html | 2 +- templates/x12_partners/general_edit.html | 132 +++++++++++++----------- templates/x12_partners/general_list.html | 55 +++++----- 14 files changed, 380 insertions(+), 328 deletions(-) rewrite templates/insurance_numbers/general_list.html (66%) rewrite templates/pharmacies/general_list.html (63%) rewrite templates/x12_partners/general_list.html (65%) diff --git a/controllers/C_InsuranceCompany.class.php b/controllers/C_InsuranceCompany.class.php index 9998bb99b..de400d4d9 100644 --- a/controllers/C_InsuranceCompany.class.php +++ b/controllers/C_InsuranceCompany.class.php @@ -14,6 +14,7 @@ class C_InsuranceCompany extends Controller { $this->assign("CURRENT_ACTION", $GLOBALS['webroot']."/controller.php?" . "practice_settings&insurance_company&"); $this->assign("STYLE", $GLOBALS['style']); $this->assign("WEB_ROOT", $GLOBALS['webroot'] ); + $this->assign("SUPPORT_ENCOUNTER_CLAIMS", $GLOBALS['support_encounter_claims'] ); $this->InsuranceCompany = new InsuranceCompany(); } diff --git a/library/classes/Pharmacy.class.php b/library/classes/Pharmacy.class.php index 5645a8782..1b746ed89 100644 --- a/library/classes/Pharmacy.class.php +++ b/library/classes/Pharmacy.class.php @@ -24,7 +24,7 @@ class Pharmacy extends ORDataObject{ var $address; var $transmit_method; var $email; - var $transmit_method_array = array("","Print", "Email" ,"Fax"); + var $transmit_method_array; //set in constructor /** * Constructor sets all Prescription attributes to their default value @@ -34,6 +34,7 @@ class Pharmacy extends ORDataObject{ $this->name = ""; $this->email = ""; $this->transmit_method = 1; + $this->transmit_method_array = array(xl("None Selected"), xl("Print"), xl("Email"), xl("Fax")); $this->_table = "pharmacies"; $phone = new PhoneNumber(); $phone->set_type(TYPE_WORK); diff --git a/templates/document_categories/general_list.html b/templates/document_categories/general_list.html index fc5ef9b93..53af789e7 100644 --- a/templates/document_categories/general_list.html +++ b/templates/document_categories/general_list.html @@ -14,13 +14,13 @@ {/literal} - + @@ -31,29 +31,29 @@ var editLabel="{xl t="Edit"}"; {/if} diff --git a/templates/documents/general_queue.html b/templates/documents/general_queue.html index 57d2eeff7..fd814c11c 100644 --- a/templates/documents/general_queue.html +++ b/templates/documents/general_queue.html @@ -1,39 +1,33 @@ -{literal} - - - -{/literal} - - -{xl t='Edit Categories'}{xl t='Update files'} -

+
+ + {xl t='Edit Categories'|escape:'html'} + + + {xl t='Update files'|escape:'html'} + +
+

-
{xl t="Document Categories"}{xl t="Document Categories"|escape:'html'}
{$tree_html} {if $add_node eq true} - {xl t="This new category will be a sub-category of "} {$parent_name}
+ {xl t="This new category will be a sub-category of "|escape:'html'} {$parent_name|escape:'html'}
{/if}
- - + + - - + + - +
{xl t="Category Name"} {xl t="Category Name"|escape:'html'} 
{xl t="Value"} {xl t="Value"|escape:'html'} 
{xl t="Access Control"} {xl t="Access Control"|escape:'html'} 
 
- - - + + +
+
- {foreach name=queue_list from=$queue_files item=file} - + - + - + @@ -41,10 +35,22 @@ function submit_documents() {foreachelse} - + {/foreach}
{$messages}
{xl t='Name'} - {xl t='Date'} - {xl t='Patient'} - {xl t='Category'} + {xl t='Name'|escape:'html'} + {xl t='Date'|escape:'html'} + {xl t='Patient'|escape:'html'} + {xl t='Category'|escape:'html'}
{$file.filename}{$file.filename}{$file.mtime}{$file.mtime|escape:'html'}    
{xl t='No Documents Found'}{xl t='No Documents Found'|escape:'html'}


+ +{literal} + + + +{/literal} \ No newline at end of file diff --git a/templates/hl7/general_parse.html b/templates/hl7/general_parse.html index 4de1df9b6..694b7b448 100644 --- a/templates/hl7/general_parse.html +++ b/templates/hl7/general_parse.html @@ -1,7 +1,5 @@ -{php}html_header_show();{/php} -
@@ -13,31 +11,38 @@ PID|||PATID1234^5^M11||RYAN^HENRY^P||19610615|M||C|1200 N ELM STREET^^GREENSBORO NK1|JOHNSON^JOAN^K|WIFE||||||NK^NEXT OF KIN PV1|1|I|2000^2053^01||||004777^FISHER^BEN^J.|||SUR||||ADM|A0|--> -{xl t='Paste HL7 Data'} +{xl t='Paste HL7 Data'|escape:'html'}

- {xl t='Clear HL7 Data'}{xl t='Parse HL7'} + {if $hl7_message_err} - {$hl7_message_err} + {$hl7_message_err|escape:'html'} {/if} {if $hl7_array} - + {foreach from=$hl7_array item=hl7item key=hl7key} - + {foreach from=$hl7item item=segment_val key=segment_name} - + {/foreach} {/foreach}
{$hl7key}
{$hl7key|escape:'html'}
 {$segment_name}: {$segment_val}
 {$segment_name|escape:'html'}: {$segment_val|escape:'html'}
{/if} - +
diff --git a/templates/insurance_companies/general_edit.html b/templates/insurance_companies/general_edit.html index fbbecc506..6f07a10f8 100644 --- a/templates/insurance_companies/general_edit.html +++ b/templates/insurance_companies/general_edit.html @@ -1,121 +1,126 @@ -{literal} - -{/literal} -
+ - + - + - + - + - + - + - + - + +{if $SUPPORT_ENCOUNTER_CLAIMS} + + + + +{/if} - + - - - + {if $insurancecompany->get_inactive() eq 1 } - + {/if} {if $insurancecompany->get_inactive() eq 0 } - + {/if} - +
{xl t='Name'}{xl t='Name'|escape:'html'} - ({xl t='Required'}) + ({xl t='Required'|escape:'html'})
{xl t='Attn'}{xl t='Attn'|escape:'html'} - +
{xl t='Address'}{xl t='Address'|escape:'html'} - +
{xl t='Address'}{xl t='Address'|escape:'html'} - +
{xl t='City, State Zip'}{xl t='City, State Zip'|escape:'html'} - , + ,
{xl t='Phone'}{xl t='Phone'|escape:'html'} - +
{xl t='CMS ID'}{xl t='CMS ID'|escape:'html'} - -{php} if ($GLOBALS['support_encounter_claims']) { {/php} -   {xl t='For Encounter Claims'}: - -{php} } {/php} +
{xl t='CMS ID For Encounter Claims'} + +
{xl t='Payer Type'}{xl t='Payer Type'|escape:'html'} {html_options name="ins_type_code" options=$insurancecompany->ins_type_code_array selected=$insurancecompany->get_ins_type_code()}
{xl t='Default X12 Partner'}{xl t='Default X12 Partner'|escape:'html'} {html_options name="x12_default_partner_id" options=$x12_partners selected=$insurancecompany->get_x12_default_partner_id()}
{xl t='Reactivate'}{xl t='Reactivate'|escape:'html'} - +
{xl t='Deactivate'}{xl t='Deactivate'|escape:'html'} - +
 
{xl t='Save'} -{xl t='Cancel'} + +
- - -
\ No newline at end of file + + + + +{literal} + +{/literal} \ No newline at end of file diff --git a/templates/insurance_companies/general_list.html b/templates/insurance_companies/general_list.html index 39119a89d..959451218 100644 --- a/templates/insurance_companies/general_list.html +++ b/templates/insurance_companies/general_list.html @@ -1,32 +1,32 @@ - {xl t='Add a Company'} + class="btn btn-default btn-add"> + {xl t='Add a Company'|escape:'html'} - - - - + + + + {foreach from=$icompanies item=insurancecompany} - - - + + + {foreachelse} - + {/foreach} -
{xl t='Name'}{xl t='City, State'}{xl t='Default X12 Partner'}{xl t='Deactivated'}{xl t='Name'|escape:'html'}{xl t='City, State'|escape:'html'}{xl t='Default X12 Partner'|escape:'html'}{xl t='Deactivated'|escape:'html'}
- - {$insurancecompany->name}  + + {$insurancecompany->name|escape:'html'} {$insurancecompany->address->city} {$insurancecompany->address->state|upper} {$insurancecompany->get_x12_default_partner_name()} {if $insurancecompany->get_inactive() eq 1}{xl t='Yes'}{/if} {$insurancecompany->address->city|escape:'html'} {$insurancecompany->address->state|upper|escape:'html'} {$insurancecompany->get_x12_default_partner_name()|escape:'html'} {if $insurancecompany->get_inactive() eq 1}{xl t='Yes'|escape:'html'}{/if} 
{xl t='No Insurance Companies Found'}{xl t='No Insurance Companies Found'|escape:'html'}
+ \ No newline at end of file diff --git a/templates/insurance_numbers/general_edit.html b/templates/insurance_numbers/general_edit.html index 62d3d301c..c8fe8e78b 100644 --- a/templates/insurance_numbers/general_edit.html +++ b/templates/insurance_numbers/general_edit.html @@ -1,119 +1,128 @@ {if $ERROR} - {$ERROR} + {$ERROR|escape:'html'} {else} -
+ - + - +
- - - - + + + + {foreach name=inums item=num_set from=$provider->get_insurance_numbers()} - - - + + + {foreachelse} - + {/foreach} {php} if ( $_GET['showform'] == 'true' ) { {/php}
- {$provider->get_name_display()} + {$provider->get_name_display()|escape:'html'}
{xl t='Company Name'}{xl t='Provider Number'}{xl t='Rendering Provider Number'}{xl t='Group Number'}{xl t='Company Name'|escape:'html'}{xl t='Provider Number'|escape:'html'}{xl t='Rendering Provider Number'|escape:'html'}{xl t='Group Number'|escape:'html'}
- {$num_set->get_insurance_company_name()}  + + {$num_set->get_insurance_company_name()|escape:'html'}  + {$num_set->get_provider_number()} {$num_set->get_rendering_provider_number()} {$num_set->get_group_number()} {$num_set->get_provider_number()|escape:'html'} {$num_set->get_rendering_provider_number()|escape:'html'} {$num_set->get_group_number()|escape:'html'} 
{xl t='No entries found, use the form below to add an entry.'}{xl t='No entries found, use the form below to add an entry.'|escape:'html'}
- {xl t='Add New'} + class="btn btn-default btn-add" onclick="top.restoreSession()"> + {xl t='Add New'|escape:'html'}

-{if $ins->get_id() eq ""}{xl t='Add Provider Number'}{else}{xl t='Update Provider Number'}{/if}
+{if $ins->get_id() eq ""}{xl t='Add Provider Number'|escape:'html'}{else}{xl t='Update Provider Number'|escape:'html'}{/if}
- + - + - + - + - + - + {php} } else { {/php} - - - - - + + + + + {php} } {/php}
{xl t='Insurance Company'}{xl t='Insurance Company'|escape:'html'} {if $ins->get_id() eq ""} {html_options name="insurance_company_id" options=$ic_array values=$ic_array selected=$ins->get_insurance_company_id()} {else} - {$ins->get_insurance_company_name()} + {$ins->get_insurance_company_name()|escape:'html'} {/if}
{xl t='Provider Number'}{xl t='Provider Number'|escape:'html'} - +
{xl t='Provider Number'} ({xl t='Type'}){xl t='Provider Number'} ({xl t='Type'|escape:'html'}) {html_options name="provider_number_type" options=$ic_type_options_array values=$ins->provider_number_type_array selected=$ins->get_provider_number_type()}
{xl t='Rendering Provider Number'}{xl t='Rendering Provider Number'|escape:'html'} - +
{xl t='Rendering Provider Number'} ({xl t='Type'}){xl t='Rendering Provider Number'|escape:'html'} ({xl t='Type'|escape:'html'}) {html_options name="rendering_provider_number_type" options=$ic_rendering_type_options_array values=$ins->rendering_provider_number_type_array selected=$ins->get_rendering_provider_number_type()}
{xl t='Group Number'}{xl t='Group Number'|escape:'html'} - +
+
- - - + + +
{/if} + {literal} -{/literal} - -
+ - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + - + - + - + - - + + - - + + - + - + - - + + + + {xl t='Cancel'|escape:'html'} + + +
{xl t='X12 Partner'}{xl t='X12 Partner'|escape:'html'}
{xl t='Partner'} {xl t='Name'}{xl t='Partner'|escape:'html'} {xl t='Name'|escape:'html'}
{xl t='ID'} {xl t='Number'} ({xl t='ETIN'}){xl t='ID'|escape:'html'} {xl t='Number'|escape:'html'} ({xl t='ETIN'|escape:'html'})
{xl t='User logon Required Indicator (ISA01~ use 00 or 03)'}{xl t='User logon Required Indicator (ISA01~ use 00 or 03)'|escape:'html'}
{xl t='User Logon (If 03 above, else leave spaces) (ISA02)'}{xl t='User Logon (If 03 above, else leave spaces) (ISA02)'|escape:'html'}
{xl t='User password required Indicator (ISA03~ use 00 or 01)'}{xl t='User password required Indicator (ISA03~ use 00 or 01)'|escape:'html'}
{xl t='User Password (ISA04~ if 01 above, else leave spaces)'}{xl t='User Password (ISA04~ if 01 above, else leave spaces)'|escape:'html'}
{xl t='Sender ID Qualifier (ISA05)'}{xl t='Sender ID Qualifier (ISA05)'|escape:'html'} {html_options name="x12_isa05" options=$partner->get_idqual_array() selected=$partner->get_x12_isa05()}
{xl t='Sender ID (ISA06)'}{xl t='Sender ID (ISA06)'|escape:'html'}
{xl t='Receiver ID Qualifier (ISA07)'}{xl t='Receiver ID Qualifier (ISA07)'|escape:'html'} {html_options name="x12_isa07" options=$partner->get_idqual_array() selected=$partner->get_x12_isa07()}
{xl t='Receiver ID (ISA08)'}{xl t='Receiver ID (ISA08)'|escape:'html'}
{xl t='Acknowledgment Requested (ISA14)'}{xl t='Acknowledgment Requested (ISA14)'|escape:'html'} {html_options name="x12_isa14" options=$partner->get_x12_isa14_array() selected=$partner->get_x12_isa14()}
{xl t='Usage Indicator (ISA15)'}{xl t='Usage Indicator (ISA15)'|escape:'html'} {html_options name="x12_isa15" options=$partner->get_x12_isa15_array() selected=$partner->get_x12_isa15()}
{xl t='Application Sender Code (GS02)'}{xl t='Application Sender Code (GS02)'|escape:'html'}
{xl t='Submitter EDI Access Number (PER06)'}{xl t='Submitter EDI Access Number (PER06)'|escape:'html'}
{xl t='Version'}{xl t='Version'|escape:'html'} {html_options name="x12_version" options=$partner->get_x12_version_array() selected=$partner->get_x12_version()}
{xl t='Processing'} {xl t='Format'}{xl t='Processing'|escape:'html'} {xl t='Format'|escape:'html'} {html_options name="processing_format" options=$partner->get_processing_format_array() selected=$partner->get_processing_format()}
{xl t='Application Receiver Code (GS03 - If blank ISA08 will be used)'}{xl t='Application Receiver Code (GS03 - If blank ISA08 will be used)'|escape:'html'}
 
+
- - + +
+ +{literal} + +{/literal} \ No newline at end of file diff --git a/templates/x12_partners/general_list.html b/templates/x12_partners/general_list.html dissimilarity index 65% index 76f142fff..05aa2d2a6 100644 --- a/templates/x12_partners/general_list.html +++ b/templates/x12_partners/general_list.html @@ -1,26 +1,29 @@ - - {xl t='Add New Partner'} - - - - - - - - - - - {foreach from=$partners item=partner} - - - - - - - {foreachelse} - - - - {/foreach} -
{xl t='Name'}{xl t='Sender ID'}{xl t='Receiver ID'}{xl t='Version'}
{$partner->get_name()}  - {$partner->get_x12_sender_id()} {$partner->get_x12_receiver_id()} {$partner->get_x12_version()} 
{xl t='No Partners Found'}
+ + {xl t='Add New Partner'|escape:'html'} + + + + + + + + + + + {foreach from=$partners item=partner} + + + + + + + {foreachelse} + + + + {/foreach} +
{xl t='Name'|escape:'html'}{xl t='Sender ID'|escape:'html'}{xl t='Receiver ID'|escape:'html'}{xl t='Version'|escape:'html'}
+ + {$partner->get_name()|escape:'html'}  + + {$partner->get_x12_sender_id()|escape:'html'} {$partner->get_x12_receiver_id()|escape:'html'} {$partner->get_x12_version()|escape:'html'} 
{xl t='No Partners Found'|escape:'html'}
-- 2.11.4.GIT