diff --git a/.htaccess b/.htaccess
index da06892..bc8a318 100755
--- a/.htaccess
+++ b/.htaccess
@@ -1,5 +1,27 @@
-# Réécrit une URL de type xxx/yyy/zzz en index.php?controleur=xxx&action=yyy&id=zzz
+# Activation du moteur de réécriture
RewriteEngine on
-# RewriteCond %{Request_URI} !^.*/flexcode_web/.*
RewriteRule ^([a-zA-Z]*)/?([a-zA-Z]*)?/?([a-zA-Z0-9]*)?/?$ index.php?controleur=$1&action=$2&id=$3 [NC,L]
+
+# Sécurité serveur
ServerSignature Off
+
+# Protection des fichiers .ini
+
+ Deny from all
+
+
+# En-têtes de sécurité HTTP
+
+ Header set X-Frame-Options "SAMEORIGIN"
+ Header set X-Content-Type-Options "nosniff"
+ Header set Strict-Transport-Security "max-age=31536000; includeSubDomains"
+
+ Header set Content-Security-Policy "default-src 'self'; \
+ script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; \
+ style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; \
+ font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; \
+ connect-src 'self' https://cdn.jsdelivr.net; \
+ img-src 'self' data: https:"
+
+ Header set Referrer-Policy "strict-origin-when-cross-origin"
+
\ No newline at end of file
diff --git a/Framework/Session.php b/Framework/Session.php
index 1e1823b..8fa4bb1 100755
--- a/Framework/Session.php
+++ b/Framework/Session.php
@@ -1,57 +1,104 @@
-ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199);
?>
-HR+cPqlGiZkKEGV/YM5a9nZLfgnIjnXIb7hh3kgCmxoTsJK1iDjWi41yfMs/Vf4nPSuS6qzkju0U
-W++2rB6K7K6wpbd6SogoYYP3Z4DF5b1OaEm/mdkQQgYzTIAanQFhqARkkLObXDhaYzNb/P+EHzEu
-CsfVdYbwTqGCPHGJNeVUYHm7Z0xUhyI+7Ry/JzJSZOmUE2KN/VSTruAQila34XsN7in8GD0HlJEf
-AqcwKH2g4NdWQ+Po0HgrUFvOKtTUx6tndVza8NwbVp23AtZDJXCrEV3h+p/gPwLn9F3nYBUe8Icf
-bUa9QFyPNJ/KV1zPEiE6Rtj6BHxF9HVp8kV+vIHg3u2As1BoWf5zDMuk/YknNgFOQVV6UkDg6+kc
-NfnUTWQ5WqJXO4ts2rUmQuUo9fP44pf+GGYH2IcUhmXgoU9GNa8Q13JQrT36lLHFIA17VO+cA5mg
-O1+ghlf6lEwb0qLfhPQ6Ne4xgiYS2W6wEv1TsfF40oeXv/2hjX53RzIR8VjUiCtNBmcotc9KiFxi
-s4OUotvBuXrVLoMrjRDGOhMOCYrMAqurWOQw/Nt8VH7YmZ5OifFPXwOoWln8G1j2/YgFf4cQ45Sq
-Od1oArNuHaEty2303HIWr2g45BrQSgZsmFxSN+EamT1QJk1s2NyNDhkSiyY/kNrOivszofYY4w6E
-ArXIM6nyQkqR7bymqfHf80ILHvXpnkA0onxV73xPr+x/62LkbOry4v7A5vbMBIiXwPVFug/q1ffZ
-HMfuEchbvJNogjPfT30L4Vve6xSDs6+grqJS4XVoV7mwoi3Co07jHLMZolDYm10NPx485mrViLfQ
-yfM2NJxW5il06vzx+tBnqo+VGESnuS5ROeC9I30RVL3htFb/POVu79mAEKbiUy8b6+JbXNyNHQkB
-MMyfzUoVx2+ppodZC+FplzpPTKG6DmsPhF4VxjgESD6NIsGEJL4voxCx1pFDQYhKYoZEnOwrBT13
-wHKAphHkJ/Tu73wJanHMDdKOTdB708ky4lcu4JIbOM2QEQZKdarBJylGE/ZHFH4BODm4hyZ1GoDs
-OEwiHtF1kGWqqPmnA7EqKNzcplQTkRBhUveRYhZ2qHMrur+z0KcT1ONkNWicXhd+sqioRQx9U2ng
-8yfras2FwVMlChixHvljuwBc+3H7SjhD719eYU8N3a4gvTO+ZvFvvSOzcExxdgLCQmIMHXvknF5C
-UHApLr73VfbheGzdPi3VkZgyiG5nCwGdsEO4i15nlYhP33YpNEtE4HtVInUWSFOcWeszmBRzePuM
-fk0oLWdBniGay7xPoiI0B1uUAR2aL2riBkq6Q89sYBiRlcS+V+5j2+2G0HwAdMHA9gf2zEtgDv+G
-T8fRl62bOVzFWGrStrrglC+1OI3WDkvpqrN5sInLXrA69UkSLk9t2O0UYmwgfSumdnLx1T4dkWxa
-iQG0vYT1677qAqpof09I5sSlqS7Ca2WMKG0zV39BfwqJi1V6b+fAgp3bYLS05AyCViAPy9gELVAP
-iitD2zZ2N0a+TJ/xfcUOP0ZcJlYhzUywlrvOmX9KqVcI3JYhVaRzFhJzi2c7zGHDZ2ijeuIELpQs
-dgFwzLXyK0R59RXYrjlbtstIxUfrgzls+sothXCki60zEb8vI1dr7e5toob0a+agk/72k0LxyJS0
-Tk7DyLVX52e06mrcDlQ2yPnZ/zeuQKSQcJF0Kn8YLDvqcopN6g4bx0A/pXyYFVlqCsnvG3HP8UIr
-a7us+KlFuaTukIUI8vcq4Oi9mnol6IV85Pz7cD6I2kBSRXbYrVerugfeDWcQ6JHgTKTNTK8ND4g9
-Cl3KrRGAcoE8RvLYCzFuhGmXicCWemso11wHwanAKcUBpaK2o9pW1bqoQ46LJ5Ul9lhagzamnwkt
-YOW7palM2sGoviXbqlGU5rzqWoYqrCc4TdHgx55V+jUipsJeW1JvQaWXmL06/CtCSLmQBUW9ayp4
-jgos/ElfHe3mKV5xEoxmxw8/edyXARS4D5XZiy0QHl6dh5Pl4clXbY1cAM6yaKu3A9bIjdk0ooq==
-HR+cPve3zQ2PrCsNPBbWWtJDHoXXWkCLH3uadSTVIxupe8i3KdTYNn6ZqfRNLDljEyhSumiqEQua
-sZqvl/CuxMS5eZcN4TMNxVdA8amo+st99aYK0/FFpy9z98Lgk/NZI80J/tD11dwji/kms1tWRVq5
-ZSZ8hnHt+MvrpQYqMAaKX3qFDzG5u6ULYMTQjIyzhR/f/nlZ50RVoiB2Pr9DD52YLf5YkqYlqV7v
-QjeP7nMepF97ycRGCCedJtM3Tpui3LGvkS1KGiW0oZDaC351NKbvDxA6suSUQe399RVnYo6itCyp
-S2ZA2FyRdWtHhxTyyaZxZcx0VNbyJ/kKbT2FEswAzBlwaThXjCsnvFYxVmRHvUGgM0NJ3YEzmfDv
-dJk6z1LyuFwMLKKsWBRTn1zsJ3tOtIC8u8e0MAmueJu09KZGelIxXxi9uAsaZTS17Rs6ABFIfILm
-MRLzMF1+kjLYkHXtmtkC07Uh8+vmG9133ufMlHPtR/8xZYArbBEmRsf5iVW0+noMq9thsVt3uzWf
-faVquPvbPGF09Jsh0LArsd4zR++tVL2C6DQUdH6DdQbgyPDnhk1WQIm5WtphNEm0XW8dyDygFjPu
-V22B/ywUg8WkwA0dTg7mGuJ0OH10VAqs3JSiOkxcOmDV/oGi5guqfANv9r1zLC4TePhrOKQd3VJd
-jfYra8MTCAAcDCUmhow59UNqb03CInIp5VQjUw1OuYO+STl9L0dpvMB0NjjbZoCpf+4IMfodZw/6
-Bm9ws09Ln+MOwmf+dXzPQzb/66pJf4q4ukt5jkbE1q95RCTw8e+QY7FGWNmUPpREnoag20qOLit5
-OAERnaD1+xVHAGFuNRDvPkkLchbBJ4Krx3+TdFUMl3fy5+Q6VpPMdZxWEIucTCxj0z2rPZCMb0wz
-uPGS+TUgDtS3hVNZFkLRHJqj6JyVKo+MPJF3OunqlIGtT8gxGtEK2YvNFqHOc20mVrqcKLMkO/4q
-YqMGVsw08bsDiqSMBezlw9/HVfGwRPVETRMZtqG7WrsHbuPd7wT1Ltucou13d0vaY3kjD6GuH9Ls
-oIkv+DZ4CCMAVW6iYyzr5CkmA6ZRkpdQMpTKtCoOho9OR/uFdkH307MuShGqHWMs7R/2aLbs6X/y
-HosJASgvtQBXpaP/tdINWqT6YjUE8or+tAHxSxRTg1vpkt816o+JmWYO/QpdJJFH1VtO3Jx6V2Pt
-N3BR3U86hLaujLa8w+USKjtkx3YH38Agf64ZXHX0UEd/QQ8f6tf1+gJXJnkRn5XEIODBVy8+7N4+
-rmne3kDu+MNGkhjee7/zswOYwZC+/O5nG9rpkmqlyTLNRzP6Jv6xQ4nT1c8FU2VvL3UyAT7VSBOj
-avBlSch3px8hnNjuvfQl/wwbh87JrC3xB68vWNpBw21WYTs5Y4b0aLit49TigHQTGzx9IQNqZcTm
-HNn9KtaSu/G6JM0nW5BFOgDRpYO//rYPRJjBE1bR3MyRMC/GHHjMeIn+YO6ceUlINrytxU48FwWz
-7BTAMXQuKMBWRNwvZsWJRUrxnEwI0kS2ftkQGzMMEJyB5Vk6+zLyj7DvlfmxQS/ig134cbDjanmk
-gw1F/QKsbp2U1iKvL3GO2/RSSGhfGIh1ldRRZv7KwcfyioeNDepmIIc16JKOAVw6ewuHyqyROTlf
-P1VBCG5YcODjCLDW+2C0reUdUKYkJSiQ9wcVZzEtXamw14+yflee9XMFUIFgv2PHhQP8DJ3HxtUg
-Vrj9AiaVxIWqYhpJbYIBkk4645KFjtRKI0z9D4gjhMPMjKpFZjgkY96ClNJTpl4tgniAtZG8XW0h
-gIUC7rIrt/DXWoZfatO/51jddZVJk7x0EyqLPJJdlHvHawgJsTClV7E/5O+YgpwD7pkiK4czu0fe
-AOqd2mSDpTvFFww1CVF0lcGqzP7CQcIAVZWKpfny1X4MuwII22ewWa9bV8iglTvgHIyiqGLatKfv
-SSYkk8ZWl+77Lq6fTB3sM4X1FW/MmzX5qORtXxTayi2PWFHR1iuPzPPiD3O3xmS9f8DzzJO=
\ No newline at end of file
+HR+cPyfDXuBpbtkrYliIeNkDz8r5mn3hrcbCmELvCPsEvYkpHf6TQ3Ujylhbvs/VtOSTWsSHirwo
+nZzkWKWH9QrynSZjqGEIERrAQy+KX72sxmb3BAOadoWFs/2zXtm0C+mGV7UsDoSNGnXpwt0YGh81
+q/KodHNODA+WMID8La3XqoL7dqn/E9v1UtvBSa1ErrLcHp8cufy+HArPCjPYySbNdgoLfZaHzHbW
+fNDlLFkyyqzhrRK6s5rovHHa5Gn2HaNpuTxVd509ZpbXNk4k5HHoW8rKsyD+PwQI0AFBtZM9Q2Fo
+XM7sLYgEoFf/6ma2n6yTg8SVkVbwOyjw7pu3gzes8e8uW/thDZ2ovd18RHoYWIcMGotKnaF0TG1S
+7QT7YYy59okfujRMTxkyoOef3uqKwq3adq8SJm/Mbi59ETwPcz7qBWDT3DF2RiBBxD0HcCEuAmN5
+n1il2EPYXMAjiu9cFoYTeavFeBFNoWubs9zgT2Ew4JlGajJpTJC/iMGasc41L0KloUuigXl07JlQ
+uFffo9FpfYuUWWbZaQ8ZFXkNged4M6xNCyrKp9fpJ3XHT+tVkiwee/jVnB11D6tMqmYPDV3s5pbP
+q15c9JhdfD8ktqyaLWnruMMbADS2fiPopkl7ugF9IPxW4FSMK1qUKOq150kKkuQ6io3Mv4B/823k
+iXFzHohw50LPFctXjbSuBUxy5Lq/7/7qcLDklyz9ukYAqKm5/PLz8XoNvSFg6/uGfqvRgnver9Wi
+ThoFblPphluebJFsotLjLjsdA6N7oc/EO0P2NkZvBoZJDF5LhaIgyr77brcrLS5qWNnwfve7fbW8
+7T4HyuIg/M7iX+S8FUusnzN1uRMf0k7RHau0c0pvd29QwQdlhu0YWC4ftzYWmq0L6dwpNKpy+8ik
+8FjP7ySN0JisLJDIA1/BhRr8IFzVjX63kDzKyvdTj/jon3KTu88NfYO5OTDoMKUXEkVeeCkWLxxf
+lUdGqdmrGw7ZGrqkcC36/+4rT5CY59j2GNi8oqjJhGO9bPSuMu8ghS87c3ZepmIm9Q/hu6aoyNnu
+5fq+TT2EwYqHwQ+rONwU+889YIcoH0pzjhkP1Ehx8z0Aw4MgzFBq0hjCQSwGOdmWZQ6d7wnxiCFR
+VSgFsR5JGG6IFabhQfueA9BaJ+LM4Fh8rMpDNp5AAeudZoDtnFA+EgoQD/rO7zzqB5LeNckNlmwI
+ZI71oqNVdobMaloJxwXIMKBpbLvXVbnDYJOnK+O+YJHDefa5WZgGYWdZU8BKE4o6fyHdrMDBj70x
+6aBmMPwzzK+HOteTf/SoLiulKLIZQaDOxj2elkrkGnoE3l5flXQcvUQoJE45XoUMNus2+zrjBzp5
+4kGbMtnelM+3d0OrjBYWY4DPH78XkFQyXEa07TXF12KkqEf+mooyCM9z2edj0fHUk9VrNuqHliTM
+FoNhzotiq6Tl3elvsSzEVUHzfDItQpW5ntgo6W3G8hWJhBXinemRGR5eviDicox+EmuEhxKzUwjC
+9BQTU9np9YQvmz3d6F3muV8YLR7KLlp9Ei0jZJ/fju+BGcFO4vgw5xe9eBJW2P+4me/DOewzI8Mr
+Cuu2p9ivoi2L2NdEuph/HMHPCESFZMmaJkl5fSI4RgutYvEo8vZMZ62CeKOT4mut63lEgGzmdL2I
+4jyD0d7mt5b9NUYywdUmUHreYSMAHPUzK9u0CnZUyiocdh0036OXQyRUkCWqE5zZ5HPMX4PDXzJZ
+hxxWFtI1e+jlZR2XUlwMil9P1KykL+E661/aRxGXdRM9mbnmnG2cMPa9frxaoMu2CqYnTxpH5Roj
+YmWjJMTVhvR2V/JB4V7gZ1jzs1oQKT01c8ZuB79nNkMVZiNjWrAlwKPIYCm7TTz+3e3to833YZI7
+dkjpKvJPzHUKARkgKmVXCFn23ACRoAuuzsadA9/rItIYgcq5mq2vidELmBtP43xYXtGND53FOhep
+rF4kQH/I9x1gB4XOYQeKSIahwl3NPFDe+vMdseJTKE0ZwGDvndcR2YB/cKeHVTtyrqV/xjrszg8h
+dGFu7rE3dDm4It6LE3jk/jN+eKm3ecu/IXjjsPxaCoBNsasAV/4k98epme9JIBqpJXSWV5o0Dngh
+7xj8h9rj3S+o/nAZhQztJH/HzkWgp5qbEDw5eVoke0no/ZW3zDUeChFISyjm2eyr7tWIFc/1y8Vd
+dnWwEidBgF9F0A0ayrLUPP+XlOa5o/8lD5KAaPOMZQLfY0brzP0dQ9PvQsi21j9VjYPQ71WB3p//
+pL7QYdoSUim01CBv/xiTixTtdr3cIJ4xegUo96WXR1XgybN8Ajwbntm7NT4VvF9e0Rg2+LLexNLU
+Kw2Ged5c7EZlFUhcQJzb8qfIPTiLOwa4UINo/IQDMX5BTGlG9DBssfIapBvIpFQClQNwDsvo+nK4
+VPSWcsjCxFPMK1dGxe1QXpbKIr1TnraYAN81lSiSCqAzmthPi48+th9V5A+SC0ylPkp07XCMIYDS
+32EtdOfJue0rMwaiT7toVjTIgghg0+3s/r8DEPnQSjAJ6FfPIdBXn6zxlJKXy4koKsf/yOiZHqYl
+Zn7jqQsy1dKHG+4P6Y22gXDXoD2jeUrSbvu==
+HR+cPyh1s9At5o6bJdfDiJXTlfQzmCb2kNduA8kuOHbnyBCNgNZ6qGsGxyl3gNKGeBwlmo2KMX11
+wpC1Q24CIZZg0qvgCXg6zUCADZj57vSKtM6qSXlXeUz4pttGLr2N1h7ogREdIkKlWuXbbRQR8Cx2
+HeOKlbtf5+apc0OT0IeBQNlYqLZQ9qz0iejokhwwEBnDfYK10adxIXit+628brUq8bravePLNO1W
+EWzOLD/jIUMpd9XvOT9s/wu8DR9cf4aOHfb7oLi9PCCW5Bpy+41BpJj/ag9ab364mKoBobw6xIkC
+zUjnubyn2yPcIO53CMd+rZ0Hisps+hLRyuQ/lGxFvgNi353rSArj/3rFrjZ3O4nt72K25Qe4VOsX
+lnTZATtGRVkXgnMjaohEegcWpA1ADF4u760bcMVa58U0vP6P2JN2Tz6Apg7Ebr6cpsOpEvfB4nOC
+1k9GuoLH52gxJuRdlWY6oolSanxfbc/D8jyKzSYr06/4dXj8nNhUWHaQ1Nmk1RcwC+rbVW4Qu+fb
+SqbLhgHXrUmvBTxHMK0mxH5JCRaSygJkkFuZ/sRwTgnF6goh/PEl7RuAh24EYSDWHBqid62wjkkd
+ZuoHBcSSDQkvDPlST0AwtI37D9A39jHXTq2MHHrnGj+d9rB/6OA47ZQzmxgiB06LzKH9u2tzvotH
+EKl2lV7YRn6QbaM+7/r7pJYuJltJ7fQVg+EENaPrJk381EXFkkbst5+k4YM8R5Pm0SfwHwNbtJIk
+dFmGC9EzL1JwnjROFmUBWdv4TLaON1fLQOeepCNmp5lvMnSrmX7MspDft/w85E8/iLlOPkKWwu3n
+VDQnPqIP7OhhzYhuE12vIv+LG3TIm48L2LQaMsYX57nNfdWp3muLBAh7B1eW9qq+pGNLTExzZyQ9
+AF3V8rEzarlQHRKzOHeLx7uIXes7BA5weJXfQF2I6QhiTJaLIOJBHsJU8/hzGUI9nnuOoNIiqf7R
+/GsjzHVD2/z/lS4Q/KEAC1eb/SiKRCB5oTRiKaMgAOwez0/THw2l+jSZ9x1LjSdildSE5tB3c9yi
+qaKSlKYndtlUgMqbZuhisWntYSO3uiJSRqGKezdc3eTKT0WwQHSaR8t17aDD2Z0CD5svVB8xmhZz
+RTlFvxqs6Gjg/iIwe0wP1uAD0snOsefnk0J8U4iBugLd0mu7PTJEqViKy5lf48s3+noCjhC1TvoF
+yRb1cYWXOIWillw1qoxE48BAXLDG92YdPWJXWZMuStre4TUh+zyRrT/Vbvgh73uqTyZxL6m1WtmZ
+xuFMdObsrG90NBQe4Mwih/GCn7PIeSDVlDs+d+Ha7mJMMda9/x6KDI+Gyz1jBH9kWnTvOMe5b+ZR
+c/EA+NYe3zYc7gsyzPsI809HVDHI5sP1xFf7Mgve6z3V2VEbsZGVdvzJX3ZIKCrKZAM605Funrh2
+AOV6PaMyLjMh+lLA8bGdns8d7oxXju0AQGPmGHzVJfLVQEsfWN4l6H/sOWNnGEUbFpOTgECtYshd
+ZdU2+i+nSXqex+nTpYuz5AhyPf5ygx57OgmBVsYCkywYHX6R1MkfTutgAouaOPmqoUXG8KlqB1He
+FZYniI/9PWJBvhTKiKIhJrpxXzntRX29pSS8D++0ml2PsgLAKKDpZReVy0Jn1jNL5n9DQABzNu9i
+ks6nYlmuwWl/aSmEMKESZboBG1lfO6Fqnsu9btBHJzNUefJnQfs18HIXp5NVclYT2GCRS4PCiuai
+SvZsEmXLyyu4pgEVcz8lbbl+X13uVj7S3B7uptGpffvlac8tYGBSaqzfpYk5DvTWTK6K1Is1/CPh
+EBtU0SBV1Jhsei7VdY6gxmdjHaQ5VUM09a/ijtbNtcYoyxJJ/qG1I8F/ITAY4K9TjK4T+RUpZcAs
+RJStZAbEcKrVCh2bdql4oNq8OSKfbjCEpJYLRIcMtDMllSg7IbPcWIOZv3CoIKB1r8HjqpbEKAAS
+knwrbMkvcKFOmZ0Z3scS2zLoySsRRh0eSyU1TGE0buM2joZqJu28QSiNUdGP+3JrXED/vhTzfGXT
+rdhNXyyfG/0B4aYd3bSNa1W7pSnu1UzFqE+g1vz6mqGM5vebjvtaMbGNH0WSQPwKlyLeDC7cYoyK
+laI339Zmbqg3xLBaEjRBEb77ibvWxivcl+wg9M4WO2HLGGwkA/q8gkyLYI6yCeEbrwiTeO+57JRn
+qqRFWjMUOxsyLm887vxIPhRdTYjKdq+KIhxQxaUu/bBDVh8nhfBhuSXt1SwFBUc85vcN6f+TU6v7
+5AGqwy0erSNDEovQ7wB4o5Lz7hCJ0G0a6Nr5xGm3g5pKWdFfcjyWs4aR+/p0Qy0zfxrF51qHYO7z
+RzKFWRwYlQ9fTIzVZrOq5ls6RqVGh+t0LVx+7T2IBrsy8488V92K5aKZpGf0CW/KSWykIeFFciTT
+wZxK7t9fxURwgt0sY1Xzq+N9Fusilo8m+W===
+HR+cPw17Pp99bbi65Fpo4GHHNTVckLIC0uv5XusuwmA1hfwcnxDN5MUGhkE9c9gDj17x6u7WPEWq
+y40CUsT0xcN2aw0awktGi9bMUrBzAvjx/evd78U51qMP8WCLsy+XwBVdfnQgG025JwASQAxjhWBr
+WN6/dJxGfWXgMlODfDKMD+6qdtoLKi6SQ3zQ03uI8XQblimvhWdZSK/JcS6xC7zuo9s20Ylohhyq
+BThiNh6mk9t5w9LQo99qpixpJL0h4h2VgjIdo670Nm87x69y5zh6C5EpDm1hRvT+IaoITokhu6MI
+ugjBKEp3Cdgn49bCFpl/IcIFxc2dCEyAh34nEo5b2v414YB/GNsZLFXs51NySVeemiXKa9qXjTGp
+xfKp2a9Efna7SHLlu+OQutiOrOuRo3MtDt+GYo9w85PrXUI+jWNZFvC76eeK2PxVq4LVPBFdp+tp
+Go1ExtLxcgHKMkMNrX9dCjbrQrAYigTPkWYc7toAJn5BDwI0MhM3PvMifPOgp/WiFHr2rOGXS5hD
+jqq3UqD5Qzc66ByJ+E38BNnYINEEiqrfHzxwK/HBzPeFMYZMFl3BhbM27fHVRp8DstoPIYUaPvww
+eaWuQwGk7zi87om/ZnFs/VDUeM3goEx32k7N7JR3xyO0Go6e0jwDaMxT4xyQwuBKtY2B9JDwAhu/
+5gX0NlNYpr+iAnqplQoyVVL3iPsbXMf8k9C1p8r7TD7WpL/NgdxmpJLJUJQJMMzwnKEfPz+k9tgu
+MKIw+GbzXEL20DoTGe0CJN53QU9Kkm0L18TV+CzExYEog9Vmzyj6TAifOb37Eq/pwZTzV9aQ+eXW
+5osxZeVx4VvdMH2zAgWKUL1wXwySB5qBHt3WJ9P5229aD6Ux4Uj2Y1DkjnTga23ZI0GORL4/emQv
+xGMjpLT4VCBHDgV5CRgunPkVBAZDBugDDGRptBuHsIGfTBYEDJCLDBCj4Nts+Xh7OEWEhbE/MKM/
+EbHcarzp2+9WnF8W+Ahhwp2U3V/Dkyx36pYCGHoKnOOpqN2OuhtQTbgHpHISCQNCpwlVcF+LU+8s
+wOeHnmLZGqhoaQ1h6U3WAOpbFxNrcNbN4mZcQXVudLfjEE+ou8UIHbvcfq1y2/jbz4gKb4tuoTHx
+/UwNBlYiWmDW48wiqtR+Z3SV5bUmvbxqybLpkscX0PoKGoGNuYPExDNlwA2y/UzmUQ2AXMcs+Gxt
+Klp1CPPm1h2pT02kQYX1fpZllzxqRPXz/7ip+jiQ3rLQnGxcQItXYi0R0kMZ2It7L/OgrgDCReaG
+Y35+f2T7rnwBTh6N2PKXx76XnubHv1zzcgMHryd6GJIH5ialVn5kYQba8Hi+LJjZA94pnvQ2um5p
+bwRHSDADjhmxAQ+B0quRi308vyKI4aK6RYm79R9TYrs3jmlMplg9LyEvcPiA6/tj5pfEsPcV/ad4
+JwdFMgcRa5KQ8VJ57zKPtmcfMY4HqK+cRDAvnQUL8QjCqFB60VixdaXWjUqtRljNvwq3uSXRy26k
+15E3ChM+fkbcVVn7Lwtfk0Y19/GhXi0W6E4nr8wEdvS17XnWD+X17USpY9uNxTRZvWozf8hS7OgL
+BA1vUQpeW87VrLLnFaOOBbboXy5Pc38PrcRbZxv1cILl5lq/Vc3iHdf2MCAi6Y3GQ1BMpQC9Kapq
+Twc5VgH24HEJH5QOdEnoLGmqDD1BFcW+DZvpfh7RWuU3SWxcsIgurI7VNnzjWAw93YutaNurBP1U
+RbTn3l2yhFEMLLClnNLQL87dkxEgpGAbvd3g2TQ88ZiAg/Y5p6oeN5KnFfkIG0Q+VUNHn+o0cZ2k
+DlHIlONvAHYs3U+FVS/XxbuNPEVZDS0+JLtDwyxPqIVFNLJvdZipeeWSw+BGpKxIjqwjdd8UavGB
+76AndaPKJp6glUqrXJze4ME9aigpaScfXorqDsuU7sDRecHbQRJP3FJDb9U+jEZrVbhq95q2B9se
+dpjgWzvpkNXbNmlKghP39rJPD1FygJCKRbzYyAd4O9GhbWSPfQ2rTAKNZ5cOTIhhfAYkHKYmshK8
+uftX9LINJfp+WTSm4VS9OFx5d0KcXJqa+oQ/vR0kCASb28eCJ4SXCMDEsA4qIQNNB1ZbinUu2Huh
+u4tcA+E1OT3Wemb5Ay2RPpYQ1nBkiLQJ/HF41PVYknU5utsgmVcMIpGJyKMjLw2PFqFS2ys9ysYI
+xiA4o2Ck4V9sDTOuRD66yqKX+NYuWNP8chwvezpveMBQftirAwKtMDfUEFpI/k+lKimtvL53PplU
+BmQp5FFIy0OW1XzTPM2DMr3940xyqebw/zIs80YPidjFlRMwvdL6oeRBxDQFv7NvmJk4kAbcQOam
+zRPyXxpZqv9DYBQXWOHKMXOk9XvXBxPWSlP4m4DkkX2uSS526c3MTbcjRGLX01QUNrpZNifdBxAf
+bZtEBr5pWiSP6aEfWmWMvj4vAGEXgvVJ0VbnEiRz6ar320gljxGaLGm=
\ No newline at end of file
diff --git a/Js/fonctions.js b/Js/fonctions.js
index e636c8d..b0f458d 100755
--- a/Js/fonctions.js
+++ b/Js/fonctions.js
@@ -19242,3 +19242,13 @@ async function detail_baremeacte_lettre_cle_college(idActesbaremepriseenchargele
}
}
+function charger_csrf_token(v_data)
+{
+ csrf_token=$("#csrf_token").val();
+ if (!v_data || v_data.trim() === "") {
+ v_data = 'csrf_token=' + csrf_token;
+ }else{
+ v_data += '&csrf_token=' + csrf_token;
+ }
+ return v_data;
+}
diff --git a/Js/fonctions_kane.js b/Js/fonctions_kane.js
deleted file mode 100755
index fa21bbc..0000000
--- a/Js/fonctions_kane.js
+++ /dev/null
@@ -1,18512 +0,0 @@
-// Gestion du menu burger - Version simplifiée
-document.addEventListener('DOMContentLoaded', function() {
- const burgerToggle = document.getElementById('burgerMenuToggle');
- const burgerDropdown = document.getElementById('burgerDropdown');
-
- if (burgerToggle && burgerDropdown) {
- // Ouvrir/fermer le menu burger
- burgerToggle.addEventListener('click', function(e) {
- e.preventDefault();
- e.stopPropagation();
- burgerDropdown.classList.toggle('show');
- });
-
- // Fermer le menu quand on clique ailleurs sur la page
- document.addEventListener('click', function(e) {
- if (!e.target.closest('.burger-menu-container')) {
- burgerDropdown.classList.remove('show');
- }
- });
-
- // Empêcher la fermeture quand on clique dans le menu dropdown
- burgerDropdown.addEventListener('click', function(e) {
- e.stopPropagation();
- });
- }
-});
-
-
-function alert_ebene(p_msg, p_msg_eng) {
- // Récupération de la langue sélectionnée
- let codeLangue = $("#codeLangue").val();
-
- // Choix du message en fonction de la langue
- let message = (codeLangue === "en_US") ? p_msg_eng : p_msg;
-
- // Utilisation de SweetAlert pour afficher le message
- Swal.fire({
- title: message,
- icon: 'info', // Icône de type information
- confirmButtonText: codeLangue === "en_US" ? 'OK' : 'D\'accord'
- });
-}
-
-
-function confirm_ebene(p_msg, p_msg_eng) {
- // Récupération de la langue sélectionnée
- let codeLangue = $("#codeLangue").val();
-
- // Choix du message en fonction de la langue
- let message = (codeLangue === "en_US") ? p_msg_eng : p_msg;
-
- // Utilisation de SweetAlert avec une promesse
- return Swal.fire({
- title: message,
- icon: 'warning',
- showCancelButton: true,
- confirmButtonText: codeLangue === "en_US" ? 'Yes' : 'Oui',
- cancelButtonText: codeLangue === "en_US" ? 'No' : 'Non'
- }).then((result) => {
- return result.isConfirmed; // Retourne true si l'utilisateur confirme, false sinon
- });
-}
-
-
-
-function prompt_ebene(p_msg, p_msg_eng, p_retour, callback) {
- let codeLangue = $("#codeLangue").val();
- let message = (codeLangue === "en_US") ? p_msg_eng : p_msg;
-
- Swal.fire({
- title: message,
- input: 'text',
- inputValue: p_retour,
- showCancelButton: true,
- confirmButtonText: 'OK',
- cancelButtonText: 'Annuler'
- }).then((result) => {
- if (result.isConfirmed) {
- callback(result.value); // Exécute la fonction callback avec la valeur saisie
- } else {
- callback(null); // Annule l'opération
- }
- });
-}
-
-
-var p_destinataires="";
-var p_message="";
-
-function adherents_police()
-{
- if ($("#idPolice_C" ).val()>"")
- {
- window.location.assign($("#racineWeb" ).val()+"Listeadherent/");
- }
-}
-
-$.prototype.enable = function () {
- $.each(this, function (index, el) {
- $(el).removeAttr('disabled');
- });
-}
-
-$.prototype.disable = function () {
- $.each(this, function (index, el) {
- $(el).attr('disabled', 'disabled');
- });
-}
-
-$.prototype.unreadable = function () {
- $.each(this, function (index, el) {
- $(el).attr('READONLY', 'READONLY');
- });
-}
-
-$.prototype.readable = function () {
- $.each(this, function (index, el) {
- $(el).removeAttr('READONLY');
- });
-}
-
-Date.estAnneeBissextile = function (annee) {
- return (((annee % 4 === 0) && (annee % 100 !== 0)) || (annee % 400 === 0));
-};
-
-Date.getDaysInMonth = function (annee, month) {
- return [31, (Date.estAnneeBissextile(annee) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
-};
-
-Date.prototype.estAnneeBissextile = function () {
- return Date.estAnneeBissextile(this.getFullYear());
-};
-
-Date.prototype.getDaysInMonth = function () {
- return Date.getDaysInMonth(this.getFullYear(), this.getMonth());
-};
-
-Date.prototype.addMonths = function (value) {
- var n = this.getDate();
- this.setDate(1);
- this.setMonth(this.getMonth() + value);
- this.setDate(Math.min(n, this.getDaysInMonth()));
- this.setDate(this.getDate()-1);
- return this;
-};
-
-$( ".datepicker" ).datepicker({
- inline: true,
- changeMonth: true,
- changeYear: true,
- yearRange: "c-60:c+20"
-
-});
-
-/*les fonctions courantes et globales */
-
-function get_age(dater)
-{
- var td2 = $("#datejourfr_C").datepicker("getDate");
- return age = td2.getFullYear()-dater.getFullYear();
-}
-
-// function controle_age(dater, codeLienParente, controle)
-function controle_age(dater, codeLienParente)
-{
- age = get_age(dater);
- $("#agepersonne").val("Âge : "+age);
-
- if (age>65)
- {
- alert("Âge "+age+" supérieur à 65 ans!");
- // controle.focus();
- return false;
- }
-
- if ( (codeLienParente=="E")&& (age>21) )
- {
- alert("Âge "+age+" => Enfant âgé de plus de 21 ans!");
- // controle.focus();
- return false;
- }
-
- if ( (codeLienParente=="O")&& (age>21) )
- {
- alert("Âge "+age+" => Enfant âgé de plus de 21 ans!");
- // controle.focus();
- return false;
- }
-
- return true;
-}
-
-/* Début JS client */
-function selectionner_client(id,no)
-{
- $("#idClient_C").val(id);
- $("#numeroClient_C").val(no);
- $("#nomClient_C").val("");
-}
-
-function selectionner_client_d(id,no)
-{
- $("#idClient_d_C").val(id);
- $("#numeroClient_d_C").val(no);
- $("#nomClient_d_C").val("");
-}
-
-function afficher_client_id()
-{
- idClient=$("#idClient_C" ).val();
-
- if (idClient>"")
- {
- ajax_context_client_afficher(idClient);
- }
-}
-
-function afficher_client_d_id()
-{
- idClient=$("#idClient_d_C" ).val();
-
- if (idClient>"")
- {
- ajax_context_client_d_afficher(idClient);
- }
-}
-
-
-/* Fin JS client */
-
-/* Début JS police */
-function selectionner_police(id,no)
-{
- $("#idPolice_C" ).val(id);
- $("#numeroPolice_C" ).val(no);
-}
-
-function selectionner_police_d(id,no)
-{
- $("#idPolice_d_C" ).val(id);
- $("#numeroPolice_d_C" ).val(no);
-}
-
-function afficher_police_id()
-{
- idPolice=$("#idPolice_C" ).val();
-
- if (idPolice>"")
- {
- ajax_context_police_afficher(idPolice);
- }
-}
-
-function afficher_police_d_id()
-{
- idPolice=$("#idPolice_d_C" ).val();
-
- if (idPolice>"")
- {
- ajax_context_police_d_afficher(idPolice);
- }
-}
-
-
-/* Fin JS client */
-
-/* Début JS adherent */
-function selectionner_adherent(id,no)
-{
- $("#idAdherent_C" ).val(id);
- $("#numeroAdherent_C" ).val(no);
-}
-
-function afficher_adherent()
-{
- if ($("#numeroAdherent_C" ).val()>"")
- {
- window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#numeroAdherent_C" ).val()+"/");
- }
-}
-
-function afficher_adherent_id()
-{
- if ($("#idAdherent_C" ).val()>"")
- {
- // window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#idAdherent_C" ).val()+"/");
- window.location.assign($("#racineWeb" ).val()+"Ficheadherent/");
- }
-}
-/* Fin JS adherent */
-
-/* Début JS bénéficiare */
-function selectionner_beneficiaire(id,no)
-{
- $("#idBeneficiaire_C").val(id);
- $("#numeroBeneficiaire_C" ).val(no);
-}
-
-function afficher_beneficiaire_id()
-{
- idBeneficiaire=$("#idBeneficiaire_C").val();
- okId=$("#okId").val();
-
- // alert("okId = "+okId);
-
- // alert("idBeneficiaire:"+idBeneficiaire+"fin");
- //return
-
- if (idBeneficiaire>"")
- {
- ajax_context_beneficiaire_afficher(idBeneficiaire, okId);
- }
-}
-
-function afficher_adherent_assure()
-{
- if ($("#idAdherent_C" ).val()<=" ")
- {
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/");
-}
-
-function afficher_assure()
-{
- if ($("#idAdherent_C" ).val()>"")
- {
- window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"+$("#idAdherent_C" ).val()+"/");
- }
-}
-
-/* Fin JS beneficiaire */
-
-
-function fermerFenetre()
-{
- v_msg="Etes-vous sur de vouloir quitter ?";
- v_msgEng="Are you sure you want to exit?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- ajax_deconnexion();
- window.open('about:blank','_parent','');
- close();
- window.close();
- }
-}
-
-
-function ChangerPass()
-{
- if ($("#ancmdp" ).val()<=' ')
- {
- alert_ebene("Veuillez saisir l\'ancien mot de passe!", "Please enter the old password!");
- $("#ancmdp").focus();
- return false;
- }
-
- if ($("#nvmdp" ).val()<=' ')
- {
- alert_ebene("Veuillez saisir un mot de passe!", "Please enter a password!");
- $("#nvmdp").focus();
- return false;
- }
-
- if ($("#nvmdp").val()=='0000' || $("#nvmdp").val()=='radiant')
- {
- alert_ebene("Veuillez changer de mot de passe!", "Please change password!");
- $("#nvmdp").focus();
- return false;
- }
-
- /*
- longueur = $("#nvmdp").val().length;
-
- if(longueur>0 && longueur<6)
- {
- alert("6 caractères minimum exigé!", "6 characters minimum required!");
- $("#nvmdp").focus();
- return false;
- }
-
- if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val())
- {
- alert("Veuillez confirmer votre mot de passe!", "Please confirm your password!");
- $("#nvmdp").focus();
- return false;
- }
- */
-}
-
-function afficher_image(fichier)
-{
- window.open(fichier);
-}
-
-
-function selectionner_bon(id,no, codeEtatBon, motifAnnulation)
-{
- $("#idBon_C").val(id);
- $("#numeroBon_C").val(no);
- $("#motifAnnulation_C").val(motifAnnulation);
- $("#codeEtatBon_C").val(codeEtatBon);
-}
-
-
-function imprimerbon()
-{
- if ($("#codeActe").val()<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#codeActe").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- var codeEtatBon = $("input[name='codeEtatBon']").val();
-
- if (codeEtatBon!="1")
- {
- return;
- }
-
- $("#frmconsultation").submit();
-}
-
-function imprimerbonVierge()
-{
- if ($("#codeActe").val()<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- $("#codeTypeBon").val('2');
- $("#frmconsultation").submit();
- $("#codeTypeBon").val('1');
-}
-
-function calculer_Tm()
-{
- $("#montantTm").val( ($("#montantacte").val() * (100-$("#tauxCouverture").val() )) / 100 );
- if ($("#codeMedecin").val()>" ")
- $("#numeroBon").focus();
- else
- $("#codeMedecin").focus();
- return true;
-}
-
-function controlefocusconsultationMd()
-{
- if ($("#codeActe").val()>" ")
- $("#numeroBon").focus();
- else
- $("#codeActe").focus();
- return true;
-}
-
-function ajaxinfosacteexamen()
-{
- if ($("#codeActe").val()<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosacte/",
- type : 'post',
- data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(),
- error: function(errorData) {
- },
- success: function(data) {
- $("#infosacte").html(data);
- },
- complete: function() {
- $("#tauxCouverture").val( $("#tauxCouverture_info").val());
- }
- });
-}
-
-function ajaxbonexamendisponible()
-{
- if ($("#codeActe").val()<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").focus();
- return;
- }
-
- $("#codeTypeBon").val('1');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxbondisponible/",
- type : 'post',
- data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#msgErreur").html(data);
- },
- complete: function() {
- imprimerbon();
- }
- });
-}
-
-function ajaxbonhospitdisponible()
-{
- if ($("#codeActe").val()<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").focus();
- return;
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxbondisponible/",
- type : 'post',
- data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#msgErreur").html(data);
- },
- complete: function() {
- imprimerbon();
- }
- });
-}
-
-function repondreDemandePec(numeroDemande, codeFamilleActe)
-{
- if(codeFamilleActe=="EE")
- {
- window.location.assign($("#racineWeb").val()+"Repondrepecexamen/"+numeroDemande+"/");
- }
- else
- {
- window.location.assign($("#racineWeb").val()+"Repondrepechospit/"+numeroDemande+"/");
- }
-}
-
-function accueil()
-{
- if($("#codeProfil_C" ).val()=="MEC")
- {
- window.location.assign($("#racineWeb").val()+"Accueilmedecin/");
- }
- else
- {
- window.location.assign($("#racineWeb").val()+"Accueil/");
- }
-}
-
-function accepterexamen(numeroDemande)
-{
- window.location.assign($("#racineWeb").val()+"Repondrepecexamen/accepterexamen/"+ numeroDemande +"/");
-}
-
-function cloturerDemandePecExam(numeroDemande)
-{
- if (confirm("Confirmez-vous la clôturte de la demande N° : "+numeroDemande+" ?"))
- {
- window.location.assign($("#racineWeb").val()+"Examenententeprealable/cloturerdemandepec/"+ numeroDemande +"/");
- }
-}
-
-function cloturerDemandePecHospit(numeroDemande)
-{
- if (confirm("Confirmez-vous la clôturte de la demande N° : "+numeroDemande+" ?"))
- {
- window.location.assign($("#racineWeb").val()+"Avishospitalisation/cloturerdemandepec/"+ numeroDemande +"/");
- }
-}
-
-function cloturerProlongationHospit(numeroDemande)
-{
- if (confirm("Confirmez-vous la clôturte de la demande N° : "+numeroDemande+" ?"))
- {
- window.location.assign($("#racineWeb").val()+"Prologerhospitalisation/cloturerdemandepec/"+ numeroDemande +"/");
- }
-}
-
-function refuserexamen(numeroDemande)
-{
- if (confirm("Confirmez-vous le refus de la demande N° : "+numeroDemande+" ?"))
- {
- var motifReel = prompt("motif du refus ?", "");
- if (motifReel<=" ")
- {
- v_msg="Vous devez saisir un motif !";
- v_msgEng="You have to enter a reason!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- $("#motifReel").val(motifReel);
- $('#frmRefus').submit();
- }
-}
-
-function accepterhospit(numeroDemande)
-{
- /*
- if( parseInt($("#dureeHospitAccordee").val())' + '' + '');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxrequetesprofil/",
- type : 'post',
- data: "codeProfil="+$("#codeProfil").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listerequete").html(data);
- }
- });
-}
-
-function controle_numerique(controle)
-{
- if(isNaN(controle.value))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- controle.value="";
- controle.focus();
- return false;
- }
- return true;
-}
-
-function ajax_context_client(idClient)
-{
- donnees = 'idClient='+idClient;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextclient/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- }
- });
-}
-
-function ajax_context_client_afficher(idClient)
-{
- donnees = 'idClient='+idClient;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextclient/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- window.location.assign($("#racineWeb" ).val()+"Ficheclient/");
- }
- });
-}
-
-function ajax_context_police(idPolice)
-{
- donnees = 'idPolice='+idPolice;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextpolice/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- }
- });
-}
-
-
-function ajax_context_police_afficher(idPolice)
-{
- donnees = 'idPolice='+idPolice;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextpolice/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- window.location.assign($("#racineWeb" ).val()+"Fichepolice/");
- }
- });
-}
-
-function ajax_deconnexion()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdeconnexion/"
- });
-}
-
-function ajax_flexcode()
-{
- // donnees = 'idPolice='+idPolice;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxflexcode/",
- type : 'post',
- // data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#content").html(data);
- },
- complete: function() {
- // window.location.assign($("#racineWeb" ).val()+"Fichepolice/");
- }
- });
-}
-
-function controle_champ_obligatoire(controle)
-{
- if (controle.value<=" ")
- {
- v_msg="Valeur exigée!";
- v_msgEng="Value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- controle.focus();
- return false;
- }
- return true;
-}
-
-function exporter_liste_assures()
-{
- //alert("exporter_liste_assures");
- //return;
-
- $('#div_liste').html('');
-
-
- var div_export = $('#div_export');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxexporterlisteassure/",
- type: 'POST',
- success: function(data)
- {
- div_export.html(data);
- },
- error : function(resultat, statut, erreur)
- {
- alert(erreur);
- },
- complete: function(data)
- {
- }
- });
-}
-
-
-function imprimer_liste_assures()
-{
- //alert("imprimer_liste_assures");
- //return;
-
- $('#div_liste').html('');
-
- var div_export = $('#div_export');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaximprimerlisteassure/",
- type: 'POST',
- success: function(data)
- {
- div_export.html(data);
- },
- error : function(resultat, statut, erreur)
- {
- alert(erreur);
- },
- complete: function(data)
- {
- }
- });
-}
-
-function imprimer_limites()
-{
- $('#div_liste').html('');
-
- var div_export = $('#div_export');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaximprimerlimite/",
- type: 'POST',
- success: function(data)
- {
- div_export.html(data);
- },
- error : function(resultat, statut, erreur)
- {
- alert(erreur);
- },
- complete: function(data)
- {
- }
- });
-}
-
-function pop_tableau_prestation()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxtableauprestation/",
- type : 'post',
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_tableau_prestation").html(data);
- },
- complete: function() {
- $("#btn_pop").click();
- }
- });
-}
-
-function selectionner_tout_limite(p_idCollegeTemp, p_choix)
-{
- donnees = 'idCollegeTemp='+p_idCollegeTemp;
- donnees += '&choix='+p_choix;
-
- // alert(donnees);
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionnertout/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- recapituler_limite_college_simple();
- pop_afficher_selection_limite(p_idCollegeTemp);
- }
- });
-}
-
-function prestation_possible()
-{
- enVigueur=$("#enVigueur_C").val();
- codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val();
- etatbeneficiaire=$("#etatbeneficiaire_C").val();
- college_couvert=$("#college_couvert_C").val();
- derogation_en_cours=$("#derogation_en_cours_C").val();
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
-
- datejour = $("#datejour_C").val();
- dateEffetPolice = $("#dateEffetPolice_C").val();
- dateEcheancePolice = $("#dateEcheancePolice_C").val();
-
- if (enVigueur!="1")
- {
- v_msg="Attention! cette personne n'est pas en vigueur";
- v_msgEng="Warning! This person is not in force";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
-
- if (codeEtatBeneficiaire!="V")
- {
- alert("Attention! "+etatbeneficiaire);
- return false;
- }
-
- if (college_couvert!="1" && derogation_en_cours<1)
- {
- v_msg="Attention! Cette personne n'a pas accès à ce centre";
- v_msgEng="Warning! This person does not have access to this center";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
-
- // var td0 = new Date(dateEffetPolice);
- var td0 = new Date(dateEntreeBeneficiaire);
- var td1 = new Date(datejour);
- var td2 = new Date(dateEcheancePolice);
-
- dt0=Math.round(Date.parse(td0)/(1000*3600*24));
- dt1=Math.round(Date.parse(td1)/(1000*3600*24));
- dt2=Math.round(Date.parse(td2)/(1000*3600*24));
-
- // if (dt1>dt2)
- if (dt1>dt2 || dt1"2000-01-01")
- {
- var tdd = new Date(dateSortieBeneficiaire);
- dtd=Math.round(Date.parse(tdd)/(1000*3600*24));
-
- if (dt1>dtd)
- {
- v_msg="Attention! cette personne n'est pas couverte à cette date!";
- v_msgEng="Warning! This person is not valid on this date!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
- }
-
-
- dateDeces_C=$("#dateDeces_C").val();
-
- if(dateDeces_C>"2000-01-01")
- {
- v_msg="Attention! personne décédée !";
- v_msgEng="Warning! Deceased !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
-
- return true;
-}
-
-function consultation()
-{
- modeSaisieFacture=$("#modeSaisieFacture").val();
-
- if(modeSaisieFacture=="1")
- {
- $("#btn_popdate_reelle").click();
- return;
- }
-
- if (prestation_possible())
- {
- modeSaisieFacture=$("#modeSaisieFacture").val();
-
- // alert("modeSaisieFacture = "+modeSaisieFacture);
-
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- window.location.assign($("#racineWeb" ).val()+"Consultation/");
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
- else
- {
- finger_id = $("#finger_id_C" ).val();
-
- if (finger_id==0)
- {
- v_msg="Veuillez procéder à l\'enrôlement avant !";
- v_msgEng="Please enroll before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- okId=$("#okId" ).val();
-
- if (okId!=1)
- {
- v_msg="Veuillez procéder à l\'identification avant !";
- v_msgEng="Please check identity before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
-
- window.location.assign($("#racineWeb" ).val()+"Consultation/");
- }
-}
-
-function gestionbon()
-{
- adminBon = $("#adminBon" ).val();
-
- if (adminBon!="1")
- {
- v_msg="Accès refusé !";
- v_msgEng="Access denied!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- window.location.assign($("#racineWeb").val()+"Receptionbons/");
-}
-
-function afficherbon()
-{
- codeTypeBon=$("#codeTypeBon").val();
- codeEtatBon=$("#codeEtatBon").val();
-
- noDepart=$("#noDepart").val();
- noFin=$("#noFin").val();
-
- if (noDepart=="")
- {
- noDepart="0";
- }
-
- if (noFin=="")
- {
- noFin="0";
- }
-
- noDepart = parseInt(noDepart);
- noFin = parseInt(noFin);
-
- if (codeTypeBon<=" ")
- {
- v_msg="Veuillez sélectionner un type de bon !";
- v_msgEng="Please select a prescription type!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeTypeBon").focus();
- return;
- }
-
- if (noFin' + '' + '');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxafficherbons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_bonpecs").html(data);
- },
- complete: function() {
- $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val());
- }
- });
-}
-
-function demander_annulation_bon()
-{
- var codeEtatBon = $("#codeEtatBon_C").val();
- var motifAnnulation = $("#motifAnnulation_C").val();
- var numeroBon = $("#numeroBon_C").val();
- var idBon = $("#idBon_C").val();
-
- if (numeroBon<=" ")
- {
- v_msg="Veuillez sélectionner une ligne!";
- v_msgEng="Please select a line!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- if (codeEtatBon=="3")
- {
- v_msg="Anullé pour motif : "+motifAnnulation;
- v_msgEng="Canceled for reason : "+motifAnnulation;
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- if (codeEtatBon=="4")
- {
- v_msg="Remplacé pour motif : "+motifAnnulation;
- v_msgEng="Replaced for reason : "+motifAnnulation;
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- if (codeEtatBon=="9")
- {
- v_msg="Demande anullation pour motif : "+motifAnnulation;
- v_msgEng="Cancellation request for reason : "+motifAnnulation;
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous la demande d\'annulation du bon No "+numeroBon+" ?";
- v_msgEng="Do you confirm the request for cancellation of the prescription No "+numeroBon+" ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- motifAnnulation = prompt("A annuler pour quel motif ?", motifAnnulation);
- if (motifAnnulation<=" ")
- {
- v_msg="Vous devez saisir un motif !";
- v_msgEng="You have to enter a reason!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- $("#motifAnnulation_C").val(motifAnnulation);
-
- donnees = 'idBon='+idBon+'&motifAnnulation='+motifAnnulation;
- donnees_sav = 'idBon='+idBon+'&typeMail=maildemandeannulationbon';
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxafficherbons/demanderAnnulationBon/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- },
- complete: function() {
- mettremailattente(donnees_sav);
-
- v_msg="Demande envoyée avec succès !";
- v_msgEng="Request sent successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- afficherbon();
- }
- });
- }
-}
-
-function enregistrer_commande_bon()
-{
- // alert("enregistrer_commande_bon");
-
- codeTypeBon=$("#codeTypeBon").val();
-
- if ($("#codeTypeBon").val()<" ")
- {
- v_msg="Veuillez sélectionner un type de bon !";
- v_msgEng="Please select a prescription type!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeTypeBon").focus();
- return;
- }
-
- quantite =$("#quantite").val();
-
- if (quantite<" ")
- {
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#quantite").focus();
- return;
- }
-
- quantite = parseInt(quantite);
-
- if(quantite<1)
- {
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#quantite").focus();
- return;
- }
-
- commentaire=$("#commentaire").val();
-
- if ($("#commentaire").val()<" ")
- {
- v_msg="Veuillez saisir une note !";
- v_msgEng="Please enter a note/comment!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#commentaire").focus();
- return;
- }
-
- v_msg="Confirmez-vous cette commande ?";
- v_msgEng="Do you confirm this order?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- var codehtml = "";
-
- if (confirm(v_msg))
- {
- prestataire = $("#prestataire_C").val();
- donnees = 'codeTypeBon='+codeTypeBon+'&quantite='+quantite;
- donnees_sav = donnees+'&prestataire='+prestataire+'&typeMail=mailcommandebon';
-
- lst_libelleBon = document.getElementById("codeTypeBon");
- libelleBon = lst_libelleBon.options[lst_libelleBon.selectedIndex].text.trim();
- typeSms = "commandebon";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcommanderbons/commanderBon/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- codehtml = data;
- preparesms(typeSms);
- },
- complete: function() {
- mettremailattente(donnees_sav);
-
- v_msg="commande envoyée avec succès !";
- v_msgEng="Order sent successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#div_page_entiere").html(codehtml);
- }
- });
- }
-}
-
-function receptionner_bon()
-{
- nbligne_info=$("#nbligne_info").val();
- nbligne_info = parseInt(nbligne_info);
-
- // alert(nbligne_info);
- // return;
-
- if (nbligne_info==0)
- {
- v_msg="Veuillez actualiser la liste avant !";
- v_msgEng="Please refresh before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- codeTypeBon=$("#codeTypeBon").val();
-
- noDepart=$("#noDepart").val();
- noFin=$("#noFin").val();
-
- if (noDepart=="")
- {
- noDepart="0";
- }
-
- if (noFin=="")
- {
- noFin="0";
- }
-
- noDepart = parseInt(noDepart);
- noFin = parseInt(noFin);
-
- if (codeTypeBon<=" ")
- {
- v_msg="Veuillez sélectionner un type de bon !";
- v_msgEng="Please select a prescription type!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeTypeBon").focus();
- return;
- }
-
- if (noFin' + '' + '');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxalistegenererbons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_bonpecs").html(data);
- },
- complete: function() {
- $("#nbligne").val("Nombre de lignes affichées : "+$("#nbligne_info").val());
- }
- });
-}
-
-
-function listerdemandebon()
-{
- codeTypeBon=$("#codeTypeBon").val();
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- if (codeTypeBon<=" ")
- {
- v_msg="Veuillez sélectionner un type de bon !";
- v_msgEng="Please select a prescription type!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeTypeBon").focus();
- return;
- }
-
- donnees = 'codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2;
-
- $("#div_bonpecs").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxalistedemandebon/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_bonpecs").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ajaxactespossibles()
-{
- codeFamilleActe=$("#codeFamilleActe").val();
- codeTypePrestation=$("#codeTypePrestation").val();
-
- donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation;
-
- // alert("ajaxactespossibles() : "+donnees);
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxactespossibles/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listeacte").html(data);
-
- $("#prixActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
- }
- });
-}
-
-function ajaxactespossibles_med()
-{
- codeFamilleActe=$("#codeFamilleActe").val();
- codeTypePrestation=$("#codeTypePrestation").val();
-
- donnees = 'codeFamilleActe='+codeFamilleActe+'&codeTypePrestation='+codeTypePrestation;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxactespossiblesmed/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listeacte").html(data);
-
- $("#prixActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
- },
- complete: function() {
- }
- });
-}
-
-function ajaxinfosacte()
-{
- if ($("#codeActe").val()<=" ")
- {
- $("#prixActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosacte/",
- type : 'post',
- data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosacte").html(data);
- },
- complete: function() {
- $("#montantacte").val( $("#montantacte_info").val());
- $("#tauxCouverture").val( $("#tauxCouverture_info").val());
- // calculer_Tm();
- }
- });
-}
-
-
-function ajaxprixacte()
-{
- codeActe = $("#codeActe").val();
-
- if (codeActe<=" ")
- {
- $("#prixActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
-
-
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- donnees = 'codeActe='+codeActe;
-
- // alert(donnees);
- // alert("ajaxprixacte() : "+donnees);
-
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxprixacte/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
- $("#infosacte").html(data);
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- // $("#observations").focus();
- $("#codeRaisonConsultation").focus();
- },
- complete: function() {
- }
- });
-}
-
-
-function ajaxbondisponible()
-{
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
-
- $("#numeroBon").val("");
-
- return;
- }
-
- codeActe = $("#codeActe").val();
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
-
- $("#numeroBon").val("");
-
- return;
- }
-
- codeRaisonConsultation = $("#codeRaisonConsultation").val();
-
- if (codeRaisonConsultation<=" ")
- {
- v_msg="Veuillez sélectionner une raison pour la consultation !";
- v_msgEng="Please select a reason for the consultation!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeRaisonConsultation").focus();
-
- $("#numeroBon").val("");
-
- return;
- }
-
- numeroBon = $("#numeroBon").val();
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxbondisponible/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ajaxinfosbonconsultation()
-{
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- codeActe = $("#codeActe").val();
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#codeActe").focus();
- return;
- }
-
- codeRaisonConsultation = $("#codeRaisonConsultation").val();
-
- if (codeRaisonConsultation<=" ")
- {
- v_msg="Veuillez sélectionner une raison pour la consultation !";
- v_msgEng="Please select a reason for the consultation!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#codeRaisonConsultation").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonconsultation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistrerconsultation()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- codeMedecin = $("#codeMedecin").val();
- medecinManquant = $("#medecinManquant").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- if (codeMedecin=="ZZZZ" && medecinManquant<=" ")
- {
- v_msg="Veuillez saisir le nom du médecin non enregistré!";
- v_msgEng="Please enter the name of the non-registered doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#medecinManquant").focus();
- return;
- }
-
- codeActe = $("#codeActe").val();
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- codeRaisonConsultation = $("#codeRaisonConsultation").val();
-
- if (codeRaisonConsultation<=" ")
- {
- v_msg="Veuillez sélectionner une raison pour la consultation !";
- v_msgEng="Please select a reason for the consultation!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeRaisonConsultation").focus();
- return;
- }
-
- /*
- codeAffection = $("#codeAffection").val();
- if (codeAffection<=" ")
- {
- alert("Veuillez sélectionner une affectiuon !");
- $("#codeActe").focus();
- return;
- }
- */
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of presciption ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- dateSurvenance = $("#dateSurvenance").val();
- observations = $("#observations").val();
- prixActe = $("#prixActe").val();
- montantTm = $("#montantTm").val();
- aRembourser = $("#aRembourser").val();
- numeroDerogation = $("#derogation_en_cours_C").val();
- numeroDerogationFinger = $("#derogation_finger_en_cours_C").val();
-
- if (numeroDerogation<1)
- {
- numeroDerogation = "0";
- }
-
- if (numeroDerogationFinger<1)
- {
- numeroDerogationFinger = "0";
- }
-
- donnees = 'codeActe='+codeActe+'&numeroBon='+numeroBon+'&codeMedecin='+codeMedecin+'&codeRaisonConsultation='+codeRaisonConsultation;
- donnees += '&dateSurvenance='+dateSurvenance+'&observations='+observations+'&prixActe='+prixActe;
- donnees += '&montantTm='+montantTm+'&aRembourser='+aRembourser+'&numeroDerogation='+numeroDerogation;
- donnees += '&numeroDerogationFinger='+numeroDerogationFinger;
- donnees += '&medecinManquant='+medecinManquant;
-
- donnees_sav = donnees;
-
- $("#btn_enreg").disable();
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerconsultation/enregistrerconsultation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data)
- {
- maj_fraisexclu_cso();
-
- typeSms="accident";
-
- if(codeRaisonConsultation=="ACIR")
- {
- preparesms(typeSms);
-
- v_msg="alerte envoyée pour accident!";
- v_msgEng="alert sent for accident!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- },
- complete: function() {
- v_msg="Consultation enregistrée avec succès";
- v_msgEng="Saved successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- feuillemaladie();
- }
- });
- }
-}
-
-
-function selectionner_feuille_maladie(no)
-{
- $("#numeroFeuilleMaladie_C" ).val(no);
-}
-
-function afficher_feuille_maladie()
-{
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val();
-
- if (numeroFeuilleMaladie>"")
- {
- ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie);
- }
-}
-
-function ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie)
-{
- donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- window.location.assign($("#racineWeb" ).val()+"Feuillemaladiecons/");
- }
- });
-}
-
-
-function chercher_ordonnance(numeroBonOrdonnance)
-{
- donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerordonnance/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- window.location.assign($("#racineWeb" ).val()+"Pharmacien/");
- }
- });
-}
-
-function chercher_ordonnance_opt(numeroBonOptique)
-{
- if(numeroBonOptique<="0")
- {
- // actualiser_opticien();
- reinitialiser_opticien();
- return;
- }
- donnees = 'numeroBonOptique='+numeroBonOptique;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerordonnanceopt/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- window.location.assign($("#racineWeb" ).val()+"Opticien/");
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function chercher_ordonnance_lab(numeroBonExamen)
-{
- donnees = 'numeroBonExamen='+numeroBonExamen;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- window.location.assign($("#racineWeb" ).val()+"Laboratoire/");
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function ctrlkeypressord(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- numeroBonOrdonnance=$("#numeroBonOrdonnance").val();
- $("#numeroBonOrdonnance").blur();
- }
-}
-
-function rechercherbonordonnance()
-{
- numeroBonOrdonnance=$("#numeroBonOrdonnance").val();
-
- if (numeroBonOrdonnance>" ")
- {
- chercher_ordonnance(numeroBonOrdonnance);
- }
-}
-
-
-function ctrlkeypressordopt(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- numeroBonOptique=$("#numeroBonOptique").val();
- $("#numeroBonOptique").blur();
- }
-}
-
-
-function ctrlkeypressordlab(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- numeroBonExamen=$("#numeroBonExamen").val();
- $("#numeroBonExamen").blur();
- }
-}
-
-function rechercherbonoptique()
-{
- numeroBonOptique=$("#numeroBonOptique").val();
-
- if (numeroBonOptique>" ")
- {
- chercher_ordonnance_opt(numeroBonOptique);
- }
-}
-
-function valider_presciption()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cette ordonnance ?";
- v_msgEng="Do you confirm this prescription ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- feuillemaladie();
- }
-}
-
-function ajaxchanger_type_bon()
-{
- $("#msgErreur").html("");
-}
-
-function ajaxprixactemed()
-{
- $("#prixActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
-
- codeActe = $("#codeActe").val();
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#quantite").focus();
-
- return;
- }
-
- donnees = 'codeActe='+codeActe+'&quantite='+quantite;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxprixactemed/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
- $("#infosacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistreractemedical()
-{
- acteExclu = $("#acteExclu").val();
-
- autorisation = "0";
-
- if(acteExclu==1)
- {
- autorisation = "2";
-
- v_msg="Acte non couvert !";
- v_msgEng="Not covered !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- donnees=""
- donnees_sav="";
-
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#nomMedecin").focus();
- return;
- }
-
- codeActe = $("#codeActe").val();
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- div_prix = $("#prixActe");
- prixActe = div_prix.val();
-
- prixTarif = $("#prixTarif").val();
-
- if(prixActe==0 || parseFloat(prixActe)>parseFloat(prixTarif))
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- quantite = parseInt(quantite);
- div_quantite.val(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
-
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please neter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cet acte ?";
- v_msgEng="Do you confirm this act ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- prixActe = $("#prixActe").val();
- valeurActe = $("#valeurActe").val();
-
- montantTm = $("#montantTm").val();
- aRembourser = $("#aRembourser").val();
-
- ententePrealable = $("#ententePrealable").val();
-
- if(ententePrealable==1)
- {
- ententePrealable = "2";
- }
-
- donnees = 'codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&quantite='+quantite+'&ententePrealable='+ententePrealable;
- donnees += '&prixActe='+prixActe+'&valeurActe='+valeurActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser;
- donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif;
-
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
-
- donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable';
- donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation';
-
- typeSms="ententeprealable";
- typeSms2="autorisation";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistreractemedical/enregistreractemedical/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- maj_fraisexclu_cso();
-
- if(ententePrealable=="2")
- {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
-
- if(autorisation=="2")
- {
- preparesms(typeSms2);
-
- v_msg="Demande autorisation envoyée !";
- v_msgEng="Request for authorization sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- },
- complete: function() {
- if(ententePrealable=="2")
- {
- mettremailattente(donnees_sav);
- }
-
- if(autorisation=="2")
- {
- mettremailattente(donnees_sav2);
- }
-
- feuillemaladie();
- }
- });
- }
-}
-
-function ajax_changer_qte_acte()
-{
- codeActe = $("#codeActe").val();
- prixActe = $("#prixActe").val();
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- div_quantite.val("");
-
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please neter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerqteacte/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
- $("#infosacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function supprimer_acte_medical(idPrestationactes, codeTypePrestation)
-{
- v_msg="Confirmez-vous la suppression de cet acte ?";
- v_msgEng="Do you confirm the removal of this act ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- donnees = 'idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- feuillemaladie_ajax();
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
- }
-}
-
-function supprimer_chambre(idChambre)
-{
- v_msg="Confirmez-vous la suppression de cette chambre ?";
- v_msgEng="Do you confirm the removal of this room ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- donnees = 'idPrestationactes='+idChambre+'&codeTypePrestation=HOSP';
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistreractemedical/supprimeracte/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- attribution_chambre();
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
- }
-}
-
-function ajaxinfosbonhospitalisation()
-{
- numeroBonHospitalisation = $("#numeroBonHospitalisation").val();
- numeroBonHospitalisation = parseInt(numeroBonHospitalisation);
- if (numeroBonHospitalisation>0)
- {
- v_msg="Déjà effectué !";
- v_msgEng="Already done !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon Hospitalisation !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonhospitalisation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistrerhospitalisation()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'numeroBon='+numeroBon+'&numeroFeuilleMaladie='+numeroFeuilleMaladie;
- donnees_sav = donnees+'&typeMail=mailhospitalisation';
-
- $("#btn_enreg").disable();
-
- typeSms="hospitalisation";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerhospitalisation/enregistrerhospitalisation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // $("#msgErreur").html(errorData);
- },
- success: function(data) {
- // preparewhatsapp(typeSms);
- preparesms(typeSms);
-
- v_msg="Avis hospitalisation envoyé !";
- v_msgEng="Hospitalization notice sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- },
- complete: function() {
- mettremailattente(donnees_sav);
-
- attribution_chambre();
- }
- });
- }
-}
-
-function ajaxprixchambre()
-{
- $("#btn_enreg").disable();
-
- $("#prixActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
-
- codeActe = $("#codeActe").val();
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un type de chambre !";
- v_msgEng="Please select a category of room !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- v_msg="Veuillez saisir la durée !";
- v_msgEng="Please enter the duration !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'codeActe='+codeActe+'&quantite='+quantite;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxprixchambre/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
- $("#infosacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function ajax_changer_duree_chambre()
-{
- $("#btn_enreg").disable();
-
- codeActe = $("#codeActe").val();
- prixActe = $("#prixActe").val();
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un type de chambre !";
- v_msgEng="Please select a category of room !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- div_quantite.val("");
-
- v_msg="Veuillez saisir la durée !";
- v_msgEng="Please enter duration !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- claculerfinchambre();
-
- donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerdureechambre/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
- $("#infosacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function claculerfinchambre()
-{
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- div_quantite.val("");
-
- v_msg="Veuillez saisir la durée !";
- v_msgEng="Please enter the duration !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
-
- var typdate = $("#debut").datepicker("getDate");
- typdate.setDate(typdate.getDate() + quantite -1);
-
- $( "#fin" ).datepicker( "setDate", typdate );
-
- // contrôle du cheveauchement des dates
- /*
- var td1 = new Date($("#dateFinHospit").val());
- var td2 = $("#debut").datepicker("getDate");
-
- alert("td1 : "+td1+" ; td2 : "+td2);
- return;
-
- dt1=Math.round(Date.parse(td1)/(1000*3600*24));
- dt2=Math.round(Date.parse(td2)/(1000*3600*24));
-
- if (dt1>dt2)
- {
- $("#btn_enreg").disable();
- $("#debut").focus();
-
- v_msg="Veuillez revoir vos dates !";
- v_msgEng="Please review your dates !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- $("#btn_enreg").enable();
- */
-}
-
-function enregistrerchambre()
-{
- acteExclu = $("#acteExclu").val();
- autorisation = "0";
-
- if(acteExclu==1)
- {
- autorisation = "2";
- v_msg="Non couvert !";
- v_msgEng="Not covered !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- codeActe = $("#codeActe").val();
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un type de chambre !";
- v_msgEng="Please select a category of room !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- div_prix = $("#prixActe");
- prixActe = div_prix.val();
-
- prixTarif = prixActe;
-
- if(prixActe==0)
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- quantite = parseInt(quantite);
- div_quantite.val(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
-
- v_msg="Veuillez saisir la durée !";
- v_msgEng="Please enter the duration !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- // contrôle du cheveauchement des dates
-
- // mis en commentaire le 31/10/2018 BONA
- /*
- var td1 = new Date($("#dateFinHospit").val());
- var td2 = $("#debut").datepicker("getDate");
-
- dt1=Math.round(Date.parse(td1)/(1000*3600*24));
- dt2=Math.round(Date.parse(td2)/(1000*3600*24));
-
- if (dt1>dt2)
- {
- $("#btn_enreg").disable();
- $("#debut").focus();
-
- v_msg="Veuillez revoir vos dates !";
- v_msgEng="Please review your dates !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- // $("#btn_enreg").enable();
- */
-
- numeroChambre = $("#numeroChambre").val();
- if (numeroChambre<=" ")
- {
- v_msg="Veuillez saisir le N° de chambre !";
- v_msgEng="Please enter room number !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroChambre").focus();
- return;
- }
-
- v_msg="Confirmez-vous cette chambre ?";
- v_msgEng="Do you confirm this room ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- prixActe = $("#prixActe").val();
- valeurActe = $("#valeurActe").val();
-
- montantTm = $("#montantTm").val();
- aRembourser = $("#aRembourser").val();
-
- debut = $("#debut").val();
- // $("#fin").enable();
- fin = $("#fin").val();
-
- donnees = 'codeActe='+codeActe+'&quantite='+quantite+'&prixActe='+prixActe+'&valeurActe='+valeurActe;
- donnees += '&montantTm='+montantTm+'&aRembourser='+aRembourser+'&debut='+debut+'&fin='+fin +'&numeroChambre='+numeroChambre;
- donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif;
-
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
-
- donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation';
-
- typeSms="autorisation";
-
- $("#btn_enreg_chambre").disable();
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerchambre/enregistrerchambre/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
-
- maj_fraisexclu_cso();
-
- if(autorisation=="2")
- {
- preparesms(typeSms);
-
- v_msg="Demande autorisation envoyée !";
- v_msgEng="Request for authorization sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- },
- complete: function() {
- if(autorisation=="2")
- {
- mettremailattente(donnees_sav);
- }
-
- v_msg="Enregistrée avec succès";
- v_msgEng="Saved successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- attribution_chambre();
- }
- });
- }
-}
-
-function actesmedicaux()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Actesmedicaux/");
-}
-
-function optique()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- prescription_optique();
-}
-
-function pharmacien()
-{
- if (prestation_possible())
- {
- /* mis en commentaire le 28/11/2017
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
- else
- {
- finger_id = $("#finger_id_C" ).val();
-
- if (finger_id==0)
- {
- v_msg="Veuillez procéder à l\'enrôlement avant !";
- v_msgEng="Please enroll before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- okId=$("#okId" ).val();
-
- if (okId!=1)
- {
- v_msg="Veuillez procéder à l\'identification avant !";
- v_msgEng="Please check identity before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
- */
-
- window.location.assign($("#racineWeb" ).val()+"Pharmacien/");
- }
-}
-
-function dossiers(okId)
-{
- codeProfil = $("#codeProfil_C" ).val();
-
- if(codeProfil=="PHA")
- {
- pharmacien();
- return;
- }
-
- if(codeProfil=="OPT")
- {
- monture = $("#monture").val();
-
-
- if(monture=="1")
- {
- window.location.assign($("#racineWeb" ).val()+"Monture/");
- return;
- }
-
- opticien();
- return;
- }
-
- if(codeProfil=="LAB")
- {
- laboratoire();
- return;
- }
-
- if(codeProfil=="SEA")
- {
- seancekine();
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
-
- /*
- else
- {
- // finger_id = $("#finger_id_C" ).val();
- finger_id = $("#okId" ).val();
-
- if (finger_id==0)
- {
- v_msg="Veuillez procéder à l\'enrôlement avant !";
- v_msgEng="Please enroll before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
- */
-
- modeSaisieFacture=$("#modeSaisieFacture").val();
-
- // alert("modeSaisieFacture : "+modeSaisieFacture);
- // return;
-
- if(modeSaisieFacture=="1")
- {
- window.location.assign($("#racineWeb" ).val()+"Dossiers/");
- return;
- }
-
-
- if (prestation_possible())
- {
- if (okId==1)
- {
- window.location.assign($("#racineWeb" ).val()+"Consultation/");
- return;
- }
- else
- {
- okId=$("#okId" ).val();
- }
-
- if (okId==1)
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextidentification/",
- type : 'post',
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- if (prestation_possible())
- {
- window.location.assign($("#racineWeb" ).val()+"Dossiers/");
- }
- }
- });
- }
- else
- {
- window.location.assign($("#racineWeb" ).val()+"Dossiers/");
- }
- }
-}
-
-function afficher_beneficiaire_id_okId()
-{
- idBeneficiaire=$("#idBeneficiaire_C").val();
- okId=$("#okId").val();
-
- if (idBeneficiaire>"")
- {
- ajax_context_beneficiaire_afficher(idBeneficiaire, okId);
- }
-}
-
-function ajax_context_beneficiaire_afficher(idBeneficiaire, okId)
-{
- donnees = 'idBeneficiaire='+idBeneficiaire+'&okId='+okId;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+idBeneficiaire);
- }
- });
-}
-
-function facturer_cso()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- // verifier depasement
- fraisExclu=$("#fraisExclu").val();
- fraisExclu = parseInt(fraisExclu);
-
- if (fraisExclu>0)
- {
- v_msg="Attention ! Dépassement de limite, souhaitez-vous continuer?";
- v_msgEng="Warning ! Overflow, Would you like to continue?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (!confirm(v_msg))
- {
- return;
- }
- }
- // Fin verification depassement
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
- else
- {
- okId=$("#okId" ).val();
-
- if (okId!=1)
- {
- v_msg="Veuillez procéder à l\'identification avant !";
- v_msgEng="Please check identity before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailfacturationfeuillemaladie';
-
- typeSms = "facturer_cso";
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturerfeuillemaladie/facturer/",
- type: 'POST',
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function()
- {
- // suspension provisoire Vivien 20/03/20118
- // mettremailattente_adh(donnees_sav);
-
- feuillemaladie();
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-
-}
-
-function facturer_feuillemaladie()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numOrd = $("#numOrd").val();
- noPrescription = $("#noPrescription").val();
-
- if (numOrd==0 && noPrescription==0)
- {
- v_msg="Attention, pas de presciption de médicaments!?";
- v_msgEng="Warning, no presciption of drugs!";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- alert(v_msg);
- prescription_medicament();
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous la facturation ?";
- v_msgEng="Do you confirm this delivery?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- /*
- codepPrestataire = $("#codePrestataire_C").val();
-
- if(codepPrestataire=="SP0019")
- {
- $("#okId" ).val("1");
- facturer_cso();
- return;
- }
- */
-
- /*
- codeutilisateur = $("#codeutilisateur").val();
- alert(codeutilisateur);
- alert(codeutilisateur.length);
- alert(codeutilisateur.substring(0, 4));
- return;
-
- if(codeutilisateur.substring(0, 4)=="kane")
- {
- $("#okId" ).val("1");
- facturer_cso();
- return;
- }
- */
-
- modeSaisieFacture=$("#modeSaisieFacture").val();
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- facturer_cso();
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_cso();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id = $("#user_id_C").val();
- finger_id = $("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- }
-}
-
-function facturer_pha()
-{
- idPrestationactes=$("#idPrestationactes").val();
- idPrestationactes = parseInt(idPrestationactes);
-
- /* mis en commentaire le 31/07/2018 => permettre la multi-facturation
- if (idPrestationactes>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- */
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- // if (idPrestationactes==0 && nbLivre<1)
- if (nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- codePrestataire = $("#codePrestataire_C").val();
-
- donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailpharmacie';
-
- typeSms = "facturer_pha";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailpharmacien/enregistrerpharmacie/",
- type: 'POST',
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- // suspension provisoire Vivien 20/03/20118
- // mettremailattente_adh(donnees_sav);
-
- window.location.assign($("#racineWeb" ).val()+"Pharmacien/");
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-}
-
-function valider_pharmacie_pha()
-{
- estRempalace=$("#estRempalace").val();
-
- if (estRempalace=="1")
- {
- v_msg="Remplacée !";
- v_msgEng="Replaced !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numeroPrescription=$("#numeroPrescription_C").val();
-
- if (numeroPrescription<="0")
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- idPrestationactes=$("#idPrestationactes").val();
- idPrestationactes = parseInt(idPrestationactes);
-
- /* mis en commentaire le 31/07/2018 => permettre la multi-facturation
- if (idPrestationactes>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- */
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- // if (idPrestationactes==0 && nbLivre<1)
- if (nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cette livraison ?";
- v_msgEng="Do you confirm this delivery?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en pharamacie
- /*
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_pha();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- */
- facturer_pha();
- }
-}
-
-function valider_optique()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- /*
- nbVerres=$("#nbVerres").val();
- nbVerres = parseInt(nbVerres);
-
- if (nbVerres<1)
- {
- v_msg="Rien à valider!";
- v_msgEng="Nothing to save!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- */
-
- v_msg="Confirmez-vous cette ordonnance ?";
- v_msgEng="Do you confirm this prescription ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/",
- type : 'post',
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- feuillemaladie();
- },
- complete: function() {
- }
- });
- }
-}
-
-function separateur_millier(montant)
-{
- montant = parseInt(montant);
- montant.toLocaleString();
- return montant.toLocaleString();
-}
-
-function ajaxinfosbonoptique()
-{
- numeroBonOptique = $("#numeroBonOptique").val();
- numeroBonOptique = parseInt(numeroBonOptique);
- if (numeroBonOptique>0)
- {
- v_msg="Déjà effectué !";
- v_msgEng="Already done !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- codeMedecin = $("#codeMedecin").val();
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonoptique/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function supprimer_optique(idOptique)
-{
- v_msg="Confirmez-vous la suppression de ce verre ?";
- v_msgEng="Do you confirm the removal of this glass?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'idOptique='+idOptique;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerverre/supprimerverre/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#medicaments").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- prescription_optique();
- }
- });
- }
-}
-
-
-function enregistreroptique()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of prescription ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin;
-
- $("#btn_enreg").disable();
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistreroptique/enregistreroptique/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- $("#msgErreur").html(errorData);
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // $("#msgErreur").html(data);
- },
- complete: function() {
- v_msg="Prescription enregistrée avec succès";
- v_msgEng="Saved successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- prescription_optique();
- }
- });
- }
-}
-
-function enregistrerverre()
-{
- codeOptique = $("#codeOptique").val();
- if (codeOptique<=" ")
- {
- v_msg="Veuillez sélectionner un verre !";
- v_msgEng="Please select a glass !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeOptique").focus();
- return;
- }
-
- v_msg="Confirmez-vous ces verres ?";
- v_msgEng="Do you confirm these glasses ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
-
- donnees = 'codeOptique='+codeOptique;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerverre/enregistrerverre/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- prescription_optique();
- },
- complete: function() {
- }
- });
- }
-}
-
-
-function valider_chambre()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cette hospitalisation ?";
- v_msgEng="Do you confirm this hospitalization ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- feuillemaladie();
- }
-}
-
-
-function valider_opticien()
-{
- numeroOptique=$("#numeroOptique_C").val();
-
- if (numeroOptique<="0")
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
-
- idPrestationactes=$("#idPrestationactes").val();
- idPrestationactes = parseInt(idPrestationactes);
-
- if (idPrestationactes>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- if (idPrestationactes==0 && nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cette livraison ?";
- v_msgEng="Do you confirm this delivery?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- // 07/01/2018 => Mis en commentaire parce pas besoin de fingerprint en magasin optique
- /*
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_opt();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- */
- facturer_opt();
- }
-}
-
-function opticien()
-{
- if (prestation_possible())
- {
- /* mis en commentaire le 28/11/2017
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
- else
- {
- finger_id = $("#finger_id_C" ).val();
-
- if (finger_id==0)
- {
- v_msg="Veuillez procéder à l\'enrôlement avant !";
- v_msgEng="Please enroll before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- okId=$("#okId" ).val();
-
- if (okId!=1)
- {
- v_msg="Veuillez procéder à l\'identification avant !";
- v_msgEng="Please check identity before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
- */
-
- window.location.assign($("#racineWeb" ).val()+"Opticien/");
- }
-}
-
-function verifiertentativeidentitification(user_id)
-{
- donnees = 'user_id='+user_id;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenvoimaildivers/verifiertentativeidentitification/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_err").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function envoyer_alert_tentative_fraude(user_id)
-{
- donnees = 'user_id='+user_id;
-
- idBeneficiaire = $("#idBeneficiaire_C").val();
- prestataire = $("#prestataire_C").val();
-
- donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=mailfraudeidentite';
-
- mettremailattente(donnees_sav);
-}
-
-
-function ajouterverre_opt_tous()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverretous/",
- type: 'POST',
- success: function(data) {
- $("#livraison").html(data);
- // alert(data);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-
-function ajouterverre_opt(idOptique)
-{
- donnees = 'idOptique='+idOptique;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverre/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-function retirerverre_opt_tous()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverretous/",
- type: 'POST',
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function retirerverre_opt(idOptique)
-{
- donnees = 'idOptique='+idOptique;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/retirerverre/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function facturer_opt()
-{
- idPrestationactes=$("#idPrestationactes").val();
- idPrestationactes = parseInt(idPrestationactes);
-
- if (idPrestationactes>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- if (idPrestationactes==0 && nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- codePrestataire = $("#codePrestataire_C").val();
-
- donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailoptique';
-
- typeSms = "facturer_opt";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/enregistreroptique/",
- type: 'POST',
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- // suspension provisoire Vivien 20/03/20118
- // mettremailattente_adh(donnees_sav);
-
- window.location.assign($("#racineWeb" ).val()+"Opticien/");
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-
-}
-
-function maj_monture_temp(idOptique, monture)
-{
- donnees = 'idOptique='+idOptique+"&monture="+monture;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/majmonture/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-function supprimer_espace_nombre(nombre)
-{
- nombre = nombre.replace(" ", "");
-
- if(isNaN(nombre))
- {
- alert(nombre+" n'est pas un nombre!");
- return '0';
- }
- nombre = parseInt(nombre);
- return nombre;
-}
-
-function demander_derogation()
-{
- /*
- if (prestation_possible())
- {
- window.location.assign($("#racineWeb" ).val()+"Demandederogation/");
- }
- */
- window.location.assign($("#racineWeb" ).val()+"Demandederogation/");
-}
-
-function enregistrerdemandederogation()
-{
- codeDerogation = $("#codeDerogation").val();
-
- lst_libelleDerogation = document.getElementById("codeDerogation");
- libelleDerogation = lst_libelleDerogation.options[lst_libelleDerogation.selectedIndex].text.trim();
-
- college_couvert=$("#college_couvert_C").val();
- if (college_couvert=="1" && codeDerogation=="01")
- {
- v_msg="Attention! Cette personne a déjà accès à ce centre";
- v_msgEng="Warning! This person all ready have access to this center";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- if (codeDerogation<=" ")
- {
- v_msg="Veuillez sélectionner une dérogation !";
- v_msgEng="Please select an exemption!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeDerogation").focus();
- return;
- }
-
- observations = $("#observations").val();
- if (observations<=" ")
- {
- v_msg="Veuillez saisir la motivation !";
- v_msgEng="Please select the motivation !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#observations").focus();
- return;
- }
-
- v_msg="Confirmez-vous cette demande de dérogation ?";
- v_msgEng="Do you confirm this request ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'codeDerogation='+codeDerogation+'&observations='+observations+'&libelleDerogation='+libelleDerogation;
-
- idBeneficiaire = $("#idBeneficiaire_C").val();
- prestataire = $("#prestataire_C").val();
-
-
- donnees_sav = donnees+'&prestataire='+prestataire+'&idBeneficiaire='+idBeneficiaire+'&typeMail=maildemandederogation';
-
- typeSms = "demandederogation";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerdemandederogation/enregistrerdemandederogation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // preparewhatsapp(typeSms);
- preparesms(typeSms);
- mettremailattente(donnees_sav);
- // liste_derogation();
- },
- complete: function() {
- // mettremailattente(donnees_sav);
-
- v_msg="Demande envoyée avec succès !";
- v_msgEng="Request sent successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- liste_derogation();
- }
- });
- }
-}
-
-function liste_derogation()
-{
- window.location.assign($("#racineWeb" ).val()+"Listederogations/");
-}
-
-function listerderogation()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_derogations").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxderogation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_derogations").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function afficher_div_wait()
-{
- // $("#div_page_complet").disable();
- // $("#div_wait").html('' + '' + '
');
-}
-
-function effacer_div_wait()
-{
- $("#div_wait").html("");
-}
-
-function consultationpha()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationpha/");
-}
-
-function consultationlab()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationlab/");
-}
-
-function consultationopt()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationopt/");
-}
-
-function consultationcso()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationcso/");
-}
-
-function consultationbenpha()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationbenpha/");
-}
-
-function consultationbenopt()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationbenopt/");
-}
-
-function consultationbencso()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationbencso/");
-}
-
-function listerdossiercons_ben()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationbencso/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function listerdossiercons()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
- donnees_sav = donnees;
-
- $("#reglement").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationcsoentete/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#reglement").html(data);
- },
- complete: function() {
- }
- });
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationcso/",
- type : 'post',
- data: donnees_sav,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#detail_reglement").html(data);
- $("#detail_reglement").css("padding-top", "0px");
- },
- complete: function() {
- }
- });
-}
-
-function afficher_feuille_maladie_cons()
-{
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val();
-
- if (numeroFeuilleMaladie>"")
- {
- ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie);
- }
-}
-
-function ajax_context_feuille_maladie_afficher_cons(numeroFeuilleMaladie)
-{
- donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- consulter_feuillemaladie();
- }
- });
-}
-
-function afficher_feuille_maladie_cons_ben()
-{
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val();
-
- if (numeroFeuilleMaladie>"")
- {
- ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie);
- }
-}
-
-function ajax_context_feuille_maladie_afficher_cons_ben(numeroFeuilleMaladie)
-{
- donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- consulter_feuillemaladie_ben();
- }
- });
-}
-
-function consulter_prescription_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Prescriptionconsben/");
-}
-
-function consulter_chambre_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Chambreconsben/");
-}
-
-function consulter_optique_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Optiqueconsben/");
-}
-
-function consulter_feuillemaladie_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Feuillemaladieconsben/");
-}
-
-function consulter_prescription()
-{
- window.location.assign($("#racineWeb" ).val()+"Prescriptioncons/");
-}
-
-function consulter_chambre()
-{
- window.location.assign($("#racineWeb" ).val()+"Chambrecons/");
-}
-
-function consulter_optique()
-{
- window.location.assign($("#racineWeb" ).val()+"Optiquecons/");
-}
-
-function consulter_feuillemaladie()
-{
- window.location.assign($("#racineWeb" ).val()+"Feuillemaladiecons/");
-}
-
-//
-
-function prescription_medicament()
-{
- window.location.assign($("#racineWeb" ).val()+"Prescription/");
-}
-
-function livraison_pharmacie()
-{
- numeroBonOrdonnance=$("#numeroBonOrdonnance_C").val();
-
- if (numeroBonOrdonnance==0)
- {
- v_msg="Aucune prescription !";
- v_msgEng="No prescription !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Pharmacie/");
-}
-
-function prescription_optique()
-{
- window.location.assign($("#racineWeb" ).val()+"Optique/");
-}
-
-function attribution_chambre()
-{
- window.location.assign($("#racineWeb" ).val()+"Chambre/");
-}
-
-function feuillemaladie()
-{
- window.location.assign($("#racineWeb" ).val()+"Feuillemaladie/");
-}
-
-function feuillemaladie_ajax()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfeuillemaladie/",
- type: 'POST',
- success: function(data) {
- $("#div_feuillemaladie").html(data);
- },
- error: function(data) {
- },
- complete: function() {
- alerter_depassement_limite_cso();
- }
- });
-}
-
-function recherche()
-{
- window.location.assign($("#racineWeb" ).val()+"Recherche/");
-}
-
-function requetes()
-{
- codeProfil = $("#codeProfil_C" ).val();
-
- if(codeProfil=="PHA")
- {
- consultationpha();
- return;
- }
-
- if(codeProfil=="OPT")
- {
- consultationopt();
- return;
- }
-
- if(codeProfil=="CSO")
- {
- consultationcso();
- return;
- }
-
- if(codeProfil=="LAB")
- {
- consultationlab();
- return;
- }
-
- if(codeProfil=="SEA")
- {
- consultationsea();
- return;
- }
-}
-
-//
-
-function lister_factures_pha_ben()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationbenpha/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function lister_factures_opt_ben()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationbenopt/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function afficher_facture_cons_pha_ben(idFacture, numeroBonOrdonnance, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfacturepha/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_pha_ben();
- }
- });
- }
-}
-
-function afficher_facture_cons_pha(idFacture, numeroBonOrdonnance, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfacturepha/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_pha();
- }
- });
- }
-}
-
-function consulter_facture_pha_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Pharmacienconsben/");
-}
-
-function consulter_facture_pha()
-{
- window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/");
-}
-
-function afficher_facture_cons_opt_ben(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique;
- donnees += '&codePrestataireLivraison='+codePrestataireLivraison;
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfactureopt/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_opt_ben();
- }
- });
- }
-}
-
-function consulter_facture_opt_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Opticienconsben/");
-}
-
-function consultations()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultations/");
-}
-
-
-function listerdossiercons_pha()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
- donnees_sav = donnees;
-
- $("#detail_reglement").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationphaentete/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#reglement").html(data);
- },
- complete: function() {
- }
- });
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationpha/",
- type : 'post',
- data: donnees_sav,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#detail_reglement").html(data);
- $("#detail_reglement").css("padding-top", "0px");
- },
- complete: function() {
- }
- });
-}
-
-function listerdossiercons_opt()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
- donnees_sav = donnees;
-
- $("#detail_reglement").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationoptentete/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#reglement").html(data);
- },
- complete: function() {
- }
- });
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationopt/",
- type : 'post',
- data: donnees_sav,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#detail_reglement").html(data);
- $("#detail_reglement").css("padding-top", "0px");
- },
- complete: function() {
- }
- });
-}
-
-function afficher_facture_cons_opt(idFacture, numeroBonOptique, numeroOptique, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonOptique='+numeroBonOptique+'&numeroOptique='+numeroOptique;
- donnees += '&codePrestataireLivraison='+codePrestataireLivraison;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfactureopt/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_opt();
- }
- });
- }
-}
-
-function consulter_facture_opt()
-{
- window.location.assign($("#racineWeb" ).val()+"Opticiencons/");
-}
-
-function liste_decompte()
-{
- window.location.assign($("#racineWeb" ).val()+"Listedecomptes/");
-}
-
-function listerdecomptes()
-{
- codeExercice = $("#codeExercice").val();
- // codeMois = $("#codeMois").val();
- codeEtatDecompte = $("#codeEtatDecompte").val();
-
- if (codeExercice<=" ")
- {
- v_msg="Veuillez sélectionner un exercice !!";
- v_msgEng="Please select an exercise !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeExercice").focus();
- return;
- }
-
- /*
- if (codeMois<=" ")
- {
- v_msg="Veuillez sélectionner un exercice !!";
- v_msgEng="Please select a month !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeMois").focus();
- return;
- }
- */
-
- // donnees = 'codeExercice='+codeExercice+'&codeMois='+codeMois+'&codeEtatDecompte='+codeEtatDecompte;
- donnees = 'codeExercice='+codeExercice+'&codeEtatDecompte='+codeEtatDecompte;
-
- $("#div_detail").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistedecomptes/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_detail").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulterdecompte(idReglement)
-{
- donnees = 'idReglement='+idReglement;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- },
- complete: function() {
- afficher_decompte();
- }
- });
-}
-
-function afficher_decompte()
-{
- // $("#detail_demande_decompte").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Decomptecons/");
-}
-
-
-function sortirdexclusionstandards()
-{
- idBeneficiaire = $("#idBeneficiaire_C").val();
- idAdherent_C = $("#idAdherent_C" ).val();
-
-
- // alert("idBeneficiaire = "+idBeneficiaire);
- if (idBeneficiaire>"0")
- {
- afficher_beneficiaire_id();
- }
- if (idAdherent_C>"0")
- {
- afficher_adherent_id();
- }
- else
- {
- recherche();
- }
-}
-
-function exclusionstandards()
-{
- window.location.assign($("#racineWeb" ).val()+"Exclusionstandards/");
-}
-
-
-function envoimaildivers(datamail)
-{
- // var url_mail = "http://testprestation.medicare.rw/Cron/Ajaxenvoimaildivers.php?"+datamail;
-
- lienMail = $("#lienMail_C").val();
- var url_mail = lienMail+"/Cron/Ajaxenvoimaildivers.php?"+datamail;
-
- $.ajax({
- url : url_mail,
- type : "GET",
- error : function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success :function(data)
- {
- // alert("mail envoyée avec succès");
- }
- });
-}
-
-function mettremailattente(datamail)
-{
- // alert("datamail : "+datamail);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmailattente/ajouter/",
- type: 'POST',
- data: datamail,
- success: function(data) {
- },
- error: function(data) {
- },
- complete: function() {
- }
- });
-}
-
-function mettremailattente_adh(datamail)
-{
- // suspension provisoire Vivien 20/03/20118
-
- return;
-
- /*
- emailAdherent = $("#emailAdherent_C").val();
-
- if(emailAdherent.length>4)
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmailattente/ajouter/",
- type: 'POST',
- data: datamail,
- success: function(data) {
- },
- error: function(data) {
- },
- complete: function() {
- }
- });
- }
- */
-}
-
-function preparesms(typeSms)
-{
- p_destinataires = "";
- p_message = "";
-
- if (typeSms=="demandederogation")
- {
- p_destinataires = $("#smsDerogation_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
- //p_message = prestataire;
- p_message = prestataire+" ";
-
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "Demande derogation pour : "+libelleDerogation;
- }
- // Fin SMS demande dérogation
-
- // ententeprealable
- if (typeSms=="ententeprealable")
- {
- p_destinataires = $("#smsAccordPrealable_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
- // p_message = prestataire;
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "Alerte : Accord prealable";
- }
- // Fin ententeprealable
-
- // hospitalisation
- if (typeSms=="hospitalisation")
- {
- p_destinataires = $("#smsMedecinConseil_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
-
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "No Bon Hospit. : "+numeroBon+" ";
- p_message += "\n";
- p_message += "Avis Hospitalisation";
- }
- // Fin ententeprealable
-
- // facturer_cso
- if (typeSms=="facturer_cso")
- {
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- numeroBonConsultation = $("#numeroBonConsultation_C").val();
-
- p_destinataires = $("#telephonePortableAdherent_C").val();
-
- p_message = $("#prestataire_C").val()+" ";
- p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message +="Bon consultation No : "+numeroBonConsultation+" ";
- p_message +="Consommation : "+cout+" FRW ";
- p_message +="TM : "+montantTm+" FRW";
- }
- // Fin facturer_cso
-
- // facturer_pha
- if (typeSms=="facturer_pha")
- {
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- numeroBonOrdonnance = $("#numeroBonOrdonnance_C").val();
-
- p_destinataires = $("#telephonePortableAdherent_C").val();
-
- p_message = $("#prestataire_C").val()+" ";
- p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message +="Ordonnance No : "+numeroBonOrdonnance+" ";
- p_message +="Consommation : "+cout+" FRW ";
- p_message +="TM : "+montantTm+" FRW";
- }
- // Fin facturer_pha
-
-
- // facturer_lab
- if (typeSms=="facturer_lab")
- {
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- numeroBonExamen = $("#numeroBonExamen_C").val();
-
- p_destinataires = $("#telephonePortableAdherent_C").val();
-
- p_message = $("#prestataire_C").val()+" ";
- p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message +="Ordonnance No : "+numeroBonExamen+" ";
- p_message +="Consommation : "+cout+" FRW ";
- p_message +="TM : "+montantTm+" FRW";
- }
- // Fin facturer_pha
-
- // facturer_opt
- if (typeSms=="facturer_opt")
- {
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- numeroBonOptique = $("#numeroBonOptique_C").val();
-
- p_destinataires = $("#telephonePortableAdherent_C").val();
-
- p_message = $("#prestataire_C").val()+" ";
- p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message +="Ordonnance No : "+numeroBonOptique+" ";
- p_message +="Consommation : "+cout+" FRW ";
- p_message +="TM : "+montantTm+" FRW";
- }
- // Fin facturer_opt
-
- // autorisation
- if (typeSms=="autorisation")
- {
- p_destinataires = $("#smsAccordPrealable_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
- // p_message = prestataire;
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "Alerte : Demande Autorisation Acte Exclu";
- }
- // Fin autorisation
-
- // facturer_sea
- if (typeSms=="facturer_sea")
- {
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- numeroBonKine = $("#numeroBonKine_C").val();
-
- p_destinataires = $("#telephonePortableAdherent_C").val();
-
- p_message = $("#prestataire_C").val()+" ";
- p_message +="Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message +="Ordonnance No : "+numeroBonKine+" ";
- p_message +="Consommation : "+cout+" FRW ";
- p_message +="TM : "+montantTm+" FRW";
- }
-
- // 07/01/2018
-
- // commandebon
- if (typeSms=="commandebon")
- {
- p_destinataires = $("#smsGestionBon_C").val();
-
- prestataire = $("#prestataire_C").val();
-
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Commande de bons de PEC " ;
- p_message += "\n";
- p_message += "Quantite : "+quantite+" ";
- p_message += "\n";
- p_message += "Type : "+libelleBon+".";
- }
- // Fin commandebon
-
- // ententeprealablepha
- if (typeSms=="ententeprealablepha")
- {
- p_destinataires = $("#smsAccordPrealable_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
- // p_message = prestataire;
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "Alerte : Accord prealable pharamacie";
- }
- // Fin ententeprealable
-
- if (typeSms=="accident")
- {
- p_destinataires = $("#smsAccordPrealable_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
- // p_message = prestataire;
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "Alerte : Accident de la circulation";
- }
- // Fin accident
-
- // ententeprealableopt
- if (typeSms=="ententeprealableopt")
- {
- p_destinataires = $("#smsAccordPrealable_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
- // p_message = prestataire;
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "Alerte : Accord prealable verres";
- }
- // Fin ententeprealable
-
- // ententeprealablemont
- if (typeSms=="ententeprealablemont")
- {
- p_destinataires = $("#smsAccordPrealable_C").val();
-
- patient = $("#beneficiaire_C").val();
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
- prestataire = $("#prestataire_C").val();
-
- // p_message = prestataire;
- p_message = prestataire+" ";
- p_message += "\n";
- p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
- p_message += "\n";
- p_message += "Alerte : Accord prealable monture";
- }
- // Fin ententeprealablemont
-
- // alert("p_destinataires : "+p_destinataires);
- // alert("p_message : "+p_message);
-
- envoyersms(p_destinataires, p_message); // KANEZA
- // envoyersms_hooza(p_destinataires, p_message); // HOOZA
-}
-
-// envoyersms_kaneza
-function envoyersms(p_destinataires, p_message)
-{
- // alert("envoyersms_kaneza");
-
- envoyer_messagerie(p_message, "0");
-
- // p_destinataires = "250780440758";
-
- v_msg="Envoi SMS... !";
- v_msgEng="Sending SMS... !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- // alert("p_destinataires "+p_destinataires);
-
- if(p_destinataires.length>4)
- {
- var addr = p_destinataires.split(",");
-
- // alert("addr "+addr);
- // console.log(addr);
- // return;
-
- addr.forEach(function(element)
- {
- p_dest = element;
-
- donnees = "destinataires="+p_dest+"&message="+p_message;
-
- // alert(donnees);
- // console.log(donnees);
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenvoisms/envoyersms/",
- type: 'POST',
- crossDomain: true,
- xhrFields: {
- withCredentials: true
- },
- data: donnees
- });
- });
- }
-}
-
-// envoyersms_hooza
-function envoyersms_hooza(p_destinataires, p_message)
-{
- alert("envoyersms_hooza");
-
- envoyer_messagerie(p_message, "0");
-
- v_msg="Envoi SMS... !";
- v_msgEng="Sending SMS... !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- // alert("p_destinataires "+p_destinataires);
-
- if(p_destinataires.length>4)
- {
- donnees = "destinataires="+p_destinataires+"&message="+p_message;
-
- // alert(donnees);
-
- /*
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenvoismshooza/envoyersms/",
- type: 'POST',
- crossDomain: true,
- xhrFields: {
- withCredentials: true
- },
- data: donnees
- });
- */
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenvoismshooza/envoyersms/",
- type: 'POST',
- crossDomain: true,
- xhrFields: {
- withCredentials: true
- },
- data: donnees,
- success: function(data) {
- alert("success "+data);
- console.log(data);
- },
- error: function(data2) {
- alert("erreur : "+data2);
- console.log(data2);
- },
- complete: function() {
- }
- });
-
- }
-}
-
-function liste_ententeprealable()
-{
- window.location.assign($("#racineWeb" ).val()+"Listeententeprealables/");
-}
-
-function liste_exclusions()
-{
- window.location.assign($("#racineWeb" ).val()+"Listeexclusions/");
-}
-
-function alerter_depassement_limite()
-{
- fraisExcluLivre=$("#fraisExcluLivre").val();
- fraisExcluLivre = parseInt(fraisExcluLivre);
-
- if (fraisExcluLivre>0)
- {
- v_msg="Attention ! Dépassement de limite";
- v_msgEng="Warning ! Overflow";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-}
-
-function alerter_depassement_limite_cso()
-{
- fraisExclu=$("#fraisExclu").val();
- fraisExclu = parseInt(fraisExclu);
-
- if (fraisExclu>0)
- {
- v_msg="Attention ! Dépassement de limite";
- v_msgEng="Warning ! Overflow";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-}
-
-function maj_fraisexclu_cso()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdepassementlimitefeuillemaladie/",
- error: function(errorData) {
- },
- success: function(data) {
- $("#div_fraisExclu").html(data);
- },
- complete: function() {
- alerter_depassement_limite_cso();
- }
- });
-}
-
-function consommables()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- ajoutConsommable = $("#ajoutConsommable").val();
-
- if (ajoutConsommable!="1")
- {
- v_msg="Déjà inclu dans les actes ! Souhaitez-vous continuer ?";
- v_msgEng="Already included in the acts ! Would you like to continue ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- window.location.assign($("#racineWeb" ).val()+"Consommables/");
- return;
- }
- else
- {
- return;
- }
- }
- window.location.assign($("#racineWeb" ).val()+"Consommables/");
-}
-
-
-function afficher_recherche_consommable()
-{
- nomConsommable = $("#nomConsommable").val();
-
- if (nomConsommable > " ")
- {
- donnees = "nomConsommable="+nomConsommable;
-
- $("#div_listeconsommable").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteconsommables/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_listeconsommable").html(data);
- }
- });
- }
-}
-
-function ajouter_consommable(idConsommable, libelleConsommable)
-{
- if (libelleConsommable<=" ")
- {
- v_msg="Veuillez sélectionner un consommable !";
- v_msgEng="Please select a consumable !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- v_msg="Ajouter : "+libelleConsommable+" ?";
- v_msgEng="Add : "+libelleConsommable+" ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'idConsommable='+idConsommable;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteconsommables/ajouterconsommable/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- maj_fraisexclu_cso();
- },
- complete: function() {
- // afficher_consommable();
- feuillemaladie();
- }
- });
- }
-}
-
-function ajax_maj_qte_consommable(idConsommable, quantite, controle)
-{
- quantite=quantite.replace(",",".");
- controle.value=quantite;
-
- if(controle_numerique(controle))
- {
- if(quantite==0)
- {
- controle.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idConsommable='+idConsommable+"&quantite="+quantite;
-
- // alert("ajax_maj_qte_consommable : "+donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteconsommables/majquantite/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $('#div_test_gabarit').html(data);
- },
- error: function(data) {
- },
- complete: function() {
- afficher_consommable();
- }
- });
- }
-}
-
-function ctrlkeypressconsommable(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_recherche_consommable();
- }
-}
-
-function afficher_consommable()
-{
- $("#div_listeconsommable").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxafficherconsommables/",
- error: function(errorData) {
- },
- success: function(data) {
- $("#div_listeconsommable").html(data);
- $("#libelleconsommable").focus();
- }
- });
-}
-
-function changer_type_bon()
-{
- $("#nbligne_info").val("0");
-}
-
-function afficher_pop_recherche_medecin()
-{
-
- noOrdreMedecin = $("#noOrdreMedecin").val();
- nomsearch = $("#nomsearch").val();
-
- if(noOrdreMedecin+nomsearch<=" ")
- return;
-
- donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch;
-
- $("#div_listemedecins").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistemedecins/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_listemedecins").html(data);
- }
- });
-}
-
-
-function afficher_pop_recherche_actes_cons()
-{
- libelleActeSearch = $("#libelleActeSearch").val();
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- donnees = "valid=1&libelleActeSearch="+libelleActeSearch;
-
- $("#div_liste_actes_cons").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteactescons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_liste_actes_cons").html(data);
- }
- });
-}
-
-
-function afficher_pop_recherche_actes_possibles()
-{
- libelleActeSearch = $("#libelleActeSearch").val();
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- donnees = "valid=1&libelleActeSearch="+libelleActeSearch;
-
- $("#div_liste_actes_possibles").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteactespossibles/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_liste_actes_possibles").html(data);
- }
- });
-}
-
-
-function ctrlkeypress_medecin(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_medecin();
- }
-}
-
-
-function ctrlkeypress_actes_cons(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_actes_cons();
- }
-}
-
-
-function ctrlkeypress_actes_possibles(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_actes_possibles();
- }
-}
-
-
-function selectionner_medecin(codeMedecin, nomMedecin, noOrdreMedecin)
-{
- if(noOrdreMedecin+codeMedecin<=" ")
- return;
-
-v_msg="Confirmez-vous ce Médecin : "+nomMedecin+" ?";
- v_msgEng="Do you confirm this Doctor : "+nomMedecin+" ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- $("#codeMedecin").val(codeMedecin);
- $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )");
-
- $("#close_pop").click();
- }
-}
-
-function maj_prix_actemedical()
-{
- prixTarif = $("#prixTarif").val();
- prixNew = $("#prixNew").val();
-
- if(prixNew==0 || parseFloat(prixNew)>parseFloat(prixTarif))
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#prixNew").focus();
-
- return;
- }
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#quantite").focus();
-
- return;
- }
-
- ententePrealable = $("#ententePrealable").val();
- acteExclu = $("#acteExclu").val();
- acteChirurgie = $("#acteChirurgie").val();
-
- donnees = 'prixNew='+prixNew+'&quantite='+quantite+'&prixTarif='+prixTarif;
- donnees += '&ententePrealable='+ententePrealable+'&acteExclu='+acteExclu+'&acteChirurgie='+acteChirurgie;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmajprixactemed/",
- type : 'post',
- data : donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
- $("#infosacte").html(data);
- },
- complete: function() {
- $("#btn_close_pop_tarif").click();
- }
- });
-}
-
-function afficher_pop_tarif()
-{
- prixActe = $("#prixActe").val();
- $("#prixNew").val(prixActe);
- $("#btn_pop_tarif").click();
-}
-
-function demanderaccordacteexclu()
-{
- v_msg="Acte non couvert !";
- v_msgEng="Not covered !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
-
-/*
- acteExclu = $("#acteExclu").val();
-
- autorisation = "2";
-
- donnees=""
- donnees_sav="";
-
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#nomMedecin").focus();
- return;
- }
-
- codeActe = $("#codeActe").val();
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- div_prix = $("#prixActe");
- prixActe = div_prix.val();
-
- prixTarif = $("#prixTarif").val();
-
- if(prixActe==0 || parseFloat(prixActe)>parseFloat(prixTarif))
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- quantite = parseInt(quantite);
- div_quantite.val(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
-
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please neter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Attention! Acte exclu. Demander un accord ?";
- v_msgEng="Warning! Non covered Act. Request Agreement ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- prixActe = $("#prixActe").val();
- valeurActe = $("#valeurActe").val();
-
- montantTm = $("#montantTm").val();
- aRembourser = $("#aRembourser").val();
-
- ententePrealable = "0";
-
- donnees = 'codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&quantite='+quantite+'&ententePrealable='+ententePrealable;
- donnees += '&prixActe='+prixActe+'&valeurActe='+valeurActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser;
- donnees += '&autorisation='+autorisation+'&prixTarif='+prixTarif;
-
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
-
- donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation';
-
- typeSms="autorisation";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistreractemedical/enregistreractemedical/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- maj_fraisexclu_cso();
-
- preparesms(typeSms);
-
- v_msg="Demande autorisation envoyée !";
- v_msgEng="Request for authorization sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- },
- complete: function() {
- mettremailattente(donnees_sav);
-
- feuillemaladie();
- }
- });
- }
-*/
-}
-
-function afficher_pop_recherche_actes_cons()
-{
- libelleActeSearch = $("#libelleActeSearch").val();
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- donnees = "valid=1&libelleActeSearch="+libelleActeSearch;
-
- $("#div_liste_actes_cons").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteactescons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_liste_actes_cons").html(data);
- }
- });
-}
-
-function selectionner_acte_possibles(codeFamilleActe, codeActe, familleActe, libelleActe)
-{
- if(libelleActe<=" ")
- return;
-
- $("#codeFamilleActe").val(codeFamilleActe);
- // ajaxactespossibles();
- ajaxactespossibles_med();
-
- v_msg="Confirmez-vous cet acte : "+libelleActe+" ?";
- v_msgEng="Do you confirm this act : "+libelleActe+" ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- $("#codeActe").val(codeActe);
- ajaxprixactemed();
-
- $("#libelleActe").val(libelleActe);
- $("#close_pop_acte").click();
- }
-}
-
-function ctrlkeypress_pha(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_medicament_pha();
- }
-}
-
-function afficher_pop_recherche_medicament_pha()
-{
- nomsearch = $("#nomsearch").val();
-
- if (nomsearch > " ")
- {
- donnees = "valid=1&nomsearch="+nomsearch;
-
- $("#div_listemedicament").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_listemedicament").html(data);
- }
- });
- }
-}
-
-
-function prescrire_medicament_pha()
-{
-// Ajout à la prescription
- codePrestatairePrescription = $("#codePrestatairePrescription").val();
- codeMedicament = $("#codeMedicament_pop").val();
- libelleMedicament = $("#libelleMedicament_pop").val();
-
- if (codeMedicament<=" ")
- {
- v_msg="Veuillez sélectionner un médicament !";
- v_msgEng="Please select a medicine/drug!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'codeMedicament='+codeMedicament;
- donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
-
- // alert(donnees);
- // return;
-
- v_msg="Prescrire : "+libelleMedicament+" ?";
- v_msgEng="Prescribe : "+libelleMedicament+" ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailpharmacien/ajoutermedicamentprescription/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#btn_close_pop_medicament").click();
- $("#livraison").html(data);
- raffraichier_detail_prescription();
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
- }
-// Fin Ajout à l aprescription
-}
-
-function raffraichier_detail_prescription()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailordonnance/",
- type : 'post',
- // data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#ordonnance").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function actualiser_pharmacien()
-{
- /* modif du 15/11/2018
- // window.location.assign($("#racineWeb" ).val()+"Pharmacien/");
- actualiser_saisie_pharmacien();
- */
-
- window.location.assign($("#racineWeb" ).val()+"Pharmacien/");
-}
-
-function ajax_maj_qte_medicament_pha(idMedicament, quantite, controle)
-{
- quantite=quantite.replace(",",".");
- controle.value=quantite;
-
- if(controle_numerique(controle))
- {
- if(quantite==0)
- {
- controle.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idMedicament='+idMedicament+"&quantite="+quantite;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majquantitepha/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $("#medicaments").html(data);
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- controle.focus();
- }
- });
- }
-}
-
-function prescription_examen()
-{
- window.location.assign($("#racineWeb" ).val()+"Prescriptionexamen/");
-}
-
-function valider_presciption_examens()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- nbExamens=$("#nbExamens").val();
- nbExamens = parseInt(nbExamens);
-
- /* On peut saisir juste le N° de bon
- sans saisir le détail de la prescription
-
- if (nbExamens<1)
- {
- v_msg="Rien à valider!";
- v_msgEng="Nothing to save!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- */
-
- v_msg="Confirmez-vous cette presciption ?";
- v_msgEng="Do you confirm this prescription ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- feuillemaladie();
- /*
- $.ajax({
- // url: $("#racineWeb").val()+"Ajaxenregistreroptique/videroptiquetemp/",
- url: $("#racineWeb").val()+"Ajaxenregistrerexamen/viderexamentemp/",
- type : 'post',
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- feuillemaladie();
- },
- complete: function() {
- }
- });
- */
- }
-}
-
-function ajaxinfosbonprescriptionexamen()
-{
- numeroBonExamen = $("#numeroBonExamen").val();
- numeroBonExamen = parseInt(numeroBonExamen);
- if (numeroBonExamen>0)
- {
- v_msg="Déjà effectué !";
- v_msgEng="Already done !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- codeMedecin = $("#codeMedecin").val();
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonexamen/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function supprimer_examen(idExamen)
-{
- v_msg="Confirmez-vous la suppression de cet examen ?";
- v_msgEng="Do you confirm the removal of this exam?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'idExamen='+idExamen;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/supprimer/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#examens").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- // prescription_examen();
- }
- });
- }
-}
-
-function enregistrerprescriptionexamen()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of prescription ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin;
-
- $("#btn_enreg").disable();
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionexamen/enregistrerprescriptionexamen/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- $("#msgErreur").html(errorData);
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- },
- complete: function() {
- v_msg="Prescription enregistrée avec succès";
- v_msgEng="Saved successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- prescription_examen();
- }
- });
- }
-}
-
-function ctrlkeypress_examens_possibles(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_examens_possibles();
- }
-}
-
-function afficher_pop_recherche_examens_possibles()
-{
- libelleActeSearch = $("#libelleActeSearch").val();
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- donnees = "valid=1&libelleActeSearch="+libelleActeSearch;
-
- $("#div_liste_actes_possibles").html('' + '' + '
');
-
- $.ajax({
- // url: $("#racineWeb").val()+"Ajaxlisteactespossibles/",
- url: $("#racineWeb").val()+"Ajaxlisteexamenspossibles/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_liste_actes_possibles").html(data);
- }
- });
-}
-
-function ajouter_examen_possible(codeActe, libelleActe, acteExclu, ententePrealable)
-{
- typeSms="ententeprealable";
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- if(acteExclu==1)
- {
- v_msg="Acte non couvert !";
- v_msgEng="Not covered !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- v_msg="Confirmez-vous cet acte : "+libelleActe+" ?";
- v_msgEng="Do you confirm this act : "+libelleActe+" ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable;
-
- // alert(donnees);
- // return;
-
- if (ententePrealable==1)
- {
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
- donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable';
-
- // alert("donnees_sav = "+donnees_sav);
-
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/ajouterexamen/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- if(ententePrealable==1)
- {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
-
- // prescription_examen();
-
- },
- complete: function() {
- if(ententePrealable==1)
- {
- mettremailattente(donnees_sav);
- }
-
- prescription_examen();
-
- }
- });
- }
-}
-
-function ajax_maj_qte_examen(idExamen, quantite, controle)
-{
- quantite=quantite.replace(",",".");
- controle.value=quantite;
-
- if(controle_numerique(controle))
- {
- if(quantite==0)
- {
- controle.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idExamen='+idExamen+"&quantite="+quantite;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailprescriptionexamen/majquantite/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#examens").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- controle.focus();
- }
- });
- }
-}
-
-function examensmedicaux()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numeroExamen=$("#numeroExamen_C").val();
-
- if (numeroExamen==0)
- {
- v_msg="Aucun examen prescrit !";
- v_msgEng="No prescribed exam !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/");
-}
-
-
-function valider_examen_cso()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- if (nbLivre<1)
- {
- v_msg="Rien à enregitrer! Confirmez-vous cette situation ?";
- v_msgEng="Nothing to save! Do you confirm this situation?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- }
- else
- {
- v_msg="Confirmez-vous ces examens ?";
- v_msgEng="Do you confirm these exams ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- }
- if (confirm(v_msg))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailexamen/enregistrerexamen/",
- type: 'POST',
- success: function(data) {
- maj_fraisexclu_cso();
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- feuillemaladie();
- }
- });
- }
-}
-
-function ajouterexamen_tous()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamentous/",
- type: 'POST',
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite_cso();
- }
- });
-}
-
-function ajouterexamen(idExamen, ententePrealable, codeActe)
-{
- donnees = 'idExamen='+idExamen+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable;
-
- typeSms="ententeprealable";
-
- if (ententePrealable==9)
- {
- v_msg="Acte refusé !";
- v_msgEng="Act refused !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- if (ententePrealable==2)
- {
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
- donnees_sav = donnees+'&codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable';
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailexamen/ajouterexamen/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
-
- if(ententePrealable=="2")
- {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- if(ententePrealable=="2")
- {
- mettremailattente(donnees_sav);
- }
- }
- });
-}
-
-function retirerexamen_tous()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamentous/",
- type: 'POST',
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function retirerexamen(idExamen)
-{
- donnees = 'idExamen='+idExamen;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailexamen/retirerexamen/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulter_limite_avant_facturation_cons()
-{
- idFacture=$("#idFacture_C").val();
-
- // alert("consulter_limite_avant_facturation_cons : "+idFacture);
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecons/");
-}
-
-function consulter_limite_avant_facturation()
-{
- idFacture=$("#idFacture_C").val();
-
- // alert("consulter_limite_avant_facturation : "+idFacture);
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacture/");
-}
-
-
-
-function consulter_limite_avant_facturation_cons_ben()
-{
- idFacture=$("#idFacture_C").val();
-
- // alert("consulter_limite_avant_facturation_cons_ben : "+idFacture);
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureconsben/");
-}
-
-function consulter_limite_avant_facturation_pha()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturepha/");
-}
-
-function consulter_limite_avant_facturation_pha_cons()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephacons/");
-}
-
-function consulter_limite_avant_facturation_pha_cons_ben()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephaconsben/");
-}
-
-function actualiser_opticien()
-{
- window.location.assign($("#racineWeb" ).val()+"Opticien/");
-}
-
-function reinitialiser_opticien()
-{
- window.location.assign($("#racineWeb" ).val()+"Opticien/0");
-}
-
-
-function consulter_limite_avant_facturation_opt()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureopt/");
-}
-
-function consulter_limite_avant_facturation_opt_cons()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptcons/");
-}
-
-function consulter_limite_avant_facturation_opt_cons_ben()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureoptconsben/");
-}
-
-function ajouterexamen_lab_tous()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamentous/",
- type: 'POST',
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-function ajouterexamen_lab(idExamen)
-{
- donnees = 'idExamen='+idExamen;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamen/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-
-function retirerexamen_lab(idExamen)
-{
- donnees = 'idExamen='+idExamen;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamen/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-function ctrlkeypress_examens_possibles_lab(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_examens_possibles_lab();
- }
-}
-
-function afficher_pop_recherche_examens_possibles_lab()
-{
- libelleActeSearch = $("#libelleActeSearch").val();
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- donnees = "valid=1&libelleActeSearch="+libelleActeSearch;
-
- $("#div_liste_actes_possibles").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteexamenspossibleslab/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_liste_actes_possibles").html(data);
- }
- });
-}
-
-function consulter_limite_avant_facturation_lab()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelab/");
-}
-
-function actualiser_laboratoire()
-{
- window.location.assign($("#racineWeb" ).val()+"Laboratoire/");
-}
-
-function valider_examen_lab()
-{
- numeroExamen=$("#numeroExamen_C").val();
-
- if (numeroExamen<="0")
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- facture=$("#facture").val();
- facture = parseInt(facture);
-
- if (facture>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- if (facture==0 && nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous ces actes ?";
- v_msgEng="Do you confirm those acts?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- modeSaisieFacture=$("#modeSaisieFacture").val();
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- facturer_lab();
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_lab();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- }
-}
-
-function retirerexamen_lab_tous()
-{
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/retirerexamentous/",
- type: 'POST',
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- // actualiser_pharmacien();
- }
- });
-}
-
-function facturer_lab()
-{
- facture=$("#facture").val();
- facture = parseInt(facture);
-
- if (facture>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- if (facture==0 && nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- codePrestataire = $("#codePrestataire_C").val();
-
- donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo';
-
- typeSms = "facturer_lab";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/",
- type: 'POST',
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- // suspension provisoire Vivien 20/03/20118
- // mettremailattente_adh(donnees_sav);
-
- window.location.assign($("#racineWeb" ).val()+"Laboratoire/");
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-}
-
-function prescrire_examen_lab(codeActe, libelleActe, acteExclu, ententePrealable)
-{
- typeSms="ententeprealable";
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- if(acteExclu==1)
- {
- v_msg="Acte non couvert !";
- v_msgEng="Not covered !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- v_msg="Confirmez-vous cet acte : "+libelleActe+" ?";
- v_msgEng="Do you confirm this act : "+libelleActe+" ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- donnees = 'codeActe='+codeActe+'&ententePrealable='+ententePrealable;
-
- // alert(donnees);
- // return;
-
- if (ententePrealable==1)
- {
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
- donnees_sav = donnees+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable';
-
- // alert("donnees_sav = "+donnees_sav);
-
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/ajouterexamenprescription/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#btn_close_pop_acte").click();
- $("#livraison").html(data);
-
- if(ententePrealable==1)
- {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- },
- complete: function() {
- if(ententePrealable==1)
- {
- mettremailattente(donnees_sav);
- }
- alerter_depassement_limite();
- }
- });
- }
-}
-
-function enregistrer_nv_consommables()
-{
- libelleconsommable = $("#libelleconsommable").val();
-
- if (libelleconsommable<=" ")
- {
- v_msg="Veuillez saisir le nom !";
- v_msgEng="Please enter tyhe name !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#libelleconsommable").focus();
- return;
- }
-
- quantiteconsommable=$("#quantiteconsommable").val();
- quantiteconsommable=quantiteconsommable.replace(",",".");
- $("#quantiteconsommable").val(quantiteconsommable);
-
- if(isNaN(quantiteconsommable))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#quantiteconsommable").val("0");
- $("#quantiteconsommable").focus();
- return
- }
-
- if(quantiteconsommable==0)
- {
- $("#quantiteconsommable").focus();
- v_msg="Veuillez saisir la quantité!";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- prixconsommable=$("#prixconsommable").val();
- prixconsommable=prixconsommable.replace(",",".");
- $("#prixconsommable").val(prixconsommable);
-
- if(isNaN(prixconsommable))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#prixconsommable").val("0");
- $("#prixconsommable").focus();
- return
- }
-
- if(prixconsommable==0)
- {
- $("#prixconsommable").focus();
- v_msg="Veuillez saisir le prix !";
- v_msgEng="Please enter the price !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'libelleconsommable='+libelleconsommable+'&prixconsommable='+prixconsommable+'&quantiteconsommable='+quantiteconsommable;
-
- // alert(donnees);
- // return;
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteconsommables/creerconsommable/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $('#div_test_gabarit').html(data);
- },
- error: function(data) {
- },
- complete: function() {
- afficher_consommable();
- }
- });
-}
-
-function ajax_maj_prix_consommable(idConsommable, valeurActe, controle)
-{
- valeurActe=valeurActe.replace(",",".");
- controle.value=valeurActe;
-
- if(controle_numerique(controle))
- {
- if(valeurActe==0)
- {
- controle.focus();
- v_msg="Veuillez saisir le prix !";
- v_msgEng="Please enter the price !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idConsommable='+idConsommable+"&valeurActe="+valeurActe;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteconsommables/majprix/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $('#div_test_gabarit').html(data);
- },
- error: function(data) {
- },
- complete: function() {
- afficher_consommable();
- }
- });
- }
-}
-
-function remplacer_feuillemaladie()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Remplacerfeuille/");
-}
-
-function ajaxinfosremplacerbonconsultation()
-{
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistrerremplacementconsultation()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- motifremplacement = $("#motifremplacement").val();
-
- if (motifremplacement<=" ")
- {
- v_msg="Veuillez saisir le otif du remplacement!";
- v_msgEng="Please enter the reason !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#motifremplacement").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of presciption ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- OldnumeroBon = $("#OldnumeroBon").val();
-
- donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement;
-
- // donnees += '&dateSurvenance='+dateSurvenance+'&observations='+observations+'&prixActe='+prixActe;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosremplacerbonconsultation/enregistrerremplacementconsultation/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- },
- complete: function() {
- v_msg="Feuille remplacée avec succès !";
- v_msgEng="Replaced successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- feuillemaladie();
- }
- });
- }
-}
-
-function remplacer_ordonnance()
-{
- facture=$("#facture").val();
-
- if (facture!=1)
- {
- v_msg="Pas encore facturé, vous pouvez modifier l\'ordonnance !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numeroBonOrdonnance = $("#numeroBonOrdonnance").val();
- numeroBonOrdonnance = parseInt(numeroBonOrdonnance);
-
- /*
- if (numeroBonOrdonnance<=0)
- {
- v_msg="Pas de prescription !";
- v_msgEng="No prescription !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- */
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- fiche_remplacer_ordonnance();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#remplacerordonnance").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&remplacerordonnance=1";
-
- load("flexcode/user.php?"+data);
- }
-}
-
-function fiche_remplacer_ordonnance()
-{
- window.location.assign($("#racineWeb" ).val()+"Remplacerordonnance/");
-}
-
-function ajaxinfosremplacerordonnance()
-{
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistrerremplacementordonnance()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- motifremplacement = $("#motifremplacement").val();
-
- if (motifremplacement<=" ")
- {
- v_msg="Veuillez saisir le otif du remplacement!";
- v_msgEng="Please enter the reason !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#motifremplacement").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of presciption ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- OldnumeroBon = $("#OldnumeroBon").val();
-
- donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroBon='+numeroBon+'&OldnumeroBon='+OldnumeroBon+'&motifremplacement='+motifremplacement;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosremplacerordonnence/enregistrerremplacementordonnance/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- },
- complete: function() {
- v_msg="Ordonnance remplacée avec succès !";
- v_msgEng="Replaced successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- prescription_medicament();
- }
- });
- }
-}
-
-function afficher_laboratoire_cso()
-{
- window.location.assign($("#racineWeb" ).val()+"Laboratoirecso/");
-}
-
-
-function afficher_seance_cso()
-{
- window.location.assign($("#racineWeb" ).val()+"Kinecso/");
-}
-
-function consulter_limite_avant_facturation_lab_cso()
-{
- /*
- numeroExamen=$("#numeroExamen_C").val();
-
- if (numeroExamen<="0")
- {
- v_msg="Pas de facture!";
- v_msgEng="No bill !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- facture=$("#facture").val();
- facture = parseInt(facture);
-
- if (facture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- */
-
- idFacture=$("#idFacture_C").val();
-
- alert("consulter_limite_avant_facturation_lab_cso : "+idFacture);
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcso/");
-}
-
-function rechercherbonexamen_lab()
-{
- numeroBonExamen=$("#numeroBonExamen").val();
-
- if (numeroBonExamen>" ")
- {
- chercher_ordonnance_lab(numeroBonExamen);
- }
-}
-
-function rechercherbonexamen_lab_cso()
-{
- numeroBonExamen=$("#numeroBonExamen").val();
-
- if (numeroBonExamen>" ")
- {
- chercher_ordonnance_lab_cso(numeroBonExamen);
- }
-}
-
-function chercher_ordonnance_lab_cso(numeroBonExamen)
-{
- donnees = 'numeroBonExamen='+numeroBonExamen;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerordonnancelab/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- afficher_laboratoire_cso();
- }
- });
-}
-
-function valider_examen_lab_cso()
-{
- numeroExamen=$("#numeroExamen_C").val();
-
- if (numeroExamen<="0")
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- facture=$("#facture").val();
- facture = parseInt(facture);
-
- if (facture>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- if (facture==0 && nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous ces actes ?";
- v_msgEng="Do you confirm those acts?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- modeSaisieFacture=$("#modeSaisieFacture").val();
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- facturer_lab_cso();
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_lab_cso();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- }
-}
-
-function facturer_lab_cso()
-{
- facture=$("#facture").val();
- facture = parseInt(facture);
-
- if (facture>0)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- nbLivre=$("#nbLivre").val();
- nbLivre = parseInt(nbLivre);
-
- if (facture==0 && nbLivre<1)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- codePrestataire = $("#codePrestataire_C").val();
-
- donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=maillabo';
-
- typeSms = "facturer_lab";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/enregistrerlaboratoire/",
- type: 'POST',
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- // suspension provisoire Vivien 20/03/20118
- // mettremailattente_adh(donnees_sav);
-
- afficher_laboratoire_cso();
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-}
-
-function prescription_seance()
-{
- window.location.assign($("#racineWeb" ).val()+"Prescriptionseance/");
-}
-
-
-function seances()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numeroPrescriptionKine=$("#numeroPrescriptionKine_C").val();
-
- if (numeroPrescriptionKine==0)
- {
- v_msg="Aucune séance prescrite !";
- v_msgEng="No prescribed session !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Seances/");
-}
-
-function ajaxinfosbonprescriptionseance()
-{
- numeroBonKine = $("#numeroBonKine").val();
- numeroBonKine = parseInt(numeroBonKine);
- if (numeroBonKine>0)
- {
- v_msg="Déjà effectué !";
- v_msgEng="Already done !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- codeMedecin = $("#codeMedecin").val();
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#numeroBon").val("");
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#nomMedecin").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonseance/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistrerprescriptionseance()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of prescription ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- donnees = 'numeroBon='+numeroBon+'&codeMedecin='+codeMedecin;
-
- $("#btn_enreg").disable();
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/enregistrerprescriptionseance/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- $("#msgErreur").html(errorData);
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // $("#examens").html(data);
- },
- complete: function() {
- v_msg="Prescription enregistrée avec succès";
- v_msgEng="Saved successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- prescription_seance();
- }
- });
- }
-}
-
-function modifierprescriptionseance()
-{
- acteExclu = $("#acteExclu").val();
-
- if(acteExclu==1)
- {
- v_msg="Acte non couvert !";
- v_msgEng="Not covered !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#codeMedecin").focus();
- $("#nomMedecin").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeActePrescription = $("#codeActe").val();
-
- if (codeActePrescription<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#codeActePrescription").focus();
- return;
- }
-
- quantite =$("#quantite").val();
-
- quantite = parseInt(quantite);
-
- if(quantite<1)
- {
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- // $("#quantite").focus();
- return;
- }
-
- div_prix = $("#prixActe");
- prixActe = div_prix.val();
-
- // if(prixActe==0 || parseFloat(prixActe)>parseFloat(prixTarif))
- if(prixActe==0)
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cette presciption ?";
- v_msgEng="Do you confirm this prescription ?";
-
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- montantTm =$("#montantTm").val();
- montantArembourser =$("#aRembourser").val();
- fraisReel =$("#totalActe").val();
-
- donnees = 'codeActePrescription='+codeActePrescription +'&quantite='+quantite +'&prixActe='+prixActe;
- donnees += '&montantTm='+montantTm +'&montantArembourser='+montantArembourser +'&fraisReel='+fraisReel;
-
-
- $("#btn_enreg_seance").disable();
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerprescriptionseance/modifierprescriptionseance/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- $("#msgErreur").html(errorData);
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // $("#examens").html(data);
- },
- complete: function() {
- v_msg="Prescription enregistrée avec succès";
- v_msgEng="Saved successfully !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- prescription_seance();
- }
- });
- }
-}
-
-function ajaxprixseance()
-{
- $("#prixActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
- // $("#quantite_info").val("0");
-
- codeActe = $("#codeActe").val();
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un act !";
- v_msgEng="Please select an act !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- div_quantite = $("#quantite");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- v_msg="Veuillez saisir le nombre de séances !";
- v_msgEng="Please enter the number of sessions!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'codeActe='+codeActe+'&quantite='+quantite;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxprixseance/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
- $("#infosacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function valider_presciption_seances()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- codeActePrescription = $("#codeActePrescription").val();
-
- if (codeActePrescription<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_prescrire").click();
-
- return;
- }
-
- nbSeance=$("#nbSeance").val();
- nbSeance = parseInt(nbSeance);
-
- if (nbSeance<1)
- {
- v_msg="Veuillez saisir le nombre de séances !";
- v_msgEng="Please enter the number of sessions!";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- alert(v_msg);
-
- $("#btn_prescrire").click();
-
- return;
- }
-
- v_msg="Confirmez-vous cette presciption ?";
- v_msgEng="Do you confirm this prescription ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- feuillemaladie();
- }
-}
-
-
-function valider_seance_cso()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numeroBonSeance=$("#numeroBonSeance_C").val();
-
- if (numeroBonSeance<="0")
- {
- v_msg="Veuillez sélectionner un bon!";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_InitSession").click();
- return;
- }
-
-
- div_quantite = $("#quantiteSeance");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- // div_quantite.focus();
- v_msg="Veuillez saisir le nombre de séances !";
- v_msgEng="Please enter the number of sessions!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- v_msg="Confirmez-vous ces séances ?";
- v_msgEng="Do you confirm these sessions ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailseance/enregistrerseance/",
- type: 'POST',
- success: function(data) {
- maj_fraisexclu_cso();
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- feuillemaladie();
- }
- });
- }
-}
-
-function actualiser_seance()
-{
- window.location.assign($("#racineWeb" ).val()+"Seances/");
-}
-
-// SEANCES KINE
-
-
-function valider_seance_sea_cso()
-{
- numeroBonSeance=$("#numeroBonSeance_C").val();
-
- if (numeroBonSeance<="0")
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- codeActe = $("#codeActe").val();
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un act !";
- v_msgEng="Please select an act !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- fraisRetenuSeance=$("#fraisRetenuSeance").val();
-
- if (fraisRetenuSeance<=0)
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous ces séances ?";
- v_msgEng="Do you confirm those sessions?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- modeSaisieFacture=$("#modeSaisieFacture").val();
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- facturer_sea_cso();
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_sea_cso();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- }
-}
-
-
-function facturer_sea_cso()
-{
- cout = $("#cout").val();
-
- if (cout==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- codePrestataire = $("#codePrestataire_C").val();
-
- donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine';
-
- typeSms = "facturer_sea";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/",
- type: 'POST',
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- // suspension provisoire Vivien 20/03/20118
- // mettremailattente_adh(donnees_sav);
-
- afficher_seance_cso();
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-
-}
-
-function rechercherbonkine_sea()
-{
- numeroBonKine=$("#numeroBonKine").val();
-
- if (numeroBonKine>" ")
- {
- chercher_ordonnance_sea(numeroBonKine);
- }
-}
-
-function chercher_ordonnance_sea(numeroBonKine)
-{
- $("#numeroBonSeance_C").val("-1");
- donnees = 'numeroBonKine='+numeroBonKine;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- window.location.assign($("#racineWeb" ).val()+"Kine/");
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function ctrlkeypressordsea(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- numeroBonKine=$("#numeroBonKine").val();
- $("#numeroBonKine").blur();
- }
-}
-
-function rechercherbonkine_sea_cso()
-{
- numeroBonKine=$("#numeroBonKine").val();
-
- if (numeroBonKine>" ")
- {
- chercher_ordonnance_sea_cso(numeroBonKine);
- }
-}
-
-function chercher_ordonnance_sea_cso(numeroBonKine)
-{
- $("#numeroBonSeance_C").val("-1");
- donnees = 'numeroBonKine='+numeroBonKine;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerordonnancesea/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- window.location.assign($("#racineWeb" ).val()+"Kinecso/");
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-
-}
-
-
-function ajaxinfosbonseancekine()
-{
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg_bon_kine").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistrerbonsseancekine()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of presciption ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonseancekine/attributionbontemporaire/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- },
- complete: function() {
- afficher_facturation_seance();
- }
- });
- }
-}
-
-
-function afficher_facturation_seance()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/",
- // type : 'post',
- // data: donnees,
- error: function(errorData) {
- alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#btn_close_pop_session").click();
- $("#div_facturation_seance").html(data);
- },
- complete: function(data) {
- $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val());
- }
- });
-}
-
-function ajaxprixseancesea()
-{
- codeActe = $("#codeActe").val();
-
- if (codeActe<=" ")
- {
- $("#prixActe_info").val("0");
- $("#totalActe_info").val("0");
- $("#montantTm_info").val("0");
- $("#aRembourser_info").val("0");
-
- v_msg="Veuillez sélectionner un act !";
- v_msgEng="Please select an act !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- div_quantite = $("#quantiteSeance");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.val(1);
-
- quantite = 1;
- /*
- div_quantite.focus();
- v_msg="Veuillez saisir le nombre de séances !";
- v_msgEng="Please enter the number of sessions!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- */
- }
-
- div_nbRestant = $("#nbRestant");
- nbRestant = div_nbRestant.val();
- nbRestant = parseInt(nbRestant);
-
- if(quantite>nbRestant)
- {
- div_quantite.focus();
- v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!";
- v_msgEng="Only "+nbRestant+" sessions are possible!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'codeActe='+codeActe+'&quantite='+quantite;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxprixseancesea/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-// Facturation SEANCE KINE
-
-function valider_seance_sea()
-{
- numeroBonSeance=$("#numeroBonSeance_C").val();
-
- if (numeroBonSeance<="0")
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- codeActe = $("#codeActe").val();
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un act !";
- v_msgEng="Please select an act !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeActe").focus();
- return;
- }
-
- fraisRetenuSeance=$("#fraisRetenuSeance").val();
-
- if (fraisRetenuSeance<=0)
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous ces séances ?";
- v_msgEng="Do you confirm those sessions?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- modeSaisieFacture=$("#modeSaisieFacture").val();
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- facturer_sea();
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_sea();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- }
-}
-
-function facturer_sea()
-{
- cout = $("#cout").val();
-
- if (cout==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
-
- numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- codePrestataire = $("#codePrestataire_C").val();
-
- donnees_sav = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codePrestataire='+codePrestataire+'&typeMail=mailkine';
-
- typeSms = "facturer_sea";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturatioseancesea/facturerseance/",
- type: 'POST',
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- // suspension provisoire Vivien 20/03/20118
- // mettremailattente_adh(donnees_sav);
-
- window.location.assign($("#racineWeb" ).val()+"Kine/");
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-}
-
-/*
-function rechercherbonexamen_lab_cso()
-{
- numeroBonExamen=$("#numeroBonExamen").val();
-
- if (numeroBonExamen>" ")
- {
- chercher_ordonnance_lab_cso(numeroBonExamen);
- }
-}
-*/
-
-// 19/11/2017
-
-function enregistrerbonsseancekinecso()
-{
- numeroBonSave = $("#numeroBonSave").val();
-
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- codeEtatBon = $("#codeEtatBon").val();
-
- if (codeEtatBon!="1")
- {
- v_msg="Veuillez saisir un N° de bon disponible!";
- v_msgEng="Please enter a prescription number available!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
-
- // alert("numeroBonSave = "+numeroBonSave+" ; numeroBon = "+numeroBon);
- // return;
-
- if(numeroBonSave!=numeroBon)
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- v_msg="Confirmez-vous ce N° de bon ?";
- v_msgEng="Do you confirm this number of presciption ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/attributionbontemporaire/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- },
- complete: function() {
- afficher_facturation_seance_cso();
- }
- });
- }
-}
-
-
-function afficher_facturation_seance_cso()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/",
- error: function(errorData) {
- alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#btn_close_pop_session").click();
- $("#div_facturation_seance").html(data);
- },
- complete: function(data) {
- $("#numeroBonSeance_C").val($("#numeroBonSeance_info").val());
- }
- });
-}
-
-
-function ajaxinfosbonseancekinecso()
-{
- numeroBon = $("#numeroBon").val();
-
- if(isNaN(numeroBon))
- {
- v_msg="Veuillez revoir le numéro de bon!";
- v_msgEng="Please review the prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- if ($("#numeroBon").val()<="0")
- {
- v_msg="Veuillez saisir un N° de bon !";
- v_msgEng="Please enter a prescription number!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#btn_enreg_bon_kine").disable();
- $("#msgErreur").html("");
- $("#codeEtatBon").val("");
-
- $("#numeroBon").focus();
- return;
- }
-
- donnees = "numeroBon="+numeroBon;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinfosbonseancekinecso/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#infosbon").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ajaxmajquteseancecso()
-{
- div_prix = $("#prixActe");
- prixActe = div_prix.val();
-
- if(prixActe==0)
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- div_quantite = $("#quantiteSeance");
- quantite = div_quantite.val();
-
- if(quantite=="")
- {
- quantite = "0";
- }
-
- div_quantite.val(quantite);
-
- quantite = parseInt(quantite);
-
- if(quantite==0)
- {
- div_quantite.focus();
- v_msg="Veuillez saisir le nombre de séances !";
- v_msgEng="Please enter the number of sessions!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- div_nbRestant = $("#nbRestant");
- nbRestant = div_nbRestant.val();
- nbRestant = parseInt(nbRestant);
-
- if(quantite>nbRestant)
- {
- div_quantite.focus();
- v_msg="Vous ne pouvez pas dépasser "+nbRestant+" séances!";
- v_msgEng="Only "+nbRestant+" sessions are possible!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'prixActe='+prixActe+'&quantite='+quantite;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturatioseancecso/modifierseancecso/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // $("#infoseance").html(data);
- },
- complete: function() {
- afficher_facturation_seance_cso();
- }
- });
-}
-
-
-
-function consulter_limite_avant_facturation_kinecso(idFacture)
-{
- if (idFacture<=0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekinecso/"+idFacture+"/");
-}
-
-
-function consulter_limite_avant_facturation_kine(idFacture)
-{
- if (idFacture<=0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturekine/"+idFacture+"/");
-}
-
-function afficher_seance_kine()
-{
- window.location.assign($("#racineWeb" ).val()+"Kine/");
-}
-
-// consulatation_ben
-
-function consultationbenlab()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationbenlab/");
-}
-
-function consultationbensea()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationbensea/");
-}
-
-function laboratoire()
-{
- if (prestation_possible())
- {
- /* mis en commentaire le 28/11/2017
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
- else
- {
- finger_id = $("#finger_id_C" ).val();
-
- if (finger_id==0)
- {
- v_msg="Veuillez procéder à l\'enrôlement avant !";
- v_msgEng="Please enroll before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- okId=$("#okId" ).val();
-
- if (okId!=1)
- {
- v_msg="Veuillez procéder à l\'identification avant !";
- v_msgEng="Please check identity before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
- */
-
- window.location.assign($("#racineWeb" ).val()+"Laboratoire/");
- }
-}
-
-
-function seancekine()
-{
- if (prestation_possible())
- {
- /* mis en commentaire le 28/11/2017
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
- else
- {
- finger_id = $("#finger_id_C" ).val();
-
- if (finger_id==0)
- {
- v_msg="Veuillez procéder à l\'enrôlement avant !";
- v_msgEng="Please enroll before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- okId=$("#okId" ).val();
-
- if (okId!=1)
- {
- v_msg="Veuillez procéder à l\'identification avant !";
- v_msgEng="Please check identity before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
- */
-
- window.location.assign($("#racineWeb" ).val()+"Kine/");
- }
-}
-
-function afficher_facture_cons_lab(idFacture, numeroBonExamen, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfacturelab/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_lab();
- }
- });
- }
-}
-
-function consulter_facture_lab()
-{
- window.location.assign($("#racineWeb" ).val()+"Laboratoirecons/");
-}
-
-function consulter_limite_avant_facturation_lab_cons()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabcons/");
-}
-
-function afficher_facture_cons_lab_ben(idFacture, numeroBonExamen, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonExamen='+numeroBonExamen+'&codePrestataireLivraison='+codePrestataireLivraison;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfacturelab/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_lab_ben();
- }
- });
- }
-}
-
-function consulter_facture_lab_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Laboratoireconsben/");
-}
-
-function consulter_limite_avant_facturation_lab_cons_ben()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturelabconsben/");
-}
-
-function listerdossiercons_lab()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
- donnees_sav = donnees;
-
- $("#detail_reglement").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationlabentete/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#reglement").html(data);
- },
- complete: function() {
- }
- });
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationlab/",
- type : 'post',
- data: donnees_sav,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#detail_reglement").html(data);
- $("#detail_reglement").css("padding-top", "0px");
- },
- complete: function() {
- }
- });
-}
-
-function lister_factures_lab_ben()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationbenlab/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function consultationsea()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultationsea/");
-}
-
-function listerdossiercons_sea()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
- donnees_sav = donnees;
-
- $("#detail_reglement").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationseaentete/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#reglement").html(data);
- },
- complete: function() {
- }
- });
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsultationsea/",
- type : 'post',
- data: donnees_sav,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#detail_reglement").html(data);
- $("#detail_reglement").css("padding-top", "0px");
- },
- complete: function() {
- }
- });
-}
-
-function consulter_facture_sea()
-{
- window.location.assign($("#racineWeb" ).val()+"Kinecons/");
-}
-
-function consulter_limite_avant_facturation_sea_cons()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseacons/");
-}
-
-function lister_factures_sea_ben()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- // url: $("#racineWeb").val()+"Ajaxconsultationbenlab/",
- url: $("#racineWeb").val()+"Ajaxconsultationbensea/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function afficher_facture_cons_sea(idFacture, numeroBonKine, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfacturesea/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_sea();
- }
- });
- }
-}
-
-
-function afficher_facture_cons_sea_ben(idFacture, numeroBonKine, codePrestataireLivraison)
-{
- if (idFacture>"")
- {
- donnees = 'idFacture='+idFacture+'&numeroBonKine='+numeroBonKine+'&codePrestataireLivraison='+codePrestataireLivraison;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextfacturesea/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- consulter_facture_sea_ben();
- }
- });
- }
-}
-
-function consulter_facture_sea_ben()
-{
- window.location.assign($("#racineWeb" ).val()+"Kineconsben/");
-}
-
-function consulter_limite_avant_facturation_sea_cons_ben()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureseaconsben/");
-}
-
-function ctrlkeypress_numeroBon(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- $("#numeroBon").blur();
- }
-}
-
-function verifier_feuille_maladie_dec_cons(numeroFeuilleMaladie, idFacture)
-{
- $("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie);
- numeroDecompte = $("#numeroDecompte").val();
-
- // if (numeroFeuilleMaladie>"")
- if (idFacture>"")
- {
- donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture;
-
- codeTypePrestataire = $("#codeTypePrestataire_C").val();
-
- if(codeTypePrestataire=="CSO" || codeTypePrestataire=="LAB" || codeTypePrestataire=="SEA")
- {
-
- verifier_feuille_maladie_dec_cso_cons(donnees);
- }
- else
- if(codeTypePrestataire=="PHA")
- {
- verifier_feuille_maladie_dec_pha_cons(donnees);
- }
- else
- if(codeTypePrestataire=="OPT")
- {
- verifier_feuille_maladie_dec_opt_cons(donnees);
- }
- }
-}
-
-
-function imprimerbordereaudecompte()
-{
- idReglement = $("#idReglement").val();
-
-
- if (idReglement>"0")
- {
- var div_wait = $('#div_wait');
- div_wait.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerbordereaudecompte",
- type: 'POST',
- success: function(data)
- {
- div_wait.html(data);
- },
- error : function(resultat, statut, erreur)
- {
- alert(erreur);
- },
- complete: function(data)
- {
- }
- });
- }
-}
-
-function verifier_feuille_maladie_dec_cso_cons(donnees)
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxverifierfacturecons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_verification_facture").html(data);
- },
- complete: function() {
- $("#btn_pop").click();
- }
- });
-}
-
-function verifier_feuille_maladie_dec_pha_cons(donnees)
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxverifierfacturephacons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_verification_facture").html(data);
- },
- complete: function() {
- $("#btn_pop").click();
- }
- });
-}
-
-function verifier_feuille_maladie_dec_opt_cons(donnees)
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxverifierfactureoptcons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_verification_facture").html(data);
- },
- complete: function() {
- $("#btn_pop").click();
- }
- });
-}
-
-function limite_avant_facture_dec(idFacture)
-{
- donnees = 'idFacture='+idFacture;
- $.ajax({
- url: $("#racineWeb").val()+"AjaxPlafondavantfacturecdec/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_limites").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function demander_decompte()
-{
- window.location.assign($("#racineWeb" ).val()+"Initdemandedecompte/");
-}
-
-function initierdemandedecompte()
-{
- codeExercice=$("#codeExercice").val();
- codeMois=$("#codeMois").val();
-
- if (codeExercice<=" ")
- {
- v_msg="Veuillez sélectionner un exercice !";
- v_msgEng="Please select an exercise !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeExercice").focus();
-
- return;
- }
-
- if (codeMois<=" ")
- {
- v_msg="Veuillez sélectionner une période !";
- v_msgEng="Please select a period !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $(codeMois).focus();
- return;
- }
-
- donnees = 'codeExercice='+codeExercice+'&codeMois='+codeMois;
-
- // $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdemandedecompte/initierdemandedecompte/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#inforegle").html(data);
- },
- complete: function() {
- regle=$("#regle").val();
-
- if(regle==-1)
- {
- alert("Problème lors de l\'initialisation !");
- return;
- }
- else
- {
- afficher_demande_decompte();
- }
- }
- });
-}
-
-function afficher_demande_decompte()
-{
- $("#detail_demande_decompte").html('' + '' + '
');
- window.location.assign($("#racineWeb" ).val()+"Demandedecompte/");
-}
-
-
-function imprimerbordereaudemandedecompte()
-{
- idDemandeDecompte = $("#idDemandeDecompte").val();
-
- if (idDemandeDecompte>"0")
- {
- var div_wait = $('#div_wait');
- div_wait.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaximprimerdemandedecompte/imprimerdemandecompte",
- type: 'POST',
- success: function(data)
- {
- div_wait.html(data);
- },
- error : function(resultat, statut, erreur)
- {
- alert(erreur);
- },
- complete: function(data)
- {
- }
- });
- }
-}
-
-function rechargerdemandedecompte()
-{
- $("#detail_demande_decompte").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdemandedecompte/rechargerdemandedecompte/",
- type : 'post',
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- afficher_demande_decompte();
- },
- complete: function() {
- }
- });
-}
-
-function actualiser_decompte()
-{
- $("#div_detail").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Decomptecons/");
-}
-
-function monture()
-{
- $("#monture").val("1");
-
- if (prestation_possible())
- {
- modeSaisieFacture=$("#modeSaisieFacture").val();
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- window.location.assign($("#racineWeb" ).val()+"Monture/");
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- }
- else
- {
- finger_id = $("#finger_id_C" ).val();
-
- if (finger_id==0)
- {
- v_msg="Veuillez procéder à l\'enrôlement avant !";
- v_msgEng="Please enroll before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- okId=$("#okId" ).val();
-
- if (okId!=1)
- {
- v_msg="Veuillez procéder à l\'identification avant !";
- v_msgEng="Please check identity before !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
- }
-
- // alert("Monture Direct");
- // return;
-
- window.location.assign($("#racineWeb" ).val()+"Monture/");
- }
-}
-
-function actualiser_monture()
-{
- window.location.assign($("#racineWeb" ).val()+"Monture/");
-}
-
-function valider_monture()
-{
-
- ententePrealableMont=$("#ententePrealableMont").val();
-
- // alert("ententePrealableMont : "+ententePrealableMont);
-
- nbActesMonture=$("#nbActesMonture").val();
-
- if (nbActesMonture>0 && ententePrealableMont!=1)
- {
- v_msg="Montures déjà livrées une fois!";
- v_msgEng="Frames already delivered once!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- /*
- alert("On peut facturer");
- return;
- */
-
- numeroFacture=$("#numeroFacture").val();
-
- if (numeroFacture<=" ")
- {
- v_msg="Veuillez saisir le No de la facture !";
- v_msgEng="Please enter the Invoice No!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroFacture").focus();
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cette livraison ?";
- v_msgEng="Do you confirm this delivery?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- modeSaisieFacture=$("#modeSaisieFacture").val();
- if(modeSaisieFacture=="1")
- {
- $("#okId" ).val("1");
- facturer_monture();
- return;
- }
-
- derogation_finger_en_cours=$("#derogation_finger_en_cours_C").val();
- if(derogation_finger_en_cours>0)
- {
- $("#okId" ).val("1");
- facturer_monture();
- }
- else
- {
- beneficiaire = $("#beneficiaire_C").val();
- user_id =$("#user_id_C").val();
- finger_id =$("#finger_id_C").val();
-
- $("#facturation").val("1");
-
- data = "action=index&user_id="+user_id+"&user_name="+beneficiaire+"&finger="+finger_id+"&facturation=1";
-
- load("flexcode/user.php?"+data);
- }
- }
-}
-
-function maj_monture_temp_monture(idOptique, monture)
-{
- numeroFacture=$("#numeroFacture").val();
-
- donnees = 'idOptique='+idOptique+"&monture="+monture+"&numeroFacture="+numeroFacture;
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmonture/majmonture/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_monture").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-function facturer_monture()
-{
- numeroFacture=$("#numeroFacture").val();
-
- if (numeroFacture<=" ")
- {
- v_msg="Veuillez saisir le No de la facture !";
- v_msgEng="Please enter the Invoice No!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#numeroFacture").focus();
-
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à facturer!";
- v_msgEng="Nothing to bill!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- montantTm = $("#montantTm").val();
- cout = $("#cout").val();
-
- donnees = 'prixActe='+prixActe;
- donnees += '&montantTm='+montantTm;
- donnees += '&cout='+cout;
- donnees += '&numeroFacture='+numeroFacture;
-
-
- // numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
- codePrestataire = $("#codePrestataire_C").val();
-
- donnees_sav = 'codePrestataire='+codePrestataire+'&typeMail=mailoptique';
-
- typeSms = "facturer_opt";
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmonture/enregistrermonture/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // suspension provisoire Vivien 20/03/20118
- // preparesms(typeSms);
- },
- error: function(data) {
- // alert(data);
- },
- complete: function() {
- // mettremailattente(donnees_sav);
-
- window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/");
-
- v_msg="Facturation effectuée avec succès!";
- v_msgEng="Successful billing!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- });
-}
-
-
-function requetes_prestaire()
-{
- window.location.assign($("#racineWeb" ).val()+"Requetes/");
-}
-
-function ajaxenteterequete()
-{
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- donnees = 'codeRequete='+codeRequete;
-
- v_url = $("#racineWeb").val()+"Ajaxrequeteentete"+codeRequete+"/";
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_ente_requete").html(data);
- $(".datepicker" ).datepicker();
- }
- });
-}
-
-function requetes_feuilles_maladie()
-{
- $('#div_export_a').html("");
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateConsultation1 = $("#dateConsultation1").val();
- dateConsultation2 = $("#dateConsultation2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
- numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- // Ligne 3
- codeTypePrestataire = $("#codeTypePrestataire").val();
- numeroDecompte1 = $("#numeroDecompte1").val();
- numeroDecompte2 = $("#numeroDecompte2").val();
- codeRaisonConsultation = $("#codeRaisonConsultation").val();
- hospitalisation = $("#hospitalisation").val();
- numeroChambre = $("#numeroChambre").val();
- chirurgie = $("#chirurgie").val();
- facture = $("#facture").val();
-
- // Ligne 4
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
- numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateConsultation1=' + dateConsultation1;
- donnees += '&dateConsultation2=' + dateConsultation2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
- donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- // Ligne 3
- donnees += '&codeTypePrestataire=' + codeTypePrestataire;
-
- donnees += '&numeroDecompte1=' + numeroDecompte1;
- donnees += '&numeroDecompte2=' + numeroDecompte2;
-
- donnees += '&codeRaisonConsultation=' + codeRaisonConsultation;
- donnees += '&hospitalisation=' + hospitalisation;
- donnees += '&numeroChambre=' + numeroChambre;
- donnees += '&chirurgie=' + chirurgie;
- donnees += '&facture=' + facture;
-
- // Ligne 4
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // alert(donnees);
- // return;
-
- $("#div_detail_requete").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- //$("#div_detail_requete").html(data);
- },
- complete: function() {
- $("#div_detail_requete").html(donnees_retour);
- $("#nbligne").val("Result : "+$("#nbligne_info").val());
- }
- });
-}
-
-function requetes_feuilles_maladie_export()
-{
- $('#div_detail_requete').html('');
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateConsultation1 = $("#dateConsultation1").val();
- dateConsultation2 = $("#dateConsultation2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
- numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- // Ligne 3
- codeTypePrestataire = $("#codeTypePrestataire").val();
- numeroDecompte1 = $("#numeroDecompte1").val();
- numeroDecompte2 = $("#numeroDecompte2").val();
- codeRaisonConsultation = $("#codeRaisonConsultation").val();
- hospitalisation = $("#hospitalisation").val();
- numeroChambre = $("#numeroChambre").val();
- chirurgie = $("#chirurgie").val();
- facture = $("#facture").val();
-
- // Ligne 4
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
- numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateConsultation1=' + dateConsultation1;
- donnees += '&dateConsultation2=' + dateConsultation2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
- donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- // Ligne 3
- donnees += '&codeTypePrestataire=' + codeTypePrestataire;
-
- donnees += '&numeroDecompte1=' + numeroDecompte1;
- donnees += '&numeroDecompte2=' + numeroDecompte2;
-
- donnees += '&codeRaisonConsultation=' + codeRaisonConsultation;
- donnees += '&hospitalisation=' + hospitalisation;
- donnees += '&numeroChambre=' + numeroChambre;
- donnees += '&chirurgie=' + chirurgie;
- donnees += '&facture=' + facture;
-
- // Ligne 4
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- var div_export = $('#div_detail_requete');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- // $('#div_detail_requete').html("");
- // $('#div_export_a').html(data);
- },
- complete: function() {
- $('#div_detail_requete').html("");
- $('#div_export_a').html(donnees_retour);
- }
- });
-}
-
-
-function selectionner_medecin_requete(codeMedecin, nomMedecin, noOrdreMedecin)
-{
- $("#codeMedecin").val(codeMedecin);
- $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )");
- $("#close_pop").click();
-}
-
-function afficher_pop_recherche_medecin_requete()
-{
-
- noOrdreMedecin = $("#noOrdreMedecin").val();
- nomsearch = $("#nomsearch").val();
-
- if(noOrdreMedecin+nomsearch<=" ")
- return;
-
- donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch;
-
- $("#div_listemedecins").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistemedecinsrequete/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_listemedecins").html(data);
- }
- });
-}
-
-function ctrlkeypress_medecin_requete(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_medecin_requete();
- }
-}
-
-function reinitialiser_medecin()
-{
- $("#codeMedecin").val("");
- $("#nomMedecin").html("Rechercher Médecin...");
- $("#close_pop").click();
-}
-
-function requetes_factures()
-{
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateFacture1 = $("#dateFacture1").val();
- dateFacture2 = $("#dateFacture2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
- numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- // Ligne 3
- codeTypePrestataire = $("#codeTypePrestataire").val();
- numeroDecompte1 = $("#numeroDecompte1").val();
- numeroDecompte2 = $("#numeroDecompte2").val();
- hospitalisation = $("#hospitalisation").val();
- numeroChambre = $("#numeroChambre").val();
- chirurgie = $("#chirurgie").val();
-
- // Ligne 4
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
- numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateFacture1=' + dateFacture1;
- donnees += '&dateFacture2=' + dateFacture2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
- donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- // Ligne 3
- donnees += '&codeTypePrestataire=' + codeTypePrestataire;
-
- donnees += '&numeroDecompte1=' + numeroDecompte1;
- donnees += '&numeroDecompte2=' + numeroDecompte2;
-
- donnees += '&hospitalisation=' + hospitalisation;
- donnees += '&numeroChambre=' + numeroChambre;
- donnees += '&chirurgie=' + chirurgie;
-
- // Ligne 4
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // alert(donnees);
- // return;
-
- $("#div_detail_requete").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- //$("#div_detail_requete").html(data);
- },
- complete: function() {
- $("#div_detail_requete").html(donnees_retour);
- $("#nbligne").val("Result : "+$("#nbligne_info").val());
- }
- });
-}
-
-
-function requetes_factures_export()
-{
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateFacture1 = $("#dateFacture1").val();
- dateFacture2 = $("#dateFacture2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
- numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- // Ligne 3
- codeTypePrestataire = $("#codeTypePrestataire").val();
- numeroDecompte1 = $("#numeroDecompte1").val();
- numeroDecompte2 = $("#numeroDecompte2").val();
- hospitalisation = $("#hospitalisation").val();
- numeroChambre = $("#numeroChambre").val();
- chirurgie = $("#chirurgie").val();
-
- // Ligne 4
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
- numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateFacture1=' + dateFacture1;
- donnees += '&dateFacture2=' + dateFacture2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
- donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- // Ligne 3
- donnees += '&codeTypePrestataire=' + codeTypePrestataire;
-
- donnees += '&numeroDecompte1=' + numeroDecompte1;
- donnees += '&numeroDecompte2=' + numeroDecompte2;
-
- donnees += '&hospitalisation=' + hospitalisation;
- donnees += '&numeroChambre=' + numeroChambre;
- donnees += '&chirurgie=' + chirurgie;
-
- // Ligne 4
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // alert(donnees);
- // return;
-
- var div_export = $('#div_detail_requete');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- // $('#div_detail_requete').html("");
- // $('#div_export_a').html(data);
- },
- complete: function() {
- $('#div_detail_requete').html("");
- $('#div_export_a').html(donnees_retour);
- }
- });
-}
-
-function requetes_bonpoec()
-{
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- codeTypeBon = $("#codeTypeBon").val();
- codeEtatBon = $("#codeEtatBon").val();
-
- // Ligne 2
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
- numeroBon1 = $("#numeroBon1").val();
- numeroBon2 = $("#numeroBon2").val();
-
- // Ligne 4
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBon1 = convertir_en_entier(numeroBon1);
- numeroBon2 = convertir_en_entier(numeroBon2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&codeTypeBon=' + codeTypeBon;
- donnees += '&codeEtatBon=' + codeEtatBon;
-
- // Ligne 2
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
- donnees += '&numeroBon1=' + numeroBon1;
- donnees += '&numeroBon2=' + numeroBon2;
-
- // Ligne 4
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- $("#div_detail_requete").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- //$("#div_detail_requete").html(data);
- },
- complete: function() {
- $("#div_detail_requete").html(donnees_retour);
- $("#nbligne").val("Result : "+$("#nbligne_info").val());
- }
- });
-}
-
-function requetes_bonpoec_export()
-{
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- codeTypeBon = $("#codeTypeBon").val();
- codeEtatBon = $("#codeEtatBon").val();
-
- // Ligne 2
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
- numeroBon1 = $("#numeroBon1").val();
- numeroBon2 = $("#numeroBon2").val();
-
- // Ligne 3
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBon1 = convertir_en_entier(numeroBon1);
- numeroBon2 = convertir_en_entier(numeroBon2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&codeTypeBon=' + codeTypeBon;
- donnees += '&codeEtatBon=' + codeEtatBon;
-
- // Ligne 2
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
- donnees += '&numeroBon1=' + numeroBon1;
- donnees += '&numeroBon2=' + numeroBon2;
-
- // Ligne 3
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // alert(donnees);
- // alert(v_url+" / "+codeRequete);
- // return;
-
- var div_export = $('#div_detail_requete');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- // $('#div_detail_requete').html("");
- // $('#div_export_a').html(data);
- },
- complete: function() {
- $('#div_detail_requete').html("");
- $('#div_export_a').html(donnees_retour);
- }
- });
-}
-
-
-function requetes_prestationactes()
-{
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- datePrestation1 = $("#datePrestation1").val();
- datePrestation2 = $("#datePrestation2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
- numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- // Ligne 3
- codeTypePrestataire = $("#codeTypePrestataire").val();
- numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
- numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
- codeTypePrestation = $("#codeTypePrestation").val();
- ententePrealable = $("#ententePrealable").val();
- numeroChambre = $("#numeroChambre").val();
- facture = $("#facture").val();
-
- // Ligne 4
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 5
- libelleActe = $("#libelleActe").val();
- libelleFamilleActe = $("#libelleFamilleActe").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
- numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&datePrestation1=' + datePrestation1;
- donnees += '&datePrestation2=' + datePrestation2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
- donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- // Ligne 3
- donnees += '&codeTypePrestataire=' + codeTypePrestataire;
-
- donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
- donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
-
- donnees += '&codeTypePrestation=' + codeTypePrestation;
- donnees += '&ententePrealable=' + ententePrealable;
- donnees += '&numeroChambre=' + numeroChambre;
- donnees += '&facture=' + facture;
-
- // Ligne 4
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 5
- donnees += '&libelleActe=' + libelleActe;
- donnees += '&libelleFamilleActe=' + libelleFamilleActe;
-
- // alert(donnees);
- // return;
-
- $("#div_detail_requete").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- //$("#div_detail_requete").html(data);
- },
- complete: function() {
- $("#div_detail_requete").html(donnees_retour);
- $("#nbligne").val("Result : "+$("#nbligne_info").val());
- }
- });
-}
-
-function requetes_prestationactes_export()
-{
- $('#div_detail_requete').html('');
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- datePrestation1 = $("#datePrestation1").val();
- datePrestation2 = $("#datePrestation2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
- numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- // Ligne 3
- codeTypePrestataire = $("#codeTypePrestataire").val();
- numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
- numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
- codeTypePrestation = $("#codeTypePrestation").val();
- ententePrealable = $("#ententePrealable").val();
- numeroChambre = $("#numeroChambre").val();
- facture = $("#facture").val();
-
- // Ligne 4
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 5
- libelleActe = $("#libelleActe").val();
- libelleFamilleActe = $("#libelleFamilleActe").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
- numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&datePrestation1=' + datePrestation1;
- donnees += '&datePrestation2=' + datePrestation2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
- donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- // Ligne 3
- donnees += '&codeTypePrestataire=' + codeTypePrestataire;
-
- donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
- donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
-
- donnees += '&codeTypePrestation=' + codeTypePrestation;
- donnees += '&ententePrealable=' + ententePrealable;
- donnees += '&numeroChambre=' + numeroChambre;
- donnees += '&facture=' + facture;
-
- // Ligne 4
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 5
- donnees += '&libelleActe=' + libelleActe;
- donnees += '&libelleFamilleActe=' + libelleFamilleActe;
-
- var div_export = $('#div_detail_requete');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- // $('#div_detail_requete').html("");
- // $('#div_export_a').html(data);
- },
- complete: function() {
- $('#div_detail_requete').html("");
- $('#div_export_a').html(donnees_retour);
- }
- });
-}
-
-function requetes_pharmacie()
-{
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateLivraison1 = $("#dateLivraison1").val();
- dateLivraison2 = $("#dateLivraison2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
- numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
-
- codePrestatairePrescription = $("#codePrestatairePrescription").val();
-
- // Ligne 3
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 4
- libelleMedicament = $("#libelleMedicament").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
- numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateLivraison1=' + dateLivraison1;
- donnees += '&dateLivraison2=' + dateLivraison2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
- donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
-
- donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
-
- // Ligne 3
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 4
- donnees += '&libelleMedicament=' + libelleMedicament;
-
- // alert(donnees);
- // return;
-
- $("#div_detail_requete").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- //$("#div_detail_requete").html(data);
- },
- complete: function() {
- $("#div_detail_requete").html(donnees_retour);
- $("#nbligne").val("Result : "+$("#nbligne_info").val());
- }
- });
-}
-
-function requetes_pharmacie_export()
-{
- $('#div_detail_requete').html('');
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateLivraison1 = $("#dateLivraison1").val();
- dateLivraison2 = $("#dateLivraison2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
- numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
-
- numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
- numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
-
- codePrestatairePrescription = $("#codePrestatairePrescription").val();
-
- // Ligne 3
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 4
- libelleMedicament = $("#libelleMedicament").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
- numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
-
- numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
- numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateLivraison1=' + dateLivraison1;
- donnees += '&dateLivraison2=' + dateLivraison2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
- donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
-
- donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
- donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
-
- donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
-
- // Ligne 3
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 4
- donnees += '&libelleMedicament=' + libelleMedicament;
-
- var div_export = $('#div_detail_requete');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- // $('#div_detail_requete').html("");
- // $('#div_export_a').html(data);
- },
- complete: function() {
- $('#div_detail_requete').html("");
- $('#div_export_a').html(donnees_retour);
- }
- });
-}
-
-function requetes_optique()
-{
- $('#div_export').html("");
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateLivraison1 = $("#dateLivraison1").val();
- dateLivraison2 = $("#dateLivraison2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
- numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
-
-
- codePrestatairePrescription = $("#codePrestatairePrescription").val();
-
- // Ligne 3
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 4
- libelleOptique = $("#libelleOptique").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
- numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateLivraison1=' + dateLivraison1;
- donnees += '&dateLivraison2=' + dateLivraison2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
- donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
-
- donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
-
- // Ligne 3
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 4
- donnees += '&libelleOptique=' + libelleOptique;
-
- // alert(donnees);
- // return;
-
- $("#div_detail_requete").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- //$("#div_detail_requete").html(data);
- },
- complete: function() {
- $("#div_detail_requete").html(donnees_retour);
- $("#nbligne").val("Result : "+$("#nbligne_info").val());
- }
- });
-}
-
-function requetes_optique_export()
-{
- $('#div_detail_requete').html('');
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
-
- // Ligne 1
- codePrestataire = $("#codePrestataire").val();
- dateLivraison1 = $("#dateLivraison1").val();
- dateLivraison2 = $("#dateLivraison2").val();
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- // Ligne 2
- codeMedecin = $("#codeMedecin").val();
-
- numeroBonConsultation1 = $("#numeroBonConsultation1").val();
- numeroBonConsultation2 = $("#numeroBonConsultation2").val();
-
- numeroBonOptique1 = $("#numeroBonOptique1").val();
- numeroBonOptique2 = $("#numeroBonOptique2").val();
-
- numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
- numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
-
- codePrestatairePrescription = $("#codePrestatairePrescription").val();
-
- // Ligne 3
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 4
- libelleOptique = $("#libelleOptique").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
- numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
-
- numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
- numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
-
- numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
- numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += 'codePrestataire=' + codePrestataire;
- donnees += '&dateLivraison1=' + dateLivraison1;
- donnees += '&dateLivraison2=' + dateLivraison2;
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
-
- // Ligne 2
- donnees += '&codeMedecin=' + codeMedecin;
-
- donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
- donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
-
- donnees += '&numeroBonOptique1=' + numeroBonOptique1;
- donnees += '&numeroBonOptique2=' + numeroBonOptique2;
-
- donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
- donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
-
- donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
-
- // Ligne 3
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 4
- donnees += '&libelleOptique=' + libelleOptique;
-
- var div_export = $('#div_detail_requete');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- // $('#div_detail_requete').html("");
- // $('#div_export_a').html(data);
- },
- complete: function() {
- $('#div_detail_requete').html("");
- $('#div_export_a').html(donnees_retour);
- }
- });
-}
-
-
-function requetes_assure()
-{
- $('#div_export').html("");
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
-
- // Ligne 1
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 2
- numeroPolice = $("#numeroPolice").val();
- codeProduit = $("#codeProduit").val();
- codeEtatPolice = $("#codeEtatPolice").val();
- codeLienParente = $("#codeLienParente").val();
- codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val();
- sexe = $("#sexe").val();
-
- // Ligne 3
- numeroClient1 = $("#numeroClient1").val();
- numeroClient2 = $("#numeroClient2").val();
- telephonePortableAdherent = $("#telephonePortableAdherent").val();
- emailAdherent = $("#emailAdherent").val();
- decede = $("#decede").val();
- nomClient = $("#nomClient").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroClient1 = convertir_en_entier(numeroClient1);
- numeroClient2 = convertir_en_entier(numeroClient2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 2
- donnees += '&numeroPolice=' + numeroPolice;
- donnees += '&codeProduit=' + codeProduit;
- donnees += '&codeEtatPolice=' + codeEtatPolice;
- donnees += '&codeLienParente=' + codeLienParente;
- donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire;
- donnees += '&sexe=' + sexe;
-
- // Ligne 3
- donnees += '&numeroClient1=' + numeroClient1;
- donnees += '&numeroClient2=' + numeroClient2;
- donnees += '&telephonePortableAdherent=' + telephonePortableAdherent;
- donnees += '&emailAdherent=' + emailAdherent;
- donnees += '&decede=' + decede;
- donnees += '&nomClient=' + nomClient;
-
- // alert(donnees);
- // return;
-
- $("#div_detail_requete").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- //$("#div_detail_requete").html(data);
- },
- complete: function() {
- $("#div_detail_requete").html(donnees_retour);
- $("#nbligne").val("Result : "+$("#nbligne_info").val());
- }
- });
-}
-
-function requetes_assure_export()
-{
- $('#div_detail_requete').html('');
- $('#div_export_a').html("");
-
- donnees = "";
- donnees_retour = "";
-
- codeRequete=$("#codeRequete").val();
-
- if (codeRequete<=" ")
- {
- v_msg="Veuillez sélectionner une requête !";
- v_msg +="\n";
- alert(v_msg);
- $(codeRequete).focus();
- return;
- }
-
- v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
-
- // Ligne 1
- numeroAdherent = $("#numeroAdherent").val();
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
- adherent = $("#adherent").val();
- beneficiaire = $("#beneficiaire").val();
-
- // Ligne 2
- numeroPolice = $("#numeroPolice").val();
- codeProduit = $("#codeProduit").val();
- codeEtatPolice = $("#codeEtatPolice").val();
- codeLienParente = $("#codeLienParente").val();
- codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val();
- sexe = $("#sexe").val();
-
- // Ligne 3
- numeroClient1 = $("#numeroClient1").val();
- numeroClient2 = $("#numeroClient2").val();
- telephonePortableAdherent = $("#telephonePortableAdherent").val();
- emailAdherent = $("#emailAdherent").val();
- decede = $("#decede").val();
- nomClient = $("#nomClient").val();
-
- // FIN champs
-
- // DEBUT convertir_en_entier
- numeroClient1 = convertir_en_entier(numeroClient1);
- numeroClient2 = convertir_en_entier(numeroClient2);
- // FIN convertir_en_entier
-
- // Ligne 1
- donnees += '&numeroAdherent=' + numeroAdherent;
- donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
- donnees += '&adherent=' + adherent;
- donnees += '&beneficiaire=' + beneficiaire;
-
- // Ligne 2
- donnees += '&numeroPolice=' + numeroPolice;
- donnees += '&codeProduit=' + codeProduit;
- donnees += '&codeEtatPolice=' + codeEtatPolice;
- donnees += '&codeLienParente=' + codeLienParente;
- donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire;
- donnees += '&sexe=' + sexe;
-
- // Ligne 3
- donnees += '&numeroClient1=' + numeroClient1;
- donnees += '&numeroClient2=' + numeroClient2;
- donnees += '&telephonePortableAdherent=' + telephonePortableAdherent;
- donnees += '&emailAdherent=' + emailAdherent;
- donnees += '&decede=' + decede;
- donnees += '&nomClient=' + nomClient;
-
- var div_export = $('#div_detail_requete');
- div_export.html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- // $('#div_detail_requete').html("");
- // $('#div_export_a').html(data);
- },
- complete: function() {
- $('#div_detail_requete').html("");
- $('#div_export_a').html(donnees_retour);
- }
- });
-}
-
-function convertir_en_entier(valeur)
-{
- if(isNaN(valeur))
- {
- valeur = "0";
- }
-
- if (valeur=="")
- {
- valeur="0";
- }
-
- valeur = parseInt(valeur);
-
- return valeur;
-}
-
-function selectionactesmedicaux()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Selectactesmedicaux/");
-}
-
-function ajaxactespossibles_selection()
-{
- codeFamilleActe=$("#codeFamilleActe").val();
-
- donnees = 'codeFamilleActe='+codeFamilleActe;
-
- $("#listeacte").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxactespossiblesselection/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listeacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ajouter_un_acte_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable)
-{
- donnee_a_affciher = "";
-
- codeFamilleActe=$("#codeFamilleActe").val();
-
- donnees=""
- donnees_sav="";
-
- codeMedecin = $("#codeMedecin").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#nomMedecin").focus();
- return;
- }
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- if(prixActe==0)
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cet acte ?";
- v_msgEng="Do you confirm this act ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- // if (confirm(v_msg))
- // {
- if(ententePrealable==1)
- {
- ententePrealable = "2";
- }
-
- donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&codeMedecin='+codeMedecin+'&ententePrealable='+ententePrealable;
- donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser;
-
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
-
- donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable';
- // donnees_sav2 = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailautorisation';
-
- typeSms="ententeprealable";
- // typeSms2="autorisation";
-
- // alert(donnees);
-
- $("#listeacte").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/enregistreractemedical/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- maj_fraisexclu_cso();
-
- if(ententePrealable=="2")
- {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- donnee_a_affciher = data;
- },
- complete: function() {
- if(ententePrealable=="2")
- {
- mettremailattente(donnees_sav);
- }
- $("#totam_donnees").html(donnee_a_affciher);
- }
- });
- // }
-}
-
-function supprimer_acte_medical_selection(idPrestationactes, codeTypePrestation)
-{
- donnee_a_affciher = "";
-
- /*
- v_msg="Confirmez-vous la suppression de cet acte ?";
- v_msgEng="Do you confirm the removal of this act ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- */
- codeFamilleActe=$("#codeFamilleActe").val();
-
- donnees = 'codeFamilleActe='+codeFamilleActe+'&idPrestationactes='+idPrestationactes+'&codeTypePrestation='+codeTypePrestation;
-
- // alert(donnees);
- // return;
-
- $("#listeacte").html('' + '' + '
');
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxselectactesmedicaux/supprimeracte/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- donnee_a_affciher = data;
- // maj_fraisexclu_cso();
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- $("#totam_donnees").html(donnee_a_affciher);
- }
- });
- // }
-}
-
-function valider_selection_acte()
-{
- v_msg="Confirmez-vous cette saisie?";
- v_msgEng="Do you confirm this situation ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- feuillemaladie();
- }
-}
-
-
-function ajax_maj_qte_acte(idPrestationactes, quantite, controle)
-{
- quantite=quantite.replace(",",".");
- controle.value=quantite;
-
- if(controle_numerique(controle))
- {
- if(quantite==0)
- {
- controle.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite;
-
- // alert(donnees);
- // return;
-
- donnee_a_affciher = "";
-
- donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite;;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxactesmedicauxselect/majquantite/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- donnee_a_affciher = data;
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- $("#div_prestations").html(donnee_a_affciher);
- controle.focus();
- }
- });
- }
-}
-
-
-function selectionner_acte_possibles_select(codeFamilleActe, codeActe, familleActe, libelleActe)
-{
- if(libelleActe<=" ")
- return;
-
- $("#codeFamilleActe").val(codeFamilleActe);
- $("#libelleActe").val(libelleActe);
-
- ajaxactespossibles_selection();
-
- $("#close_pop_acte").click();
-}
-
-function afficher_pop_recherche_actes_possibles_select()
-{
- libelleActeSearch = $("#libelleActeSearch").val();
-
- if(libelleActeSearch<=" ")
- {
- return;
- }
-
- donnees = "valid=1&libelleActeSearch="+libelleActeSearch;
-
- $("#div_liste_actes_possibles").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteactespossiblesselect/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_liste_actes_possibles").html(data);
- }
- });
-}
-
-function ctrlkeypress_actes_possibles_select(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_actes_possibles_select();
- }
-}
-
-function selectionexamens()
-{
- window.location.assign($("#racineWeb" ).val()+"Selectexaemens/");
-}
-
-function ajaxexamenpossibles_selection()
-{
- codeFamilleActe=$("#codeFamilleActe").val();
-
- donnees = 'codeFamilleActe='+codeFamilleActe;
-
- $("#listeacte").html('' + '' + '
');
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxexamenspossiblesselection/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listeacte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ajouter_un_examen_selection(codeActe, prixActe, montantTm, aRembourser, ententePrealable)
-{
- donnee_a_affciher = "";
-
- codeFamilleActe=$("#codeFamilleActe").val();
-
- donnees=""
- donnees_sav="";
-
- if (codeActe<=" ")
- {
- v_msg="Veuillez sélectionner un acte !";
- v_msgEng="Please select an act!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- if(prixActe==0)
- {
- v_msg="Veuillez revoir le tarif !";
- v_msgEng="Please review rate !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- if(ententePrealable==1)
- {
- ententePrealable = "2";
- }
-
- donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable;
- donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser;
-
- numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
-
- donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable';
-
- typeSms="ententeprealable";
-
- // alert(donnees);
- // return;
-
- $("#listeacte").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxselectexamens/ajouterexamenprescription/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // maj_fraisexclu_cso();
-
- if(ententePrealable=="2")
- {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- }
- donnee_a_affciher = data;
- },
- complete: function() {
- if(ententePrealable=="2")
- {
- mettremailattente(donnees_sav);
- }
- $("#totam_donnees").html(donnee_a_affciher);
- }
- });
-}
-
-function retirerexamen_lab_selection(idExamen)
-{
-
- donnee_a_affciher = "";
-
- codeFamilleActe=$("#codeFamilleActe").val();
-
- donnees = 'codeFamilleActe='+codeFamilleActe+'&idExamen='+idExamen;
-
- $("#listeacte").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxselectexamens/retirerexamen/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- donnee_a_affciher = data;
- alerter_depassement_limite();
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- $("#totam_donnees").html(donnee_a_affciher);
- }
- });
-}
-
-function valider_selection_examen()
-{
- v_msg="Confirmez-vous cette saisie?";
- v_msgEng="Do you confirm this situation ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- afficher_laboratoire_cso();
- }
-}
-
-function selectionexamens_lab()
-{
- window.location.assign($("#racineWeb" ).val()+"Selectexaemenslab/");
-}
-
-function valider_selection_examen_lab()
-{
- v_msg="Confirmez-vous cette saisie?";
- v_msgEng="Do you confirm this situation ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- actualiser_laboratoire();
- }
-}
-
-function afficher_examensmedicaux()
-{
- window.location.assign($("#racineWeb" ).val()+"Examensmedicaux/");
-}
-
-function selectionexamens_cso()
-{
- window.location.assign($("#racineWeb" ).val()+"Selectexaemenscso/");
-}
-
-function valider_selection_examen_cso()
-{
- v_msg="Confirmez-vous cette saisie?";
- v_msgEng="Do you confirm this situation ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- afficher_examensmedicaux();
- }
-}
-
-function no_presciption()
-{
- facture=$("#facture").val();
-
- if (facture==1)
- {
- v_msg="Déjà facturé !";
- v_msgEng="Already charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- numOrd = $("#numOrd").val();
- noPrescription = $("#noPrescription").val();
-
- if (numOrd==0 && noPrescription==0)
- {
- v_msg="Confirmez-vous qu\'il n\'y a pas de prescription de médicaments?";
- v_msgEng="Do you confirm that there are no prescription drugs?";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- if (confirm(v_msg))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxenregistrerprescription/noprescription/",
- type : 'post',
- // data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- },
- complete: function() {
- feuillemaladie();
- }
- });
- }
- }
-}
-
-function prescrire_verre_opt()
-{
-// Ajout à la prescription
- /*
- nbActesVerres = $("#nbActesVerres").val();
-
- if (nbActesVerres>0)
- {
- v_msg="Veuillez sélectionner un verre !";
- v_msgEng="Please select a glass !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeOptique").focus();
- return;
- }
- */
-
- codePrestatairePrescription = $("#codePrestatairePrescription").val();
- codeOptique = $("#codeOptique").val();
-
- if (codeOptique<=" ")
- {
- v_msg="Veuillez sélectionner un verre !";
- v_msgEng="Please select a glass !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#codeOptique").focus();
- return;
- }
-
- donnees = 'codeOptique='+codeOptique;
- donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
-
- // alert(donnees);
- // return;
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/ajouterverreprescription/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#btn_close_pop_verre").click();
- // $("#livraison").html(data);
- },
- complete: function() {
- // alerter_depassement_limite();
- actualiser_opticien();
- }
- });
-
- //}
-
-// Fin Ajout à la prescription
-}
-
-function controle_longeur_passe(controle)
-{
- /*
- longueur = controle.value.length;
-
- if(longueur==0)
- {
- return false;
- }
-
- if(longueur<6)
- {
- v_msg="6 caractères minimum exigé!";
- v_msgEng="6 characters minmum required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- controle.value="";
- controle.focus();
- return false;
- }
- */
-}
-
-function ajax_maj_prix_medicament_pha(idMedicament, prix, controle)
-{
- prix=prix.replace(",",".");
- controle.value=prix;
-
- if(controle_numerique(controle))
- {
- if(prix==0)
- {
- controle.focus();
- v_msg="Veuillez saisir le prix !";
- v_msgEng="Please enter the price !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idMedicament='+idMedicament+"&prix="+prix;
-
- // alert("ajax_maj_prix_medicament_pha : "+donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majprixpha/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $("#medicaments").html(data);
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- controle.focus();
- }
- });
- }
-}
-
-function facture_sans_bon()
-{
- numeroBeneficiaire = $("#numeroBeneficiaire_C" ).val();
-
- if (numeroBeneficiaire<="0")
- {
- v_msg="Veuillez sélectionner un bénéficiaire !";
- v_msgEng="Please select an insured person!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb").val()+"Facturesansboncso/");
-}
-
-function nouvelle_sans_bon()
-{
- window.location.assign($("#racineWeb").val()+"Facturesansboncso/");
-}
-
-// js_facture_san_sbon
-
-function enregistrerfacture_sans_bon_temp()
-{
- codeMedecin = $("#codeMedecin").val();
- medecinManquant = $("#medecinManquant").val();
-
- if (codeMedecin<=" ")
- {
- v_msg="Veuillez sélectionner un médecin !";
- v_msgEng="Please select a doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#nomMedecin").focus();
- return;
- }
-
- if (codeMedecin=="ZZZZ" && medecinManquant<=" ")
- {
- v_msg="Veuillez saisir le nom du médecin non enregistré!";
- v_msgEng="Please enter the name of the non-registered doctor!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#medecinManquant").focus();
- return;
- }
-
- numeroBon = $("#numeroBon").val();
-
- if (numeroBon<=" ")
- {
- v_msg="Veuillez saisir le No de Bon !";
- v_msg +="\n";
- alert(v_msg);
- $("#numeroBon").focus();
- return;
- }
-
- dateFacture=$("#dateFacture").val();
-
- if (dateFacture<=" ")
- {
- v_msg="Veuillez saisir la date de la facture !";
- v_msg +="\n";
- alert(v_msg);
- $("#dateFacture").focus();
- return;
- }
-
- /*
- medecinManquant = $("#medecinManquant").val();
-
- if (medecinManquant<=" ")
- {
- v_msg="Veuillez saisir le Médecin!";
- v_msg +="\n";
- alert(v_msg);
- $("#medecinManquant").focus();
- return;
- }
- */
-
-
- observations = $("#observations").val();
- hospitalisation = $("#hospitalisation").val();
- tm = $("#tmFacture").val();
-
- donnees = 'observations='+observations+'&dateFacture='+dateFacture+'&hospitalisation='+hospitalisation+'&tm='+tm+'&numeroBon='+numeroBon+'&medecinManquant='+medecinManquant+'&codeMedecin='+codeMedecin;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/enregistrerfacturetemp/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_facture").html(data);
- },
- complete: function() {
- alerter_depassement_limite_sans_bon();
- }
- });
-}
-
-function enregistrerfacture_sans_bon()
-{
- enregistrerfacture_sans_bon_temp();
-
- medecinManquant = $("#medecinManquant").val();
-
- if (medecinManquant<=" ")
- {
- v_msg="Veuillez saisir le Médecin!";
- v_msg +="\n";
- alert(v_msg);
- $("#medecinManquant").focus();
- return;
- }
-
- dateFacture=$("#dateFacture").val();
-
- if (dateFacture<=" ")
- {
- v_msg="Veuillez saisir la date de la facture !";
- v_msg +="\n";
- alert(v_msg);
- $("#dateFacture").focus();
- return;
- }
-
- prixActe = $("#prixActe").val();
- if (prixActe==0)
- {
- v_msg="Rien à enregistrer!";
- alert(v_msg);
-
- return;
- }
-
- v_msg="Confirmez-vous cette facture ?";
- if (confirm(v_msg))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/validerfacturesansbon/",
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // maj_fraisexclu_cso();
- },
- complete: function() {
- alert("Validation effectuée avec succès!");
-
- afficher_beneficiaire_id();
- }
- });
- }
-}
-
-function ajax_maj_tm_facture(tm, controle)
-{
- donnees = 'tm='+tm;
-
- tm=tm.replace(",",".");
- controle.value=tm;
-
- if(controle_numerique(controle))
- {
- enregistrerfacture_sans_bon_temp();
- }
-}
-
-function ajax_maj_prix_acte(idPrestation, valeurActe, controle)
-{
- donnees = 'idPrestation='+idPrestation+"&valeurActe="+valeurActe;
-
- valeurActe=valeurActe.replace(",",".");
- controle.value=valeurActe;
-
- // alert("ajax_maj_prix_acte : "+donnees);
-
- if(controle_numerique(controle))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailfacturesansboncso/majprix/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture").html(data);
- },
- error: function(data) {
- },
- complete: function(data) {
- alerter_depassement_limite_sans_bon();
- }
- });
- }
-}
-
-
-function valider_facture_sans_bon_temp()
-{
- enregistrerfacture_sans_bon_temp();
-}
-
-function alerter_depassement_limite_sans_bon()
-{
- fraisExclu=$("#fraisExclu").val();
- fraisExclu = parseInt(fraisExclu);
-
- if (fraisExclu>0)
- {
- v_msg="Attention ! Dépassement de limite";
- v_msgEng="Warning ! Overflow";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-}
-
-function consulter_limite_avant_facturation_classique()
-{
- idFacture=$("#idFacture_C").val();
-
- if (idFacture==0)
- {
- v_msg="Pas encore facturée !";
- v_msgEng="Not yet charged !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
- window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureclassique/");
-}
-
-
-function pop_messagerie()
-{
- v_msg="Messagerie en cours de construction !";
- v_msgEng="Messaging under construction!";
-
- alert_ebene(v_msg, v_msgEng);
- return;
-
- /*
- nbMessagesNonLus = $("#timer").val();
- // alert("nbMessagesNonLus : "+nbMessagesNonLus);
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerieliste/",
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_messagerie").html(data);
- },
- complete: function() {
- $("#btn_pop_messagerie").click();
- }
- });
- */
-}
-
-
-
-function envoyer_messagerie(textMessage, idParent)
-{
- donnees = 'textMessage='+textMessage+"&idParent="+idParent;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- },
- complete: function() {
- }
- });
-}
-
-function repondre_message(idMessagerie, idParent, controle)
-{
- donnees = 'idMessagerie='+idMessagerie+'&idParent='+idParent;
-
- // alert(donnees);
- // return;
- // console.log(controle);
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessageriereponse/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- $("#div_messagerie_reponse").html(data);
- },
- complete: function() {
- repondu = $("#repondu").val();
- if(repondu=="1")
- {
- v_msg="Déjà répondu!";
- v_msgEng="Already answered!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- controle.parentElement.removeChild(controle);
- return;
- }
- else
- {$("#btn_pop_messagerie_reponse").click();
- }
- }
- });
-}
-
-function gerer_messagerie()
-{
- window.location.assign($("#racineWeb").val()+"Messagerie/");
-}
-
-function afficher_lite_messagerie()
-{
- donnees = "";
- donnees_retour = "";
-
- date1 = $("#date1").val();
- date2 = $("#date2").val();
-
- messageLu = $("#messageLu").val();
- textMessage = $("#textMessage").val();
-
- donnees += 'date1=' + date1;
- donnees += '&date2=' + date2;
- donnees += '&messageLu=' + messageLu;
- donnees += '&textMessage=' + textMessage;
-
- // alert(donnees);
- // return;
-
- $("#div_messagerie_gestion").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistemessagerie/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_messagerie_gestion").html(donnees_retour);
- $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
- }
- });
-}
-
-
-function enregistrer_repondre_message()
-{
- idMessagerie = $("#idMessagerie").val();
- idParent = $("#idParentReponse").val();
-
- textMessage = $("#textMessageReponse").val();
- textMessage = textMessage.trim();
-
- if (textMessage<=" ")
- {
- v_msg="Veuillez saisir la réponse!";
- v_msgEng="Please enter the answer!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#textMessageReponse").focus();
- return;
- }
-
- donnees = 'idMessagerie='+idMessagerie+"&idParent="+idParent+"&textMessage="+textMessage;
-
- // alert("enregistrer_repondre_message : "+donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerie/repondremessage/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- },
- complete: function() {
- $("#btn_pop_messagerie_reponse_quit").click();
- }
- });
-}
-
-function historique_message(idParent)
-{
- donnees = 'idParent='+idParent;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessageriehistorique/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- $("#div_messagerie_historique").html(data);
- },
- complete: function() {
- $("#btn_pop_messagerie_historique").click();
- }
- });
-}
-
-// btn_pop_messagerie_new
-function initiermessage()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerienew/",
- error: function(errorData) {
- },
- success: function(data) {
- $("#div_messagerie_new").html(data);
- },
- complete: function() {
- $("#btn_pop_messagerie_new").click();
- }
- });
-}
-
-function enregistrer_new_message()
-{
- textMessage = $("#textMessageNew").val();
- textMessage = textMessage.trim();
-
- if (textMessage<=" ")
- {
- v_msg="Veuillez saisir le message!";
- v_msgEng="Please enter the message!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#textMessageNew").focus();
- return;
- }
-
- donnees = 'textMessage='+textMessage+"&idParent=0";
-
- // alert("enregistrer_new_message : "+donnees);
- // return;
-
- $.ajax({
- // url: $("#racineWeb").val()+"Ajaxmessagerie/repondremessage/",
- url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- },
- complete: function() {
- $("#btn_pop_messagerie_new_quit").click();
- }
- });
-}
-
-function consultation_assureur()
-{
- dateFactureReelle = $("#dateFactureReelle").val();
-
- if (dateFactureReelle<=" ")
- {
- v_msg="Veuillez saisir la date de la consultation !";
- v_msg +="\n";
- alert(v_msg);
- $("#dateFactureReelle").focus();
- return;
- }
-
- if (prestation_possible_assureur())
- {
- $("#okId" ).val("1");
-
- // alert("dateFactureReelle : "+dateFactureReelle);
- // return;
-
- ajax_context_datefacture_reelle(dateFactureReelle);
- }
-}
-
-function prestation_possible_assureur()
-{
- enVigueur = $("#enVigueur_C").val();
- codeEtatBeneficiaire = $("#codeEtatBeneficiaire_C").val();
- etatbeneficiaire = $("#etatbeneficiaire_C").val();
- college_couvert = $("#college_couvert_C").val();
- derogation_en_cours = $("#derogation_en_cours_C").val();
- derogation_finger_en_cours = $("#derogation_finger_en_cours_C").val();
-
- datejour = $("#datejour_C").val();
-
- // modification du 14/07/2018 => factures antidatée
- dateFactureReelle = $("#dateFactureReelle").val();
-
-
- dateEffetPolice = $("#dateEffetPolice_C").val();
- dateEcheancePolice = $("#dateEcheancePolice_C").val();
-
- // A désactivé peut-être pour RADIANT
- if (enVigueur!="1")
- {
- v_msg="Attention! cette personne n'est pas en vigueur";
- v_msgEng="Warning! This person is not in force";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
-
- if (codeEtatBeneficiaire!="V")
- {
- alert("Attention! "+etatbeneficiaire);
- return false;
- }
-
- // Fin désactivation peut-être pour RADIANT
-
- if (college_couvert!="1" && derogation_en_cours<1)
- {
- v_msg="Attention! Cette personne n'a pas accès à ce centre";
- v_msgEng="Warning! This person does not have access to this center";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
-
- var td0 = new Date(dateEntreeBeneficiaire);
-
- // var td1 = new Date(datejour);
- // modification du 14/07/2018 => factures antidatée
- // var td1 = new Date(datejourOld);
- var td1 = $("#dateFactureReelle").datepicker("getDate");
- var td2 = new Date(dateEcheancePolice);
- var tdj = new Date(datejour);
-
- dt0=Math.round(Date.parse(td0)/(1000*3600*24));
- dt1=Math.round(Date.parse(td1)/(1000*3600*24));
- dt2=Math.round(Date.parse(td2)/(1000*3600*24));
- dtj=Math.round(Date.parse(tdj)/(1000*3600*24));
-
- if (dt1>dtj)
- {
- v_msg="Attention! Revoir la date date!";
- v_msgEng="Warning! Review the date!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
-
- if (dt1>dt2 || dt1"2000-01-01")
- {
- var tdd = new Date(dateSortieBeneficiaire);
- dtd=Math.round(Date.parse(tdd)/(1000*3600*24));
-
- if (dt1>dtd)
- {
- v_msg="Attention! cette personne n'est pas couverte à cette date!";
- v_msgEng="Warning! This person is not valid on this date!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
- }
-
-
- dateDeces_C=$("#dateDeces_C").val();
-
- if(dateDeces_C>"2000-01-01")
- {
- v_msg="Attention! personne décédée !";
- v_msgEng="Warning! Deceased !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return false;
- }
-
- return true;
-}
-
-function ajax_context_datefacture_reelle(dateFactureReelle)
-{
- donnees = 'dateFactureReelle='+dateFactureReelle;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdatefacturerelle/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- complete: function() {
- aller_a_la_consultatio();
- }
- });
-}
-
-function aller_a_la_consultatio()
-{
- window.location.assign($("#racineWeb" ).val()+"Consultation/");
-}
-
-function ajax_maj_qte_examen_lab(idExamen, quantite, controle)
-{
- quantite=quantite.replace(",",".");
- controle.value=quantite;
-
- if(controle_numerique(controle))
- {
- if(quantite==0)
- {
- controle.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idExamen='+idExamen+"&quantite="+quantite;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetaillaboratoire/majquantiteexam/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- alerter_depassement_limite();
- controle.focus();
- }
- });
- }
-}
-
-function ajax_maj_qte_examen_lab_select(idExamen, quantite, controle)
-{
- donnee_a_affciher = "";
-
- quantite=quantite.replace(",",".");
- controle.value=quantite;
-
- if(controle_numerique(controle))
- {
- if(quantite==0)
- {
- controle.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idExamen='+idExamen+"&quantite="+quantite;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxselectexamens/majquantiteexam/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $("#livraison").html(data);
- donnee_a_affciher = data;
- alerter_depassement_limite();
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- $("#totam_donnees").html(donnee_a_affciher);
- // alerter_depassement_limite();
- controle.focus();
- }
- });
- }
-}
-
-function ajax_maj_qte_examen_cso(idExamen, quantite, controle)
-{
- donnee_a_affciher = "";
-
- quantite=quantite.replace(",",".");
- controle.value=quantite;
-
- if(controle_numerique(controle))
- {
- if(quantite==0)
- {
- controle.focus();
- v_msg="Veuillez saisir la quantité !";
- v_msgEng="Please enter the quantity !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- return;
- }
-
- donnees = 'idExamen='+idExamen+"&quantite="+quantite;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailexamen/majquantiteexam/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#livraison").html(data);
- controle.focus();
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
- }
-}
-
-function actualiser_saisie_pharmacien()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailpharmacien/",
- // type : 'post',
- // data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#livraison").html(data);
- raffraichier_detail_prescription();
- },
- complete: function() {
- alerter_depassement_limite();
- }
- });
-}
-
-function lister_ged()
-{
- d1 = $("#d1").val();
- d2 = $("#d2").val();
- nomOrigine = $("#nomOrigine").val();
-
- donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
-
- $("#div_ged").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteged/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_ged").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ctrlkeypress_lister_ged(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- lister_ged();
- }
-}
-
-function check_ged(idGed, cheminFichier, controle)
-{
- donnees = "idGed="+idGed+"&cheminFichier="+cheminFichier;
-
- // alert(donnees);
- // console.log(donnees);
- // alert(cheminFichier);
- // console.log(cheminFichier);
- // return;
-
- // var cible_ged = $('#cible_ged');
- var ctrl_btn_ged = $("#btn_ged"+idGed);
- var ctrl_mess_not_found= $("#mess_not_found"+idGed);
- var ctrl_check = $("#ctrl_check"+idGed);
-
- // alert(controle.value);
- // return;
-
- // document.getElementById('bouton_'+id).innerHTML='Afficher le texte';
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxged/verifierexistancefichier/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- // alert(data);
-
- donnees_retour = data;
-
- if(donnees_retour=="1")
- {
- ctrl_btn_ged.show();
- }
- else
- {
- ctrl_mess_not_found.html("Not found");
- }
- },
- complete: function()
- {
- controle.style.display = 'none';
- ctrl_check.show();
- }
- });
-}
-
-function lister_ged_adherent()
-{
- d1 = $("#d1").val();
- d2 = $("#d2").val();
- nomOrigine = $("#nomOrigine").val();
-
- donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
-
- $("#div_ged").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistegedadherent/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_ged").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function lister_ged_beneficiaire_prest()
-{
- d1 = $("#d1").val();
- d2 = $("#d2").val();
- nomOrigine = $("#nomOrigine").val();
-
- donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
-
- $("#div_ged").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprest/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_ged").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function lister_ged_beneficiaire()
-{
- d1 = $("#d1").val();
- d2 = $("#d2").val();
- nomOrigine = $("#nomOrigine").val();
-
- donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
-
- $("#div_ged").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaire/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_ged").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function lister_ged_feuille_maladie()
-{
- d1 = $("#d1").val();
- d2 = $("#d2").val();
- nomOrigine = $("#nomOrigine").val();
-
- donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
-
- $("#div_ged").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistegedfeuillemaladie/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_ged").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function pop_ged_pharmacie()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlistegedpharmacie/",
- error: function(errorData) {
- alert("Erreur : "+errorData);
- },
- success: function(data)
- {
- // alert(data);
- // console.log(data);
- $("#div_ged").html(data);
- },
- complete: function() {
- $("#btn_pop_ged_pharmacie").click();
- }
- });
-}
-
-function save_enroleur(user_id)
-{
- if (user_id>"")
- {
- donnees = 'user_id='+user_id;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextbeneficiaire/saveenroleur/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- alert("Erreur : "+errorData);
- },
- complete: function() {
- }
- });
- }
-}
-
-
-/* ACTIVATION POPUP
-function imprimer_liste_assures()
-{
- $('#div_export_assures').html('');
-
- $("#btn_liste_assures").click();
- popalertmessagerie
-}
-*/
-
-function pop_dernier_messagerie()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerieliste/derniermessage/",
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dernier_messagerie").html(data);
- },
- complete: function() {
- $("#btn_pop_dernier_messagerie").click();
- }
- });
-}
-
-function marquer_dernier_message_comme_lu(idMessagerie, controle)
-{
- donnees = 'idMessagerie='+idMessagerie;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- },
- complete: function() {
- // controle.parentElement.removeChild(controle);
- $("#btn_close_pop_dernier_messagerie").click();
- }
- });
-}
-
-/*
-function fonction_test()
-{
- alert("fonction_test");
-}
-*/
-
-function isNumeric(num){
- return !isNaN(num)
-}
-
-function retirer_consommable(idConsommable)
-{
- donnees = 'idConsommable='+idConsommable;
-
- // alert(donnees);
- // return;
-
- v_msg="Confirmez-vous cette suppression?";
- v_msgEng="Do you Confirm this deletion?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommable/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $('#div_test_gabarit').html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- afficher_consommable();
- }
- });
- }
-}
-
-function retirer_consommable_tous()
-{
- v_msg="Confirmez-vous cette suppression?";
- v_msgEng="Do you Confirm this deletion?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteconsommables/retirerconsommabletous/",
- type: 'POST',
- success: function(data) {
- // $('#div_test_gabarit').html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- afficher_consommable();
- }
- });
- }
-}
-
-function valider_consommables()
-{
- v_msg="Confirmez-vous cette saisie?";
- v_msgEng="Do you confirm this situation ?";
- v_msg +="\n";
- v_msg +=v_msgEng;
- if (confirm(v_msg))
- {
- feuillemaladie();
- }
-}
-
-function imprimerdecompteprestataireaccord()
-{
- regle=$("#regle").val();
-
- // alert("regle : "+regle);
- // return;
-
-
- if( (regle!=1) && (regle!=9) )
- {
- v_msg="Pas encore validé par l\'asssureur";
- v_msgEng="Not yet validates by insurer!";
- v_msg +="\n";
- v_msg +=v_msgEng;
-
- alert(v_msg);
- return;
- }
-
- idReglement = $("#idReglement").val();
-
- // alert("imprimerdecompteprestataireaccord = "+idReglement);
- // return;
-
- if (idReglement>"0")
- {
- var div_wait = $('#div_wait');
- div_wait.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerdecompteprestataireaccord",
- type: 'POST',
- success: function(data)
- {
- div_wait.html(data);
- },
- error : function(resultat, statut, erreur)
- {
- alert(erreur);
- },
- complete: function(data)
- {
- }
- });
- }
-}
-
-
-function consulter_une_factures()
-{
- window.location.assign($("#racineWeb" ).val()+"Facturecons//");
-}
-
-function ctrlkeypressfacture(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- $("#idFacture").blur();
- }
-}
-
-function chercher_facture(idFacture)
-{
- $("#div_facture_detail").html('');
-
- $("#div_consulter_facture").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert(donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconsassure/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_consulter_facture").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulterfacturefeuillemaladie()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert(donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconsassure/feuillemaladie/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulterfactureprestationactes()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert("consulterfactureprestationactes : " + donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/prestationactes/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulterfacturemedicaments()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert("consulterfacturemedicaments : " + donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/medicaments/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulter_facture_pop(idFacture)
-{
- $("#div_facture_detail").html('');
-
- $("#div_consulter_facture_pop").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconspop/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_consulter_facture_pop").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- $('#btn_pop_consulter_facture').click();
- }
- });
-}
-
-function consulterfacturefeuillemaladie_pop()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert(donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconspop/feuillemaladie/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulterfactureprestationactes_pop()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert("consulterfactureprestationactes : " + donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconspop/prestationactes/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulterfacturemedicaments_pop()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert("consulterfacturemedicaments : " + donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconspop/medicaments/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulterfactureged_pop()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert("consulterfacturemedicaments : " + donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconspop/geds/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function reafficher_ged_facture(idFacture)
-{
- if (idFacture>"0")
- {
- donnees = 'idFacture='+idFacture;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxgedfacture/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_ged").html(data);
- },
- complete: function() {
- }
- });
- }
-}
-
-function valider_ged_facture()
-{
- // alert("valider_ged_facture");
- // return;
-
- idFacture = $("#idFactureGed").val();
- v_url = $("#racineWeb").val()+"Ajaxgedfacture/chargerged";
-
- donnees = "";
-
- donnees = new FormData($("#ajax_form_upload")[0]);
-
- $.ajax({
- type: "POST",
- url: v_url,
- data: donnees,
- contentType: false,
- cache: false,
- processData :false,
-
- success: function(message){
- alert(message);
- },
- error: function(errorData){
- alert("Error : "+errorData);
- },
- complete: function() {
- // reafficher_ged_facture(idFacture);
- }
- });
-}
-
-function consulterfactureged()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- // alert("consulterfacturemedicaments : " + donnees);
- // return;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/geds/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- }
- });
-}
-
-function enregistrer_nv_verres()
-{
- libelleOptique = $("#libelleOptique").val();
-
- if (libelleOptique<=" ")
- {
- v_msg="Veuillez saisir le nom !";
- v_msgEng="Please enter the name !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- $("#libelleOptique").focus();
- return;
- }
-
- prixVerre=$("#prixVerre").val();
- prixVerre=prixVerre.replace(",",".");
- $("#prixVerre").val(prixVerre);
-
- if(isNaN(prixVerre))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#prixVerre").val("0");
- $("#prixVerre").focus();
- return
- }
-
- if(prixVerre==0)
- {
- $("#prixVerre").focus();
- v_msg="Veuillez saisir le prix !";
- v_msgEng="Please enter the price !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'libelleOptique='+libelleOptique+'&prixVerre='+prixVerre;
-
- // alert(donnees);
- // return;
-
- // typeSms="ententeprealableopt";
-
- $.ajax({
- // url: $("#racineWeb").val()+"Ajaxlistemedicamentspha/creermedicament/",
- url: $("#racineWeb").val()+"Ajaxdetailopticien/creerverre/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- // $("#medicaments").html(data);
-
- $("#btn_close_pop_new_verre").click();
- $("#btn_close_pop_verre").click();
-
- // $("#div_test_gabarit").html(data);
-
- },
- error: function(data) {
- },
- complete: function() {
- actualiser_opticien();
- }
- });
-}
-
-function demander_accord_opt(idOptique)
-{
- donnees = 'idOptique='+idOptique;
-
- typeSms="ententeprealableopt";
-
- donnees_sav = 'idOptique='+idOptique+'&typeMail=mailententeprealableopt';
-
- // alert("demander_accord_opt : "+donnees);
- // return
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailopticien/demanderaccordopt/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- // raffraichir affichage
- $("#livraison").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- // alert("donnees_sav : "+donnees_sav);
- mettremailattente(donnees_sav);
- }
- });
-}
-
-function demander_accord_mont(idOptique)
-{
-
- prixPrestataire = $("#prixPrestataire").val();
-
- prixPrestataire=prixPrestataire.replace(",",".");
- $("#prixPrestataire").val(prixPrestataire);
-
- if(isNaN(prixPrestataire))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#prixPrestataire").val("0");
- $("#prixPrestataire").focus();
- return
- }
-
- if(prixPrestataire==0)
- {
- $("#prixPrestataire").focus();
- v_msg="Veuillez saisir le prix !";
- v_msgEng="Please enter the price !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
- return;
- }
-
- donnees = 'idOptique='+idOptique+'&prixPrestataire='+prixPrestataire;
-
- typeSms="ententeprealablemont";
-
- donnees_sav = donnees+'&typeMail=mailententeprealablemont';
-
- // alert(donnees_sav);
- // return
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmonture/demanderaccordmont/",
-
- type: 'POST',
- data: donnees,
- success: function(data) {
- preparesms(typeSms);
-
- v_msg="Demande accord prealable envoyée !";
- v_msgEng="Request prior agreement sent !";
- v_msg +="\n";
- v_msg +=v_msgEng;
- alert(v_msg);
-
- $("#div_monture").html(data);
- },
- error: function(data) {
- //alert(data);
- },
- complete: function() {
- mettremailattente(donnees_sav);
- }
- });
-}
-
-function listerfacturefamille()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturesfamille/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function listerfacture()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactures/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function dossiers_famille()
-{
- window.location.assign($("#racineWeb" ).val()+"Dossiersfamille/");
-}
-
-function dossiers()
-{
- window.location.assign($("#racineWeb" ).val()+"Dossiers/");
-}
-
-// listerdossier_famille
-
-function listerdossier()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdossiers/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function listerdossier_famille()
-{
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdossiersfamille/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ctrlkeypress_prestataire(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_prestataire();
- }
-}
-
-function ctrlkeypress_prestataire2(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_pop_recherche_prestataire2();
- }
-}
-
-function afficher_pop_recherche_prestataire()
-{
- codesearch = $("#codesearch").val();
- nomsearch = $("#nomsearch").val();
-
- if(codesearch+nomsearch<=" ")
- return;
-
- donnees = "valid=1&codesearch="+codesearch+"&nomsearch="+nomsearch;
-
- $("#div_listeprestataires").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteprestataires/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_listeprestataires").html(data);
- }
- });
-}
-
-function afficher_pop_recherche_prestataire2()
-{
- codesearch = $("#codesearch2").val();
- nomsearch = $("#nomsearch2").val();
-
- if(codesearch+nomsearch<=" ")
- return;
-
- donnees = "valid=1&codesearch="+codesearch+"&nomsearch="+nomsearch;
-
- $("#div_listeprestataires").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteprestatairesb/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#div_listeprestataires").html(data);
- }
- });
-}
-
-
-function selectionner_prestataire(codePrestataire, nomPrestataire)
-{
- $("#codePrestataire").val(codePrestataire);
- $("#nomPrestataire").html(nomPrestataire);
- $("#close_pop").click();
-}
-
-
-function selectionner_prestataire2(codePrestataire, nomPrestataire)
-{
- $("#codePrestataire").val(codePrestataire);
- $("#nomPrestataire").html(nomPrestataire);
- $("#close_pop2").click();
-}
-
-
-function listerderogations()
-{
- codePrestataire=$("#codePrestataire").val();
- codeDerogation=$("#codeDerogation").val();
- codeReponseDerogation=$("#codeReponseDerogation").val();
- debut=$("#debut").val();
- fin=$("#fin").val();
-
- donnees = 'codePrestataire='+codePrestataire+'&codeDerogation='+codeDerogation+'&codeReponseDerogation='+codeReponseDerogation;
- donnees += '&debut='+debut+'&fin='+fin;
-
- $("#div_derogations").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxderogations/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- $("#div_derogations").html(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function reinitialiser_prestataire()
-{
- $("#codePrestataire").val("");
- $("#nomPrestataire").html("Tous / Rechercher Prestataire ...");
- $("#close_pop").click();
-}
-
-
-function reinitialiser_prestataire2()
-{
- $("#codePrestataire").val("");
- $("#nomPrestataire").html("Tous / Rechercher Prestataire ...");
- $("#close_pop2").click();
-}
-
-
-function consulter_derogation_2(idDemandederogation)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterderogations/"+idDemandederogation+"/");
-}
-
-function consulter_derogation(idDemandederogation)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterderogation/"+idDemandederogation+"/");
-}
-
-function liste_ententeprealables_mont()
-{
- window.location.assign($("#racineWeb" ).val()+"Listeententeprealablesmont/");
-}
-
-function liste_ententeprealables_opt()
-{
- window.location.assign($("#racineWeb" ).val()+"Listeententeprealablesopt/");
-}
-
-function listeententeprealables()
-{
- codePrestataire=$("#codePrestataire").val();
- codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val();
- debut=$("#debut").val();
- fin=$("#fin").val();
-
- donnees = 'codePrestataire='+codePrestataire+'&codeReponseEntentePrealable='+codeReponseEntentePrealable;
- donnees += '&debut='+debut+'&fin='+fin;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxententeprealables/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorDat);
- },
- success: function(data) {
- $("#div_ententeprealable").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function consulter_ententeprealable_2(idDemandeententeprealable)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterententeprealables/"+idDemandeententeprealable+"/");
-}
-
-function consulter_ententeprealable(idDemandeententeprealable)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterententeprealable/"+idDemandeententeprealable+"/");
-}
-
-
-function consulter_ententeprealable_pha_2(idDemandeententeprealable)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterententeprealablespha/"+idDemandeententeprealable+"/");
-}
-
-function consulter_ententeprealable_opt_2(idDemandeententeprealable)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterententeprealablesopt/"+idDemandeententeprealable+"/");
-}
-
-function consulter_ententeprealable_mont_2(idDemandeententeprealable)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterententeprealablesmont/"+idDemandeententeprealable+"/");
-}
-
-
-function liste_ententeprealables_pha()
-{
- window.location.assign($("#racineWeb" ).val()+"Listeententeprealablespha/");
-}
-
-function liste_ententeprealables()
-{
- window.location.assign($("#racineWeb" ).val()+"Listeententeprealables/");
-}
-
-function listeententeprealablespha()
-{
- codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val();
- debut=$("#debut").val();
- fin=$("#fin").val();
-
- donnees = 'codeReponseEntentePrealable='+codeReponseEntentePrealable;
- donnees += '&debut='+debut+'&fin='+fin;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxententeprealablespha/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorDat);
- },
- success: function(data) {
- $("#div_ententeprealable").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function listeententeprealablesopt()
-{
- codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val();
- debut=$("#debut").val();
- fin=$("#fin").val();
-
- donnees = 'codeReponseEntentePrealable='+codeReponseEntentePrealable;
- donnees += '&debut='+debut+'&fin='+fin;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxententeprealablesopt/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorDat);
- },
- success: function(data) {
- $("#div_ententeprealable").html(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function listeententeprealablesmont()
-{
-
- codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val();
- debut=$("#debut").val();
- fin=$("#fin").val();
-
- donnees = 'codeReponseEntentePrealable='+codeReponseEntentePrealable;
- donnees += '&debut='+debut+'&fin='+fin;
-
- // alert(donnees);
- // return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxententeprealablesmont/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorDat);
- },
- success: function(data) {
- $("#div_ententeprealable").html(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function fraisfuneraire()
-{
- fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val();
-
- if (fraisFuneraireDemande!=1)
- {
- v_msg="Aucune demande effectuée !";
- v_msg +="\n";
- alert(v_msg);
-
- return;
- }
-
- window.location.assign($("#racineWeb" ).val()+"Fraisfuneraire/");
-}
-
-function histsupprempreinte()
-{
- $("#div_detail_suppr_empreinte").html("");
-
- debut=$("#debut").val();
- fin=$("#fin").val();
-
- donnees = 'debut='+debut+'&fin='+fin;
-
- // alert(donnees);
- // return;
-
- $("#div_detail_suppr_empreinte").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxhistsupprempreinte/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorDat);
- },
- success: function(data) {
- $("#div_detail_suppr_empreinte").html(data);
- },
- complete: function() {
- }
- });
-}
-
-
-function afficher_lite_prestataire()
-{
- donnees = "";
- donnees_retour = "";
-
-
- codeTypePrestataire = $("#codeTypePrestataire").val();
- codeReseau = $("#codeReseau").val();
- libelle = $("#libelle").val();
-
- codePays = $("#codePays").val();
- codeVille = $("#codeVille").val();
- codeLocalite = $("#codeLocalite").val();
-
- donnees += 'codeTypePrestataire=' + codeTypePrestataire;
- donnees += '&codeReseau=' + codeReseau;
- donnees += '&libelle=' + libelle;
-
- donnees += '&codePays=' + codePays;
- donnees += '&codeVille=' + codeVille;
- donnees += '&codeLocalite=' + codeLocalite;
-
- // alert(donnees);
- // return;
-
- $("#div_liste_prestataire").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteprestataireparametrage/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_liste_prestataire").html(donnees_retour);
- $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
- }
- });
-}
-
-
-function afficher_prestataire_id(idPrestataire)
-{
- window.location.assign($("#racineWeb" ).val()+"Ficheprestataire/"+idPrestataire+"/");
-}
-
-
-function afficher_pharmacie(numeroBonOrdonnance, codePrestataireLivraison)
-{
- donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxcontextpharmaciencien/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- complete: function() {
- window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/");
- }
- });
-}
-
-// 06/04/2019
-
-// 06/04/2019
-function changer_langue()
-{
- codeLangue = $("#codeLangue").val();
-
- v_msg="Attention, vous serez déconnecté! Confirmez-vous le changement de langue?";
- v_msgEng="Attention, you will be logged out! Do you confirm the language change?";
-
-
- confirm_ebene(v_msg, v_msgEng)
- .then((isConfirmed) => {
- if (isConfirmed) {
- // L'utilisateur a confirmé
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxchangerlangue/changerlangue/",
- type : 'post',
- // data: donnees,
- error: function(errorData)
- {
- },
- success: function(data)
- {
- // $("#div_test_gabarit").html(data);
- },
- complete: function()
- {
- window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/");
- }
- });
- } else {
- // L'utilisateur a annulé
- console.log("Confirmation refusée");
- }
- });
-
-}
-
-function desactiver_click_droit()
-{
- if (document.addEventListener) {
- document.addEventListener('contextmenu', function (e) {
- e.preventDefault();
- }, false);
- } else {
- document.attachEvent('oncontextmenu', function () {
- window.event.returnValue = false;
- });
- }
-}
-
-
-function ajaxListerVille()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxville/",
- type : 'post',
- data: "codePays="+$("#codePays").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listeville").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ajaxListerLocalite()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlocalite/",
- type : 'post',
- data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listelocalite").html(data);
- }
- });
-}
-
-
-function ajaxListerVilleConsultation()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxville/consultation/",
- type : 'post',
- data: "codePays="+$("#codePays").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listeville").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function ajaxListerLocaliteConsultation()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlocalite/consultation/",
- type : 'post',
- data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(),
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- $("#listelocalite").html(data);
- }
- });
-}
-
-// 2019 06 17
-
-function enregistrer_new_notes()
-{
- notesNew = $("#notesNew").val();
- notesNew = notesNew.trim();
-
- if (notesNew<=" ")
- {
- v_msg="Veuillez saisir la note!";
- v_msgEng="Please enter the note!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#notesNew").focus();
- return;
- }
-
- donnees = 'notesNew='+notesNew;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/creernote/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data)
- {
- $("#btn_pop_note_new_quit").click();
- },
- complete: function() {
- afficher_notes_feuille();
- }
- });
-}
-
-function afficher_notes_feuille()
-{
- $("#div_notes").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/",
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_notes").html(donnees_retour);
- }
- });
-}
-
-function initiernotesfeuille()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/nouvellenote/",
- error: function(errorData) {
- },
- success: function(data)
- {
- $("#div_note_new").html(data);
- },
- complete: function() {
- $("#btn_pop_note_new").click();
- }
- });
-}
-
-
-function controle_numerique_new(idControle, oldValue)
-{
- controle = document.getElementById(idControle);
-
- // alert("oldValue => "+oldValue);
-
- valeur = controle.value;
-
- if(isNaN(valeur))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- alert_ebene(v_msg, v_msgEng);
-
- controle.value=oldValue;
- controle.focus();
- return false;
- }
- // alert("On est OK");
- return true;
-}
-
-function supprimer_espace_string(p_mot)
-{
- p_mot = p_mot.trim();
- p_mot = p_mot.replace(" ", "");
- return p_mot;
-}
-
-function raffraichier_gabarit()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxgabarit/",
- success: function(data)
- {
- $("#div_ajaxgabarit").html(data);
-
- /*
- codeSociete = $("#codeSociete").val();
- vue = $("#vue").val();
-
- if(codeSociete != "1" && vue !="Connexion"){
-
- window.location.assign($("#racineWeb" ).val()+"Connexion/");
- }
- */
- },
- error: function(errorData)
- {
- // alert("Erreur : "+errorData);
- },
- complete: function()
- {
- $(".datepicker" ).datepicker();
-
- raffraichier_messagerie();
- }
- });
-}
-
-function connexion_cookie()
-{
- msgErreur=$("#msgErreur").val();
-
- donnees = 'msgErreur='+msgErreur;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconnexioncookie/",
- type: 'POST',
- data: donnees,
- success: function(data)
- {
- $("#div_ajaxconnexion").html(data);
- },
- error: function(errorData)
- {
- },
- complete: function()
- {
- var login = document.getElementById("login").value;
- if (login>" ")
- {
- $("#mdp").focus();
- }
- else
- {
- $("#login").focus();
- }
- }
- });
-}
-
-function ctrlkeypress_lite_prestataire(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_lite_prestataire();
- afficher_liste_prestataires_actifs();
- }
-}
-
-function retour_prestataire_id()
-{
- idPrestataire = $("#idPrestataire").val();
- afficher_prestataire_id(idPrestataire);
-}
-
-function afficher_garantieadherent_exo()
-{
- var div_attente = $('#div_gar_exo');
-
- exercieReference=$("#exercieReference").val();
-
- if (exercieReference<=" ")
- {
- v_msg="Veuillez sélectionner un exercice!";
- v_msgEng="Please select an exercise!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#exercieReference").focus();
-
- div_attente.html('');
-
- return;
- }
-
- donnees = 'exercieReference='+exercieReference;
-
- div_attente.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxplafondadherent/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- div_attente.html(data);
- },
- complete: function() {
- }
- });
-}
-
-function anteceentsmedicaux()
-{
- window.location.assign($("#racineWeb" ).val()+"Anteceentsmedicaux/");
-}
-
-function diagnosticsbeneficiaire()
-{
- window.location.assign($("#racineWeb" ).val()+"Diagnosticsconsbeneficiaire/");
-}
-
-function notesbeneficiaire()
-{
- window.location.assign($("#racineWeb" ).val()+"Notesbeneficiaire/");
-}
-
-function afficher_diagnostics_beneficiaire()
-{
- $("#div_dianostics").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdiagnosticsbeneficiaire/",
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_dianostics").html(donnees_retour);
- }
- });
-}
-
-function afficher_notes_beneficiaire()
-{
- $("#div_notes").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxnotesbeneficiaire/",
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_notes").html(donnees_retour);
- }
- });
-}
-
-function afficher_contacts_assureur()
-{
- window.location.assign($("#racineWeb" ).val()+"Infossassureur/");
-}
-
-function afficher_factures_feuille()
-{
- $("#div_detail_factures").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfacturesfeuille/",
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_detail_factures").html(donnees_retour);
- }
- });
-}
-
-function ctrlkeypressconsultation(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- $("#numeroBonConsultation").blur();
- }
-}
-
-function afficher_factures_consultation(numeroBonConsultation)
-{
- donnees = "numeroBonConsultation="+numeroBonConsultation;
-
- $("#div_detail_factures").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdossiercons/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_detail_factures").html(donnees_retour);
- }
- });
-}
-
-function test_online()
-{
- if(navigator.onLine)
- {
- $("#test_connexion").css('background-color', 'green');
- v_msg="Connexion OK!";
- v_msgEng="Connection OK";
- alert_ebene(v_msg, v_msgEng);
-
- }
- else
- {
- $("#test_connexion").css('background-color', 'red');
- v_msg="Problème de Connexion!";
- v_msgEng="Connection Problem!";
- alert_ebene(v_msg, v_msgEng);
- }
- return;
-}
-
-function raffraichier_messagerie()
-{
- deconnexion='0';
- if(navigator.onLine)
- {
- //$("#test_connexion").css('background-color', 'green');
- c_html = "";
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerie/",
- success: function(data) {
- c_html = data;
- },
- error: function(errorData) {
- },
- complete: function() {
- $("#nbMessagesNonLus").html(c_html);
- // Ajout du 27/10/2024 => déconnecter si session expirée
-
- deconnexion=$("#deconnexion").val();
-
- if(deconnexion=='1')
- {
- window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/");
- }
- }
- });
- }
- else
- {
- $("#test_connexion").css('background-color', 'red');
- return;
- }
-}
-
-
-function consulterfactureverres()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return;
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconsprestataire/verres/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- },
- complete: function() {
- }
- });
-}
-
-
-function consulterfactureverres_pop()
-{
- idFacture = $("#idFacture").val();
-
- $("#div_facture_detail").html('' + '' + '
');
-
- donnees = 'idFacture='+idFacture;
-
- if(isNaN(idFacture))
- {
- v_msg="Valeur numérique exigée!";
- v_msgEng="Numeric value required!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#idFacture").val("0");
- $("#idFacture").focus();
- return;
- }
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxfactureconspop/verres/",
- type: 'POST',
- data: donnees,
- success: function(data) {
- $("#div_facture_detail").html(data);
- },
- error: function(data) {
- },
- complete: function() {
- }
- });
-}
-
-function consulter_remplacer_medicament()
-{
- $("#div_liste_medicaments_remplaces").html('' + '' + '
');
-
- $('#btn_medicaments_remplaces').click();
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdetailprescription/consulterremplacement/",
- type: 'POST',
- success: function(data) {
- $("#div_liste_medicaments_remplaces").html(data);
- },
- error: function(data) {
- },
- complete: function()
- {
- // $('#btn_medicaments_remplaces').click();
- }
- });
-}
-
-function afficher_garantieadherent_entete_contrat()
-{
- var div_attente = $('#div_gar_exo');
-
- idEntetecontrat=$("#idEntetecontrat").val();
-
- if (idEntetecontrat<="0")
- {
- v_msg="Veuillez sélectionner une période!";
- v_msgEng="Please select a period!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#idEntetecontrat").focus();
-
- div_attente.html('');
-
- return;
- }
-
- // donnees = 'exercieReference='+exercieReference;
- donnees = 'idEntetecontrat='+idEntetecontrat;
-
- div_attente.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxplafondadherent/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- div_attente.html(data);
- },
- complete: function() {
- }
- });
-}
-
-function afficher_garantiebeneficiaire_entete_contrat()
-{
- var div_attente = $('#div_gar_exo');
-
- idEntetecontrat=$("#idEntetecontrat").val();
-
- if (idEntetecontrat<="0")
- {
- v_msg="Veuillez sélectionner une période!";
- v_msgEng="Please select a period!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#idEntetecontrat").focus();
-
- div_attente.html('');
-
- return;
- }
-
- donnees = 'idEntetecontrat='+idEntetecontrat;
-
- div_attente.html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxplafondbeneficiaire/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- div_attente.html(data);
- },
- complete: function() {
- }
- });
-}
-
-function afficher_liste_prestataires_actifs()
-{
- donnees = "";
- donnees_retour = "";
-
-
- codeTypePrestataire = $("#codeTypePrestataire").val();
- codeReseau = $("#codeReseau").val();
- libelle = $("#libelle").val();
-
- codePays = $("#codePays").val();
- codeVille = $("#codeVille").val();
- codeLocalite = $("#codeLocalite").val();
-
- donnees += 'codeTypePrestataire=' + codeTypePrestataire;
- donnees += '&codeReseau=' + codeReseau;
- donnees += '&libelle=' + libelle;
-
- donnees += '&codePays=' + codePays;
- donnees += '&codeVille=' + codeVille;
- donnees += '&codeLocalite=' + codeLocalite;
-
- // alert(donnees);
- // return;
-
- $("#div_liste_prestataire").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlisteprestataireparametrage/prestatairesactifs/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_liste_prestataire").html(donnees_retour);
- dataTableSpeciale();
- $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
- }
- });
-}
-
-function ctrlkeypress_liste_prestataires_actif(ev)
-{
- var keycode = (ev.keyCode ? ev.keyCode : ev.which);
- if(keycode == '13')
- {
- afficher_liste_prestataires_actifs();
- }
-}
-
-// 12-07-2021
-
-$(function(){
-
- appliquerDataTable();
- dataTableSpeciale();
-
- $("#div_selection_prestataire").hide();
-
-
- if($('#nomForm').val() == "frmDetailBaremeCollege" || $('#nomForm').val() == "frmConsulterDetailBaremeCollege"){
- afficherDetailBaremeCollege();
- }
-
- if($('#nomForm').val() == "historembdirect")
- {
- listerremboursement();
- }
-
- if($('#nomForm').val() == "histocontest")
- {
- listerdossiercontestes();
- }
-
-
-
-});
-
-// Applique la librairie DataBase sur les tableaux
-function appliquerDataTable(){
-
- var sc = $(window).scrollTop(),
- dh = $(document).height(),
- ch = $(window).height();
- scrollPercent = (sc / (dh-ch)) * 100;
-
- try{
- var oTable = $('.tabliste').DataTable({
- "lengthMenu": [ 50, 100, 150],
- "scrollX": true,
- "scrollY": "75vh",
- "pagingType": "full_numbers",
- "autoWidth": false,
- "language": {
- "lengthMenu":"Affiche _MENU_ par page",
- "zeroRecords": "Désolé - Aucune donnée trouvée",
- "info": "_PAGE_ sur _PAGES_ pages",
- "infoEmpty": "Pas d'enregistrement",
- "search": "Recherche:",
- "paginate": {
- "next": ">>",
- "previous": "<<",
- "first": "|<",
- "last": ">|"
- },
- "infoFiltered": "(filtré de _MAX_ total enregistrements)"
- }
- });
-
- }
- catch(err){
- return false;
- }
-
-}
-
-function dataTableSpeciale(){
- const oTable = $('.tabspeciale');
- var codeLangue = $("#codeLangue").val();
-
- // Détruire l'instance existante si elle existe
- if ($.fn.DataTable.isDataTable(oTable)) {
- table.DataTable().destroy();
- table.empty(); // Optionnel : vider le contenu si nécessaire
- }
-
- try{
- if(codeLangue=="en_US")
- {
- oTable.DataTable({
- destroy: true,
- responsive: true,
- "lengthMenu": [ 25, 50, 100],
- "scrollX": true,
- "scrollY": "75vh",
- "pagingType": "full_numbers",
- "autoWidth": false,
- "bFilter": false,
- "ordering": false,
- "bLengthChange": false,
- "orderMulti": true,
- "language": {
- "lengthMenu":"Display _MENU_ records per page",
- "zeroRecords": "Nothing found - sorry",
- "info": "Showing page _PAGE_ of _PAGES_",
- "infoEmpty": "No records available",
- "search": "Search:",
- "paginate": {
- "next": "►",
- "previous": "◄",
- "first": "|◄",
- "last": "►|"
- },
- "infoFiltered": "(filtered from _MAX_ total records)"
- }
- });
- }else{
- oTable.DataTable({
- destroy: true,
- responsive: true,
- "lengthMenu": [ 25, 50, 100],
- "scrollX": true,
- "scrollY": "75vh",
- "pagingType": "full_numbers",
- "autoWidth": false,
- "bFilter": false,
- "ordering": false,
- "bLengthChange": false,
- "orderMulti": true,
- "language": {
- "lengthMenu":"Affiche _MENU_ par page",
- "zeroRecords": "Désolé - Aucune donnée trouvée",
- "info": "_PAGE_ sur _PAGES_ pages",
- "infoEmpty": "Pas d'enregistrement",
- "search": "Recherche:",
- "paginate": {
- "next": "►",
- "previous": "◄",
- "first": "|◄",
- "last": "►|"
- },
- "infoFiltered": "(filtré de _MAX_ total enregistrements)"
- }
- });
- }
-
- //$('.tabspeciale').columns.adjust().draw();
- }
- catch(err){
- return false;
- }
-}
-
-function dataTableSpecialeMini(){
- try{
- $('.tabspecialemini').DataTable({
- "lengthMenu": [ 50, 100, 150],
- "scrollX": true,
- "scrollY": "34vh",
- "pagingType": "full_numbers",
- "autoWidth": false,
- "bFilter": false,
- "bLengthChange": false,
- "orderMulti": true,
- "language": {
- "lengthMenu":"Affiche _MENU_ par page",
- "zeroRecords": "Désolé - Aucune donnée trouvée",
- "info": "_PAGE_ sur _PAGES_ pages",
- "infoEmpty": "Pas d'enregistrement",
- "search": "Recherche:",
- "paginate": {
- "next": ">>",
- "previous": "<<",
- "first": "|<",
- "last": ">|"
- },
- "infoFiltered": "(filtré de _MAX_ total enregistrements)"
- }
- });
-
- }
- catch(err){
- return false;
- }
-}
-
-function afficherMasquerDepenses()
-{
- masquerDepenses = $("#masquerDepenses").val();
-
- const element = document.getElementById("chevron-prestation");
-
- if(masquerDepenses=="1"){
- $('#div_depenses').hide();
- $("#masquerDepenses").val("0");
- $("#span_depenses").text("Afficher");
-
- element.classList.remove("bi-chevron-up");
- element.classList.add("bi-chevron-down");
-
- }else{
- $('#div_depenses').show();
- $("#masquerDepenses").val("1");
- $("#span_depenses").text("Masquer");
-
- element.classList.remove("bi-chevron-down");
- element.classList.add("bi-chevron-up");
- }
-
-}
-
-function afficherMasquerGaranties()
-{
- masquerGarantie = $("#masquerGarantie").val();
-
- const element = document.getElementById("chevron-garantie");
-
- if(masquerGarantie=="1"){
- $('#div_garantie').hide();
- $("#masquerGarantie").val("0");
- $("#span_garantie").text("Afficher");
- $('#div_garantie').css('margin-bottom', '0px');
-
- element.classList.remove("bi-chevron-up");
- element.classList.add("bi-chevron-down");
- }else{
- $('#div_garantie').show();
- $("#masquerGarantie").val("1");
- $("#span_garantie").text("Masquer");
- //$('#div_benef').hide();
- $('#div_garantie').css('margin-bottom', '180px');
-
- element.classList.remove("bi-chevron-down");
- element.classList.add("bi-chevron-up");
-
- }
-
-}
-
-
-function afficherhistoriqueadherent(numeroAdherent){
-
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- codeGarantie=$("#codeGarantie").val();
-
- donnees = "numeroAdherent="+numeroAdherent+"&codeGarantie="+codeGarantie;
- donnees += '&d1='+d1+'&d2='+d2;
-
- $("#div_prestation").html('' + '' + '
');
-
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxhistoriqueprestation/prestations/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- $("#div_prestation").html(data);
-
- setTimeout(function() {
- functionDataTable();
- }, 1000);
-
-
- },
- complete: function() {
-
- }
- });
-
-}
-
-function afficherMasquerBareme()
-{
- masquerBareme = $("#masquerBareme").val();
-
- const element = document.getElementById("chevron-plafond");
-
- if(masquerBareme=="1"){
- $('#div_bareme').hide();
- $("#masquerBareme").val("0");
- $("#span_bareme").text("Afficher");
-
- element.classList.remove("bi-chevron-up");
- element.classList.add("bi-chevron-down");
- }else{
- $('#div_bareme').show();
- $("#masquerBareme").val("1");
- $("#span_bareme").text("Masquer");
-
- element.classList.remove("bi-chevron-down");
- element.classList.add("bi-chevron-up");
- }
-
-}
-
-/*
-document.addEventListener("DOMContentLoaded", function() {
- // Récupérez la barre de progression
- var progressBar = document.querySelector('.progress-bar');
-
- // Récupérez la valeur de l'attribut data-value
- var value = parseInt(progressBar.getAttribute('data-value'));
-
- // Mettez à jour la largeur de la barre de progression
- progressBar.style.width = value + '%';
- progressBar.setAttribute('aria-valuenow', value);
-});
-*/
-
-function modifier_beneficiaire()
-{
- if ($("#idBeneficiaire_C" ).val()>"")
- {
- window.location.assign($("#racineWeb" ).val()+"Modifierbeneficiaire/"+$("#idBeneficiaire_C").val()+"/");
- }
-}
-
-
-function functionDataTable(){
- var tab = '';
-
- tab = $('#tableLister');
-
-
- try{
- tab.DataTable({
- responsive: true,
- "lengthMenu": [ 25, 50, 100],
- "scrollX": true,
- "scrollY": "75vh",
- "pagingType": "full_numbers",
- "autoWidth": false,
- "language": {
- "lengthMenu":"Affiche _MENU_ par page",
- "zeroRecords": "D\u00e9sol\u00e9 - Aucune donn\u00e9e trouv\u00e9e",
- "info": "_PAGE_ sur _PAGES_ pages",
- "infoEmpty": "Pas d'enregistrement",
- "search": "Recherche:",
- "paginate": {
- "next": "►",
- "previous": "◄",
- "first": "|◄",
- "last": "►|"
- },
- "infoFiltered": "(filtr\u00e9 de _MAX_ total enregistrements)"
- }
- });
-
-
- }
- catch(err){
- return false;
- }
-
-}
-
-
-function changer_entite_portail()
-{
- codeSociete=$("#codeSociete").val();
-
- if (codeSociete<=" ")
- {
- v_msg="Veuillez indiquer une entité!";
- v_msgEng="Please indicate an entity!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#codeSociete").focus();
- return;
- }
-
- //alert(codeSociete);
- //return;
-
- donnees = 'codeSociete='+codeSociete;
-
- v_url = $("#racineWeb").val()+"Ajaxchangerentiteportail/";
-
- $("#div_login_portail").html('' + '' + '
');
-
- $.ajax({
- url: v_url,
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert('success :' + errorData);
- $("#div_login_portail").html(errorData);
- },
- success: function(data) {
- // alert('success :' + data);
- $("#div_login_portail").html(data);
- societeExiste = $("#societeExiste").val();
- entiteActive = $("#entiteActive").val();
-
- if(societeExiste=="1" && entiteActive=="1")
- {
- $("#btn_connexion").enable();
- $("#login").focus();
-
- }else
- {
- $("#btn_connexion").disable();
- }
- }
- });
-}
-
-function changer_langue_connexion()
-{
- codeLangue = $("#langue").val();
- donnees = 'codeLangue='+codeLangue;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconnexioncookie/changerlangue/",
- type : 'post',
- data: donnees,
- error: function(errorData)
- {
- },
- success: function(data)
- {
- $("#div_detail_connexion").html(data);
- },
- complete: function()
- {
- $(".selectpicker").selectpicker();
- }
- });
-
-}
-
-function change_password()
-{
-
- v_msg="Attention, vous serez déconnecté par la suite! Voulez-vous changer votre mot de passe?";
- v_msgEng="Attention, you will be logged out afterwards! Do you want to change your password?";
-
- confirm_ebene(v_msg, v_msgEng)
- .then((isConfirmed) => {
- if (isConfirmed) {
- // L'utilisateur a confirmé
- window.location.assign($("#racineWeb" ).val()+"Changermotpass/");
- } else {
- // L'utilisateur a annulé
- console.log("Confirmation refusée");
- }
- });
-}
-
-function consulter_detail_bareme_college(idBaremePriseEnCharge)
-{
- window.location.assign($("#racineWeb" ).val()+"Consulterdetailbaremecollege/"+idBaremePriseEnCharge+"/");
-}
-
-function retour_fiche_consulter_bareme()
-{
- var retour = $('#retour').val();
-
- if(retour=="Ficheadherent"){
- afficher_adherent_id();
- }else{
- afficher_beneficiaire_id();
- }
-
-}
-
-/*
-
-function afficherMasquerDepenses()
-{
- masquerDepenses = $("#masquerDepenses").val();
-
- const element = document.getElementById("chevron-prestation");
-
- if(masquerDepenses=="1"){
- $('#div_depenses').hide();
- $("#masquerDepenses").val("0");
- $("#span_depenses").text("Voir");
-
- element.classList.remove("bi-chevron-up");
- element.classList.add("bi-chevron-down");
-
- }else{
- $('#div_depenses').show();
- $("#masquerDepenses").val("1");
- $("#span_depenses").text("Masquer");
-
- element.classList.remove("bi-chevron-down");
- element.classList.add("bi-chevron-up");
- }
-
-}
-
-
-*/
-
-function afficherDetailBaremeCollege()
-{
- masquerBareme = $("#masquerBareme").val();
-
- const element = document.getElementById("chevron-bareme");
-
- if(masquerBareme == undefined){
- masquerBareme = "1";
- }
-
- if(masquerBareme=="1"){
- $('#div_bareme').hide();
- $("#masquerBareme").val("0");
- //$("#span_bareme").text("[+]");
- element.classList.remove("bi-chevron-up");
- element.classList.add("bi-chevron-down");
-
- }else{
- $('#div_bareme').show();
- $("#masquerBareme").val("1");
- //$("#span_bareme").text("[-]");
-
- element.classList.remove("bi-chevron-down");
- element.classList.add("bi-chevron-up");
-
- actualiser_detailbareme_college();
- }
-
- afficheNombreLigneBaremeCollege('detailbareme');
-}
-
-
-function afficheNombreLigneBaremeCollege(table)
-{
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxnbrelignebaremecollege/"+table+"/",
- type : 'post',
- data: "table="+table,
- error: function(errorData) {
- },
- success: function(data) {
- if(table=="garantiesbaremepriseencharge"){
- $("#garantiesbaremepriseencharge").html(data);
- }else if(table=="garantiesbaremepriseenchargelienparente"){
- $("#garantiesbaremepriseenchargelienparente").html(data);
- }else if(table=="actesbaremepriseencharge"){
- $("#actesbaremepriseencharge").html(data);
- }else if(table=="actesbaremepriseenchargelienparente"){
- $("#actesbaremepriseenchargelienparente").html(data);
- }else if(table=="detailbareme"){
- $("#detailbareme").html(data);
- }
- },
- complete: function() {
-
- }
- });
-}
-
-function actualiser_detailbareme_college()
-{
- idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
-
- donnees = 'idBaremePriseEnCharge='+idBaremePriseEnCharge;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinsererdetailbaremecollege/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- //alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
- $('#div_bareme').html(data);
-
-
- },
- complete: function() {
-
- }
- });
-
-}
-
-function afficher_consulter_actes_garantiebareme(idBaremePriseEnCharge, codeGarantie){
-
-
- donnees = 'codeGarantie='+codeGarantie;
- donnees += '&idBaremePriseEnCharge='+idBaremePriseEnCharge;
-
- $("#div_patienter").html('');
-
- $("#div_patienter").html('' + '' + '
');
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsulteractesgarantiebareme/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- //alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
-
-
- $('#div_actesgarantiebareme').html(data);
- $('#div_actesgarantiebareme').modal("show");
-
- appliquerDataTableBareme();
-
- $('#div_actesgarantiebareme').on('shown.bs.modal', function(){
- stylechampsRequis();
- });
-
- afficherMasquerGarantiesBaremeCollege();
- afficherMasquerGarantiesBaremeLienParenteCollege();
- afficherMasquerActeBaremeCollege();
- afficherMasquerActeBaremeLienParenteCollege();
-
- $(".datepicker").datepicker();
- $("#codeActe").selectpicker();
- $("#codeActeLienParente").selectpicker();
- $("#div_patienter").html('');
- },
- complete: function() {
- afficheNombreLigneBaremeCollege('garantiesbaremepriseencharge');
- afficheNombreLigneBaremeCollege('garantiesbaremepriseenchargelienparente');
- afficheNombreLigneBaremeCollege('actesbaremepriseencharge');
- afficheNombreLigneBaremeCollege('actesbaremepriseenchargelienparente');
- }
- });
-}
-
-function appliquerDataTableBareme(){
- try{
- $('.tabbareme').DataTable({
- "lengthMenu": [3, 6, 10],
- "scrollX": true,
- "scrollY": "20vh",
- "pagingType": "full_numbers",
- "autoWidth": true,
- "bFilter": false,
- "bLengthChange": false,
- "orderMulti": false,
- "orderCellsTop": true,
- "language": {
- "lengthMenu":"Affiche _MENU_ par page",
- "zeroRecords": "Désolé - Aucune donnée trouvée",
- "info": "_PAGE_ sur _PAGES_ pages",
- "infoEmpty": "Pas d'enregistrement",
- "search": "Recherche:",
- "paginate": {
- "next": "►",
- "previous": "◄",
- "first": "|◄",
- "last": "►|"
- },
- "infoFiltered": "(filtré de _MAX_ total enregistrements)"
- }
- });
-
- }
- catch(err){
- return false;
- }
-}
-
-function afficherMasquerGarantiesBaremeCollege()
-{
- masquerGarantie = $("#masquerGarantie").val();
-
-
- if(masquerGarantie == undefined){
- masquerGarantie = "1";
- }
-
- //alert(masquerGarantie);
-
- if(masquerGarantie=="1"){
- $('#div_garanties_masquer').hide();
- $("#masquerGarantie").val("0");
- $("#span_garantie").text("[+]");
-
- }else{
- $('#div_garanties_masquer').show();
- $("#masquerGarantie").val("1");
- //$("#dateEffetGarantie").focus();
-
- actualiser_bareme_garantie_college();
- $("#span_garantie").text("[-]");
-
- $("#masquerGarantieLienParente").val("1");
- $("#masquerActe").val("1");
- $("#masquerActeLienParente").val("1");
-
- afficherMasquerGarantiesBaremeLienParenteCollege();
- afficherMasquerActeBaremeCollege();
- afficherMasquerActeBaremeLienParenteCollege();
- }
-
- afficheNombreLigneBaremeCollege('garantiesbaremepriseencharge');
-}
-
-function afficherMasquerGarantiesBaremeLienParenteCollege()
-{
- masquerGarantieLienParente = $("#masquerGarantieLienParente").val();
-
-
-
- if(masquerGarantieLienParente == undefined){
- masquerGarantieLienParente = "1";
- }
-
- if(masquerGarantieLienParente=="1"){
- $('#div_garanties_lienparente_masquer').hide();
- $("#masquerGarantieLienParente").val("0");
- $("#span_garantie_lienparente").text("[+]");
-
- }else{
- $('#div_garanties_lienparente_masquer').show();
- $("#masquerGarantieLienParente").val("1");
-
- actualiser_bareme_garantie_lienparente_college();
- $("#span_garantie_lienparente").text("[-]");
-
- $("#masquerGarantie").val("1");
- $("#masquerActe").val("1");
- $("#masquerActeLienParente").val("1");
-
- afficherMasquerGarantiesBaremeCollege();
- afficherMasquerActeBaremeCollege();
- afficherMasquerActeBaremeLienParenteCollege();
- }
-
- afficheNombreLigneBaremeCollege('garantiesbaremepriseenchargelienparente');
-}
-
-function afficherMasquerActeBaremeCollege()
-{
- masquerActe = $("#masquerActe").val();
-
- if(masquerActe == undefined){
- masquerActe = "1";
- }
-
- if(masquerActe=="1"){
- $('#div_acte_masquer').hide();
- $("#masquerActe").val("0");
- $("#span_acte").text("[+]");
-
- }else{
- $('#div_acte_masquer').show();
- $("#masquerActe").val("1");
-
- actualiser_bareme_acte_college();
- $("#span_acte").text("[-]");
-
- $("#masquerGarantie").val("1");
- $("#masquerGarantieLienParente").val("1");
- $("#masquerActeLienParente").val("1");
-
- afficherMasquerGarantiesBaremeCollege();
- afficherMasquerGarantiesBaremeLienParenteCollege();
- afficherMasquerActeBaremeLienParenteCollege();
- }
-
- afficheNombreLigneBaremeCollege('actesbaremepriseencharge');
-}
-
-function afficherMasquerActeBaremeLienParenteCollege()
-{
- masquerActeLienParente = $("#masquerActeLienParente").val();
-
- if(masquerActeLienParente == undefined){
- masquerActeLienParente = "1";
- }
-
- if(masquerActeLienParente=="1"){
- $('#div_acte_lienparente_masquer').hide();
- $("#masquerActeLienParente").val("0");
- $("#span_acte_lienparente").text("[+]");
-
- }else{
- $('#div_acte_lienparente_masquer').show();
- $("#masquerActeLienParente").val("1");
-
- actualiser_bareme_acte_lienparente_college();
- $("#span_acte_lienparente").text("[-]");
-
- $("#masquerGarantie").val("1");
- $("#masquerGarantieLienParente").val("1");
- $("#masquerActe").val("1");
-
- afficherMasquerGarantiesBaremeCollege();
- afficherMasquerGarantiesBaremeLienParenteCollege();
- afficherMasquerActeBaremeCollege();
- }
-
- afficheNombreLigneBaremeCollege('actesbaremepriseenchargelienparente');
-}
-
-function stylechampsRequis(){
- var requis = $('input,select,textarea').filter('[required]:visible');
-
- requis.each(function(){
- $(this).focus(function(){
- $(this).css('borderColor','red');
- });
- $(this).blur(function(){
- $(this).css('borderColor','#cccccc');
- });
- });
-
-}
-
-function actualiser_bareme_garantie_college()
-{
- codeGarantie = $("#codeGarantie").val();
- idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
-
-
- donnees = 'codeGarantie='+codeGarantie;
- donnees += '&idBaremePriseEnCharge='+idBaremePriseEnCharge;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinsererbaremegarantiecollege/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- //alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
- $('#div_garanties_bareme').html(data);
-
-
- },
- complete: function() {
-
- }
- });
-
-}
-
-function actualiser_bareme_garantie_lienparente_college()
-{
- codeGarantie = $("#codeGarantie").val();
- idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
-
- donnees = 'codeGarantie='+codeGarantie;
- donnees += '&idBaremePriseEnCharge='+idBaremePriseEnCharge;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinsererbaremegarantielienparentecollege/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- //alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
- $('#div_garanties_bareme_lienparente').html(data);
-
-
- },
- complete: function() {
-
- }
- });
-
-}
-
-function actualiser_bareme_acte_college()
-{
- codeGarantie = $("#codeGarantie").val();
- idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
-
-
- donnees = 'codeGarantie='+codeGarantie;
- donnees += '&idBaremePriseEnCharge='+idBaremePriseEnCharge;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinsererbaremeactecollege/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- //alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
- $('#div_actes_bareme').html(data);
-
-
- },
- complete: function() {
-
- }
- });
-
-}
-
-function actualiser_bareme_acte_lienparente_college()
-{
- codeGarantie = $("#codeGarantie").val();
- idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
-
-
-
- donnees = 'codeGarantie='+codeGarantie;
- donnees += '&idBaremePriseEnCharge='+idBaremePriseEnCharge;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxinsererbaremeactelienparentecollege/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- //alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
- $('#div_actes_lienparente').html(data);
-
-
- },
- complete: function() {
-
- }
- });
-
-}
-
-
-function consosadherent(){
-
- var idAdherent = $('#idAdherent').val();
-
- $("#div_patienter").html('' + '' + '
');
-
- //Ajaxlimiteaddadherent
- donnees = 'idAdherent='+idAdherent;
-
- //alert(donnees);
- //return;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsosadherent/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
- $("#div_patienter").html('');
- $('#div_consos_adherent').html(data);
- $('#div_consos_adherent').modal("show");
- },
- complete: function() {
-
- }
- });
-}
-
-
-function consosbeneficiaire(){
- //\u00ea, \u00e9
-
- var idBeneficiaire = $('#idBeneficiaire').val();
-
- $("#div_patienter").html('' + '' + '
');
-
- //Ajaxlimiteaddadherent
- donnees = 'idBeneficiaire='+idBeneficiaire;
-
- //alert(donnees);
- //return;
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxconsosbeneficiaire/",
- type : 'post',
- data: donnees,
- error: function(errorData){
- alert("Erreur : "+errorData);
- },
- success: function(data) {
- //alert("Success : "+data);
- $("#div_patienter").html('');
- $('#div_consos_beneficiaire').html(data);
- $('#div_consos_beneficiaire').modal("show");
- },
- complete: function() {
-
- }
- });
-}
-
-
-function consulter_envois_sms()
-{
- donnees = "";
- donnees_retour = "";
-
- date1 = $("#date1").val();
- date2 = $("#date2").val();
-
- donnees += 'date1=' + date1;
- donnees += '&date2=' + date2;
-
- $("#div_sms").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdestinatairesms/consulter/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_sms").html(donnees_retour);
- $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
- }
- });
-}
-
-function consulter_envois_whatsapp()
-{
- donnees = "";
- donnees_retour = "";
-
- date1 = $("#date1").val();
- date2 = $("#date2").val();
-
- donnees += 'date1=' + date1;
- donnees += '&date2=' + date2;
-
- $("#div_sms").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdestinatairesms/consulterwhatsapp/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_sms").html(donnees_retour);
- $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
- }
- });
-}
-
-function consulter_envois_whatsapp_en_cours()
-{
- donnees = "";
- donnees_retour = "";
-
- date1 = $("#date1").val();
- date2 = $("#date2").val();
-
- donnees += 'date1=' + date1;
- donnees += '&date2=' + date2;
-
- $("#div_sms").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdestinatairesms/consulterwhatsappencours/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- donnees_retour = data;
- },
- complete: function() {
- $("#div_sms").html(donnees_retour);
- $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
- }
- });
-}
-
-function mettre_sms_commun_attente_assureur()
-{
- textMessage = $("#textMessageCommun").val();
- textMessage = textMessage.trim();
-
- if (textMessage<=" ")
- {
- v_msg="Veuillez saisir le message!";
- v_msgEng="Please enter the message!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#textMessageCommun").focus();
- return;
- }
-
- donnees = "textMessage="+textMessage;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdestinatairesms/mettrewhatsappattenteassureur/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
- // $('#div_test_gabarit').html(data);
- },
- complete: function() {
- v_msg="Messages mis dans la queue des envois!";
- v_msgEng="Messages in the queue!";
- alert_ebene(v_msg, v_msgEng);
- re_init_envoi_sms();
- }
- });
-}
-
-function mettre_sms_commun_attente_prestataire()
-{
- codePrestataire = $("#codePrestataire").val();
-
- if (codePrestataire<="0")
- {
- v_msg="Veuillez sélectionner un prestataire!";
- v_msgEng="Please select an insured!";
- alert_ebene(v_msg, v_msgEng);
- $("#codePrestataire").focus();
-
- return;
- }
-
- textMessage = $("#textMessageCommun").val();
- textMessage = textMessage.trim();
-
- if (textMessage<=" ")
- {
- v_msg="Veuillez saisir le message!";
- v_msgEng="Please enter the message!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#textMessageCommun").focus();
- return;
- }
-
- donnees = "textMessage="+textMessage;
- donnees += "&codePrestataire="+codePrestataire;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdestinatairesms/mettrewhatsappattenteprestataire/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
- // $('#div_test_gabarit').html(data);
- },
- complete: function() {
- v_msg="Messages mis dans la queue des envois!";
- v_msgEng="Messages in the queue!";
- alert_ebene(v_msg, v_msgEng);
- re_init_envoi_sms();
- }
- });
-}
-
-function mettre_sms_commun_attente_tous()
-{
- codePrestataire = $("#codePrestataire").val();
-
- if (codePrestataire<="0")
- {
- v_msg="Veuillez sélectionner un prestataire!";
- v_msgEng="Please select an insured!";
- alert_ebene(v_msg, v_msgEng);
- $("#codePrestataire").focus();
-
- return;
- }
-
- textMessage = $("#textMessageCommun").val();
- textMessage = textMessage.trim();
-
- if (textMessage<=" ")
- {
- v_msg="Veuillez saisir le message!";
- v_msgEng="Please enter the message!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#textMessageCommun").focus();
- return;
- }
-
- donnees = "textMessage="+textMessage;
- donnees += "&codePrestataire="+codePrestataire;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdestinatairesms/mettrewhatsappattenteassureurprestataire/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
- // $('#div_test_gabarit').html(data);
- },
- complete: function() {
- v_msg="Messages mis dans la queue des envois!";
- v_msgEng="Messages in the queue!";
- alert_ebene(v_msg, v_msgEng);
- re_init_envoi_sms();
- }
- });
-}
-
-function re_init_envoi_sms()
-{
- window.location.assign($("#racineWeb" ).val()+"Envoisms/");
-}
-
-function lienparente(){
-
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
-
- donnees = "numeroBeneficiaire="+numeroBeneficiaire;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxlienparente/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
- $('#div_lien').html(data);
- },
- complete: function() {
-
- }
- });
-
-}
-
-function affichelisteprestataires(libelle)
-{
- if(libelle!='' && libelle.length >="3")
- {
- var donnees = 'libelle='+ libelle;
-
- vLink = "Ajaxchargerlisteprestataires/";
- $.ajax({
- type: "POST",
- url: $("#racineWeb").val()+vLink,
- data:donnees,
- beforeSend: function(){
- $("#searchInputPrestataire").css("background","#FFF url(Bootstrap/images/LoaderIcon.gif) no-repeat 165px");
- },
- success: function(data){
- $("#div_selection_prestataire").show();
- $("#div_selection_prestataire").html(data);
- $("#searchInputPrestataire").css("background","#FFF");
- }
- });
- }else{
- $("#div_selection_prestataire").hide();
- return false;
- }
-}
-
-function selectPrestataire(code, libelle){
- nomForm = $("#nomForm").val();
-
- $("#searchInputPrestataire").val(libelle);
- $("#div_selection_prestataire").hide();
- $("#codePrestataire").val(code);
-}
-
-function estDateAnncienne(date) {
- // Obtenir la date d'aujourd'hui sans l'heure
-
-
- const aujourdHui = new Date();
- aujourdHui.setHours(0, 0, 0, 0); // Réinitialiser les heures pour une comparaison pure de dates
-
- // S'assurer que l'argument 'date' est un objet Date
- const dateComparee = new Date(date);
- dateComparee.setHours(0, 0, 0, 0); // De même, ignorer l'heure
-
- // Comparer les dates
- return dateComparee > aujourdHui;
-}
-
-function convertirEnFormatISO(dateStr) {
- // Détection et parsing de la date selon son format
- let day, month, year;
-
- // Format français (JJ/MM/AAAA)
- const matchFr = dateStr.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
- if (matchFr) {
- day = matchFr[1];
- month = matchFr[2];
- year = matchFr[3];
- }
- // Format anglais (MM/JJ/AAAA)
- else if (dateStr.match(/^(\d{2})\/(\d{2})\/(\d{4})$/)) {
- const matchEn = dateStr.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
- day = matchEn[2];
- month = matchEn[1];
- year = matchEn[3];
- }
- // Format ISO (AAAA-MM-JJ) - on la retourne directement
- else if (dateStr.match(/^(\d{4})-(\d{2})-(\d{2})$/)) {
- return dateStr; // Déjà au bon format
- }
- // Format non reconnu
- else {
- throw new Error("Format de date non reconnu");
- }
-
- // Validation de la date
- const date = new Date(`${year}-${month}-${day}`);
- if (isNaN(date.getTime())) {
- throw new Error("Date invalide");
- }
-
- // Formatage en AAAA-MM-JJ
- return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`;
-}
-
-
-function controle_date(dateSoin)
-{
-
-
- dateSoin = convertirEnFormatISO(dateSoin)
-
- if(estDateAnncienne(dateSoin))
- {
- v_msg="La date de soin doit être antérieure ou égale à la date du jour!";
- v_msgEng="The treatment date must be before or equal to today's date!";
-
- alert_ebene(v_msg, v_msgEng);
-
- $("#dateConsultation").val("");
- $("#dateConsultation").focus();
-
- return;
- }
-
-}
-
-function formatNumerique(controle){
- controle.value = controle.value.replace(/ /g,"");
- return;
-}
-
-function formatMonetaire(controle){
- controle.value = formatCurrency(controle.value);
- return;
-}
-
-var formatCurrency = function(num){
- var str = num.toString().replace("", ""), parts = false, output = [], i = 1, formatted = null;
- if(str.indexOf(".") > 0) {
- parts = str.split(".");
- str = parts[0];
- }
- str = str.split("").reverse();
- for(var j = 0, len = str.length; j < len; j++) {
- if(str[j] != " ") {
- output.push(str[j]);
- if(i%3 == 0 && j < (len - 1)) {
- output.push(" ");
- }
- i++;
- }
- }
- formatted = output.reverse().join("");
- return(formatted + ((parts) ? "." + parts[1].substr(0, 2) : ""));
-};
-
-function enregistrer_demande_remboursement()
-{
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
- commentaires = $("#commentaires").val();
-
- commentaires = commentaires.trim();
-
- if (commentaires<=" ")
- {
- v_msg="Le commentaire est obligatoire!";
- v_msgEng="Comment is required!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#commentaires").focus();
- return;
- }
-
-
- v_msg="Confirmez-vous l'enregistrement de votre demande?";
- v_msgEng="Do you confirm the registration of your request?";
-
- confirm_ebene(v_msg, v_msgEng)
- .then((isConfirmed) => {
- if (isConfirmed) {
- // L'utilisateur a confirmé
- donnees = 'numeroBeneficiaire='+ numeroBeneficiaire+'&commentaires='+commentaires;
- vLink = "Ajaxdemanderemboursement/enregistrerdemande/";
-
- $.ajax({
- type: "POST",
- url: $("#racineWeb").val()+vLink,
- data:donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
- // $('#div_test_gabarit').html(data);
-
- },
- complete: function() {
-
- actualiser_remboursement();
- }
-
- });
-
- } else {
- // L'utilisateur a annulé
- console.log("Confirmation refusée");
- }
- });
-
-}
-
-function listerremboursement()
-{
-
-
- d1 = $("#d1").val();
- d2 = $("#d2").val();
- codeEtatDemandeRemboursement = $("#codeEtatDemandeRemboursement").val();
-
- donnees = 'd1='+ d1+'&d2='+d2+'&codeEtatDemandeRemboursement='+codeEtatDemandeRemboursement;
-
- $("#div_dossiers").html('' + '' + '
');
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdemanderemboursement/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
-
-
- $('#div_dossiers').html(data);
- },
- complete: function() {
-
- }
- });
-}
-
-function selectionner_remboursement(idDemande)
-{
- donnees = 'idDemande='+idDemande;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdemanderemboursement/selectionnerremb/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
-
-
-
- },
- complete: function() {
- actualiser_remboursement();
- }
- });
-}
-
-function actualiser_remboursement()
-{
- window.location.assign($("#racineWeb" ).val()+"Remboursement/");
-
-}
-
-function liste_contestation()
-{
- window.location.assign($("#racineWeb" ).val()+"Historiquecontestation/");
-
-}
-
-
-function listerdossiercontestes()
-{
-
-
- d1=$("#d1").val();
- d2=$("#d2").val();
-
- donnees = 'd1='+d1+'&d2='+d2;
-
- $("#div_dossiers").html('' + '' + '
');
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdossierscontestes/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- // alert("Erreur : "+errorData);
- },
- success: function(data) {
-
-
- $("#div_dossiers").html(data);
- },
- complete: function() {
- }
- });
-}
-
-function reactiver_contestation(numeroFeuilleMaladie)
-{
- let v_msg = "Veuillez saisir le motif de la réactivation de ce dossier médical!";
- let v_msgEng = "Please enter the reason for reactivating this medical record!";
-
- prompt_ebene(v_msg, v_msgEng, "", function(motif_activation) {
- if (!motif_activation || motif_activation.trim() === "") {
- v_msg = "Vous devez saisir un motif!";
- v_msgEng = "You have to enter a reason!";
- alert_ebene(v_msg, v_msgEng);
- return;
- }
-
- v_msg="Confirmez-vous la réactivation?";
- v_msgEng="Do you confirm reactivation?";
-
-
- confirm_ebene(v_msg, v_msgEng)
- .then((isConfirmed) => {
- if (isConfirmed) {
- // L'utilisateur a confirmé
- let donnees = "numeroFeuilleMaladie=" + numeroFeuilleMaladie;
- donnees += "&motif=" + encodeURIComponent(motif_activation);
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdossierscontestes/reactiver/",
- type : 'post',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- },
- complete: function() {
- v_msg="Opération effectuée avec succès!";
- v_msgEng="Operation successfully completed";
- alert_ebene(v_msg, v_msgEng);
-
- liste_contestation();
- }
- });
- return;
- } else {
- // L'utilisateur a annulé
- v_msg="Opération annulée!";
- v_msgEng="Operation canceled!";
- alert_ebene(v_msg, v_msgEng);
-
- return;
- }
- });
- });
-}
-
-function listerrdv()
-{
-
-
- d1 = $("#d1").val();
- d2 = $("#d2").val();
-
- codeEtatRdv = $("#codeEtatRdv").val();
-
- donnees = 'd1='+ d1+'&d2='+d2+'&codeEtatRdv='+codeEtatRdv;
-
- $("#div_dossiers").html('' + '' + '
');
-
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdemanderdv/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
-
-
- $('#div_dossiers').html(data);
- },
- complete: function() {
-
- }
- });
-}
-
-function selectionner_rdv(idDemande)
-{
- donnees = 'idDemande='+idDemande;
-
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxdemanderdv/selectionner/",
- type: 'POST',
- data: donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
-
-
-
- },
- complete: function() {
- ouvrir_rdv();
- }
- });
-}
-
-
-function ouvrir_rdv()
-{
- window.location.assign($("#racineWeb" ).val()+"Rendezvous/");
-
-}
-
-
-function fin_rdv(debut)
-{
- $("#finRdv").val(debut);
-}
-
-
-function estInferieurDate(d_fin, d_debut) {
- // Obtenir la date d'aujourd'hui sans l'heure
-
-
- const debut = new Date(d_debut);
- debut.setHours(0, 0, 0, 0); // Réinitialiser les heures pour une comparaison pure de dates
-
- // S'assurer que l'argument 'date' est un objet Date
- const fin = new Date(d_fin);
- fin.setHours(0, 0, 0, 0); // De même, ignorer l'heure
-
- // Comparer les dates
- return debut > fin ;
-}
-
-function controle_date_fin_rdv(dateFin)
-{
-
- debutRdv = $("#debutRdv").val();
- dateDebut = convertirEnFormatISO(debutRdv);
-
- dateFin = convertirEnFormatISO(dateFin)
-
- if(estInferieurDate(dateFin, dateDebut))
- {
- v_msg="La date de fin doit être supérieure ou égale à la date de début!";
- v_msgEng="The end date must be greater than or equal to the start date!";
-
- alert_ebene(v_msg, v_msgEng);
-
- $("#finRdv").val(debutRdv);
- $("#finRdv").focus();
-
- return;
- }
-
-}
-
-
-function enregistrer_rdv()
-{
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
- debutRdv = $("#debutRdv").val();
- finRdv = $("#finRdv").val();
- codePrestataire = $("#codePrestataire").val();
- codeSpecialite = $("#codeSpecialite").val();
-
- if (numeroBeneficiaire<=" ")
- {
- v_msg="Sélectionner un bénéficiaire!";
- v_msgEng="Select a beneficiary!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#numeroBeneficiaire").focus();
- return;
- }
-
- if (debutRdv<=" ")
- {
- v_msg="La date de début de rendez-vous est obligatoire!";
- v_msgEng="The appointment start date is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#debutRdv").focus();
- return;
- }
-
- if (finRdv<=" ")
- {
- v_msg="La motif de fin de rendez-vous est obligatoire!";
- v_msgEng="The end date of the appointment is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#finRdv").focus();
- return;
- }
-
- if (codePrestataire<=" ")
- {
- v_msg="Sélectionner un prestataire pour le rendez-vous!";
- v_msgEng="Select a provider for the appointment!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#searchInputPrestataire").focus();
- return;
- }
-
- if (codeSpecialite<=" ")
- {
- v_msg="La spécialité de rendez-vous est obligatoire!";
- v_msgEng="The appointment specialty is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#codeSpecialite").focus();
- return;
- }
-
- motifRdv = $("#motifRdv").val();
- motifRdv = motifRdv.trim();
-
- if (motifRdv<=" ")
- {
- v_msg="Le motif de rendez-vous est obligatoire!";
- v_msgEng="The reason for the appointment is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#motifRdv").focus();
- return;
- }
-
-
- v_msg="Confirmez-vous l'enregistrement de votre demande?";
- v_msgEng="Do you confirm the registration of your request?";
-
- confirm_ebene(v_msg, v_msgEng)
- .then((isConfirmed) => {
- if (isConfirmed) {
- // L'utilisateur a confirmé
- donnees = 'numeroBeneficiaire='+ numeroBeneficiaire+'&debutRdv='+debutRdv;
- donnees += '&finRdv='+finRdv+'&codePrestataire='+codePrestataire;
- donnees += '&codeSpecialite='+codeSpecialite+'&motifRdv='+motifRdv;
-
- vLink = "Ajaxdemanderdv/enregistrer/";
-
- $.ajax({
- type: "POST",
- url: $("#racineWeb").val()+vLink,
- data:donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
- // $('#div_test_gabarit').html(data);
-
- },
- complete: function() {
-
- ouvrir_rdv();
- }
-
- });
-
- } else {
- // L'utilisateur a annulé
- console.log("Confirmation refusée");
- }
- });
-
-}
-
-function modifier_rdv()
-{
- numeroBeneficiaire = $("#numeroBeneficiaire").val();
- debutRdv = $("#debutRdv").val();
- finRdv = $("#finRdv").val();
- codePrestataire = $("#codePrestataire").val();
- codeSpecialite = $("#codeSpecialite").val();
-
- if (numeroBeneficiaire<=" ")
- {
- v_msg="Sélectionner un bénéficiaire!";
- v_msgEng="Select a beneficiary!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#numeroBeneficiaire").focus();
- return;
- }
-
- if (debutRdv<=" ")
- {
- v_msg="La date de début de rendez-vous est obligatoire!";
- v_msgEng="The appointment start date is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#debutRdv").focus();
- return;
- }
-
- if (finRdv<=" ")
- {
- v_msg="La motif de fin de rendez-vous est obligatoire!";
- v_msgEng="The end date of the appointment is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#finRdv").focus();
- return;
- }
-
- if (codePrestataire<=" ")
- {
- v_msg="Sélectionner un prestataire pour le rendez-vous!";
- v_msgEng="Select a provider for the appointment!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#searchInputPrestataire").focus();
- return;
- }
-
- if (codeSpecialite<=" ")
- {
- v_msg="La spécialité de rendez-vous est obligatoire!";
- v_msgEng="The appointment specialty is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#codeSpecialite").focus();
- return;
- }
-
- motifRdv = $("#motifRdv").val();
- motifRdv = motifRdv.trim();
-
- if (motifRdv<=" ")
- {
- v_msg="Le motif de rendez-vous est obligatoire!";
- v_msgEng="The reason for the appointment is mandatory!";
- alert_ebene(v_msg, v_msgEng);
-
- $("#motifRdv").focus();
- return;
- }
-
-
- v_msg="Confirmez-vous la modification de votre demande?";
- v_msgEng="Do you confirm the modification of your request?";
-
- confirm_ebene(v_msg, v_msgEng)
- .then((isConfirmed) => {
- if (isConfirmed) {
- // L'utilisateur a confirmé
- donnees = 'numeroBeneficiaire='+ numeroBeneficiaire+'&debutRdv='+debutRdv;
- donnees += '&finRdv='+finRdv+'&codePrestataire='+codePrestataire;
- donnees += '&codeSpecialite='+codeSpecialite+'&motifRdv='+motifRdv;
-
- vLink = "Ajaxdemanderdv/modifier/";
-
- $.ajax({
- type: "POST",
- url: $("#racineWeb").val()+vLink,
- data:donnees,
- error: function(errorData) {
- },
- success: function(data) {
- // alert(data);
- // $('#div_test_gabarit').html(data);
-
- },
- complete: function() {
-
- historique_rdv();
- }
-
- });
-
- } else {
- // L'utilisateur a annulé
- console.log("Confirmation refusée");
- }
- });
-
-}
-
-function historique_rdv()
-{
- window.location.assign($("#racineWeb" ).val()+"Historiquerdv/");
-
-}
-
-function envoyer_message()
-{
- window.location.assign($("#racineWeb" ).val()+"Envoisms/");
-}
diff --git a/Vue/Ajaxconnexioncookie/french.php b/Vue/Ajaxconnexioncookie/french.php
index 11f43e3..9c18612 100755
--- a/Vue/Ajaxconnexioncookie/french.php
+++ b/Vue/Ajaxconnexioncookie/french.php
@@ -4,6 +4,13 @@
{
$msgErreur = 'Site en maintenance, veuillez vous reconnecter plus tard!';
}
+ echo session_save_path();
+ echo "
";
+ echo ini_get('session.gc_maxlifetime');
+ echo "
";
+ echo session_id();
+ echo "
";
+ var_dump($_SESSION['csrf_tokens']);
?>
diff --git a/Vue/gabarit.php b/Vue/gabarit.php
index 56725e7..1d42dc1 100755
--- a/Vue/gabarit.php
+++ b/Vue/gabarit.php
@@ -9,7 +9,6 @@
$_SESSION['firstLevelMenu']=$activeLink;
-
const MAX_COMPANY_NAME_LENGTH = 20;
/*