@@ -214,7 +191,8 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$(document).ready(function (){
$('#execution').hide();
$('#patient-details').hide();
-
+ $('#prescriptions-div').hide();
+ $('#exams-div').hide();
// Get The Data
const insured = JSON.parse(sessionStorage.getItem('insured'));
if(insured && Array.isArray(insured)){
@@ -295,17 +273,11 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
$('#sheet-form').find('input[name="practitioner_firstname"]').val(consultation.practitioner_firstname || '')
$('#sheet-form').find('select[name="practitioner_provider_class_id"]').val(consultation.practitioner_provider_class_id)
- $("#prestations tbody").children().remove();
- $.each(consultation.performances, function (j, it) {
- $('#prestations').append('
' +
- ''+(it.act.code|| '')+' | ' +
- ''+(it.amount_formatted || '')+' | ' +
- ''+(it.moderator_ticket_formatted || '')+' | ' +
- ''+(it.insurance_amount_formatted || '')+' | ' +
- ''+(it.home_visit_fees_formatted || '')+' | ' +
- '
')
- });
-
+ if(consultation.exams.length !== 0){
+ $('#exams-div').show();
+ }else{
+ $('#exams-div').hide();
+ }
const actions2 = '
\n' +
'
\n';
@@ -321,7 +293,11 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
});
-
+ if(consultation.prescriptions.length !== 0){
+ $('#prescriptions-div').show();
+ }else{
+ $('#prescriptions-div').hide();
+ }
const actions3 = '
\n' +
'
\n';