diff --git a/Bootstrap_new/css/style_office.css b/Bootstrap_new/css/style_office.css
index 1f6a08f..91e96ab 100644
--- a/Bootstrap_new/css/style_office.css
+++ b/Bootstrap_new/css/style_office.css
@@ -1,738 +1,163 @@
/* ============================================
- STYLE OFFICE POUR LE PORTAIL RH - VERSION STRUCTURE
+ AJOUTS POUR MENU UNIQUE OUVERT
============================================ */
-:root {
- /* PowerPoint/Office 2019 Color Palette */
- --office-primary: #b7472a; /* Sidebar color - PowerPoint accent */
- --office-secondary: #2b579a; /* Header/buttons - Office blue */
- --office-accent: #107c10; /* Success/active states - Excel green */
- --office-light: #f3f2f1; /* Background - Office gray */
- --office-common: #e6e6e6; /* Background - Office gray */
- --office-dark: #323130; /* Text color */
- --office-border: #d0d0d0; /* Borders */
- --office-hover: #f0f0f0; /* Hover states */
- --office-card: #ffffff; /* Card backgrounds */
-
- /* Dimensions */
- --sidebar-width: 260px;
- --sidebar-collapsed: 70px;
- --header-height: 64px;
- --transition-speed: 0.3s;
-
- /* Responsive breakpoints */
- --breakpoint-tablet: 1200px;
- --breakpoint-mobile: 768px;
+/* Animation pour les sous-menus */
+@keyframes slideDown {
+ from {
+ opacity: 0;
+ transform: translateY(-10px);
+ max-height: 0;
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ max-height: 500px;
+ }
}
-/* ============================================
- BASE STYLES & RESET
- ============================================ */
-* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
+@keyframes slideUp {
+ from {
+ opacity: 1;
+ transform: translateY(0);
+ max-height: 500px;
+ }
+ to {
+ opacity: 0;
+ transform: translateY(-10px);
+ max-height: 0;
+ }
}
-body {
- font-family: 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
- background-color: var(--office-common);
- color: var(--office-dark);
- line-height: 1.5;
- overflow-x: hidden;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-/* ============================================
- HEADER STYLES
- ============================================ */
-.app-header {
- background-color: var(--office-light) !important;
- height: var(--header-height);
- border-bottom: 1px solid rgba(255, 255, 255, 0.1);
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 1030;
-}
-
-.header-content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 100%;
- padding: 0 24px;
-}
-
-.logo-container {
- display: flex;
- align-items: center;
- gap: 16px;
-}
-
-.app-logo {
- display: flex;
- align-items: center;
- color: #313c4c;
- text-decoration: none;
- font-weight: 600;
- font-size: 20px;
-}
-
-.app-logo img {
- height: 36px;
-}
-
-/* ============================================
- SIDEBAR STYLES
- ============================================ */
-.app-sidebar {
- width: var(--sidebar-width);
- background: linear-gradient(180deg, var(--office-primary) 0%, #a53e24 100%);
- position: fixed;
- top: var(--header-height);
- left: 0;
- bottom: 0;
- z-index: 1020;
- box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
- transition: width var(--transition-speed) ease;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-/* Pattern overlay */
-.app-sidebar::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-image:
- radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 20%),
- radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 20%);
- pointer-events: none;
-}
-
-.sidebar-nav {
- padding: 24px 0;
-}
-
-.nav-section {
- margin-bottom: 32px;
- padding: 0 20px;
-}
-
-.nav-title {
- color: rgba(255, 255, 255, 0.7);
- font-size: 12px;
- font-weight: 600;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- margin-bottom: 12px;
- padding: 0 16px;
-}
-
-.nav-item {
- margin-bottom: 4px;
-}
-
-.nav-link {
- display: flex;
- align-items: center;
- color: rgba(255, 255, 255, 0.85);
- padding: 12px 16px;
- text-decoration: none;
- border-radius: 6px;
- transition: all 0.2s ease;
- position: relative;
+/* Styles pour le menu unique ouvert */
+.nav-submenu {
+ max-height: 0;
overflow: hidden;
+ animation: slideUp 0.3s ease forwards;
+ display: none;
}
-.nav-link:hover {
- background-color: rgba(255, 255, 255, 0.1);
- color: white;
+.nav-submenu.show {
+ display: block;
+ animation: slideDown 0.3s ease forwards;
}
-.nav-link.active {
- background-color: rgba(255, 255, 255, 0.15);
- color: white;
- font-weight: 500;
+/* Désactiver la logique Bootstrap par défaut */
+.nav-link[data-bs-toggle="collapse"] {
+ pointer-events: auto;
}
-.nav-link i {
- width: 24px;
- font-size: 18px;
- margin-right: 12px;
- text-align: center;
+.nav-link[data-bs-toggle="collapse"].collapsed .nav-arrow {
+ transform: rotate(0deg);
}
-.nav-text {
- flex: 1;
- font-size: 14px;
-}
-
-.nav-badge {
- background-color: var(--office-accent);
- color: white;
- font-size: 11px;
- padding: 2px 6px;
- border-radius: 10px;
- margin-left: 8px;
-}
-
-.nav-arrow {
- font-size: 12px;
- opacity: 0.7;
- transition: transform 0.2s ease;
-}
-
-.nav-link[aria-expanded="true"] .nav-arrow {
+.nav-link[data-bs-toggle="collapse"]:not(.collapsed) .nav-arrow {
transform: rotate(90deg);
}
-.nav-submenu {
- background-color: rgba(0, 0, 0, 0.1);
- border-radius: 6px;
- margin-top: 4px;
- padding: 8px 0;
-}
-
-.nav-submenu .nav-link {
- padding: 8px 16px 8px 52px;
- font-size: 13px;
-}
-
-.nav-submenu .nav-link::before {
- content: '•';
- position: absolute;
- left: 36px;
- opacity: 0.6;
-}
-
/* ============================================
- MAIN CONTENT AREA
+ AMÉLIORATIONS UX
============================================ */
-.app-main {
- margin-left: var(--sidebar-width);
- padding-top: var(--header-height);
- min-height: 100vh;
- transition: margin-left var(--transition-speed) ease;
- background-color: var(--office-light);
-}
-.content-area {
- padding: 24px;
- max-width: 1400px;
- margin: 0 auto;
-}
-
-/* ============================================
- NAVIGATION TABS
- ============================================ */
-.nav-bar {
- background-color: white;
- border-radius: 8px;
- padding: 16px 24px;
- margin-bottom: 24px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- border: 1px solid var(--office-border);
-}
-
-.nav-tabs {
- display: flex;
- gap: 8px;
- overflow-x: auto;
- padding-bottom: 4px;
-}
-
-.nav-tab {
- display: inline-flex;
- align-items: center;
- padding: 8px 16px;
- background-color: transparent;
- color: var(--office-dark);
- text-decoration: none;
- border-radius: 4px;
- font-size: 14px;
- font-weight: 500;
- white-space: nowrap;
- transition: all 0.2s ease;
- border: 1px solid transparent;
-}
-
-.nav-tab:hover {
- background-color: var(--office-hover);
- color: var(--office-secondary);
-}
-
-.nav-tab.active {
- background-color: var(--office-secondary);
- color: white;
- border-color: var(--office-secondary);
-}
-
-.nav-tab i {
- margin-right: 8px;
- font-size: 16px;
-}
-
-/* ============================================
- CONTENT CARDS
- ============================================ */
-.content-card {
- background-color: white;
- border-radius: 8px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
- border: 1px solid var(--office-border);
- margin-bottom: 24px;
- overflow: hidden;
-}
-
-.card-header {
- background-color: #fafafa;
- border-bottom: 1px solid var(--office-border);
- padding: 20px 24px;
- font-weight: 600;
- color: var(--office-dark);
- font-size: 18px;
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-
-.card-body {
- padding: 24px;
-}
-
-/* ============================================
- HEADER CONTROLS
- ============================================ */
-.header-controls {
- display: flex;
- align-items: center;
- gap: 16px;
-}
-
-.header-btn {
- background: transparent;
- border: none;
- color: #313c4c;
- padding: 8px;
- border-radius: 4px;
- cursor: pointer;
- position: relative;
- transition: background-color 0.2s ease;
-}
-
-.header-btn:hover {
- background-color: rgba(255, 255, 255, 0.1);
-}
-
-.notification-badge {
- position: absolute;
- top: 2px;
- right: 2px;
- background-color: var(--office-accent);
- color: white;
- font-size: 10px;
- font-weight: 600;
- width: 18px;
- height: 18px;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.user-menu {
- display: flex;
- align-items: center;
- gap: 12px;
- cursor: pointer;
- padding: 4px 12px;
- border-radius: 6px;
- transition: background-color 0.2s ease;
-}
-
-.user-menu:hover {
- background-color: rgba(255, 255, 255, 0.1);
-}
-
-.user-avatar {
- width: 36px;
- height: 36px;
- border-radius: 50%;
- background: linear-gradient(135deg, var(--office-primary), #ff6b35);
- color: white;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 600;
- font-size: 14px;
-}
-
-.user-info {
- display: flex;
- flex-direction: column;
-}
-
-.user-name {
- color: #313c4c;
- font-weight: 500;
- font-size: 14px;
-}
-
-.user-role {
- color: #313c4c;
- font-size: 12px;
-}
-
-/* ============================================
- CONTEXT PANEL
- ============================================ */
-.context-panel {
+/* Zone de détection de proximité */
+.proximity-hover-area {
position: fixed;
- right: -380px;
- top: var(--header-height);
- bottom: 0;
- width: 380px;
- background-color: white;
- box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
- z-index: 1015;
- transition: right 0.3s ease;
- display: flex;
- flex-direction: column;
- border-left: 1px solid var(--office-border);
-}
-
-.context-panel.open {
right: 0;
+ top: 50%;
+ width: 80px;
+ height: 200px;
+ transform: translateY(-50%);
+ z-index: 1005;
+ pointer-events: none;
}
-.context-header {
- background: linear-gradient(135deg, var(--office-primary), #ee6a49);
+/* État hors ligne */
+body.offline .app-header::after {
+ content: 'Hors ligne';
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ background: #ff6b35;
color: white;
- padding: 20px 24px;
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-
-.context-title {
- font-size: 18px;
- font-weight: 600;
- display: flex;
- align-items: center;
- gap: 10px;
-}
-
-.context-close {
- background: transparent;
- border: none;
- color: white;
- font-size: 20px;
- cursor: pointer;
- padding: 4px;
- border-radius: 4px;
- transition: background-color 0.2s ease;
-}
-
-.context-close:hover {
- background-color: rgba(255, 255, 255, 0.1);
-}
-
-.context-body {
- flex: 1;
- padding: 24px;
- overflow-y: auto;
-}
-
-.context-section {
- margin-bottom: 28px;
-}
-
-.section-title {
- font-size: 14px;
- font-weight: 600;
- color: var(--office-secondary);
- margin-bottom: 12px;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- display: flex;
- align-items: center;
- gap: 8px;
-}
-
-.section-title i {
- font-size: 16px;
-}
-
-.info-box {
- background-color: #fafafa;
- border: 1px solid var(--office-border);
- border-radius: 6px;
- padding: 16px;
- margin-bottom: 12px;
-}
-
-.info-label {
- font-size: 12px;
- color: #666;
- margin-bottom: 4px;
-}
-
-.info-value {
- font-size: 15px;
- font-weight: 500;
- color: var(--office-dark);
- line-height: 1.4;
-}
-
-.action-btn {
- width: 100%;
- padding: 12px;
- background-color: white;
- border: 1px solid var(--office-border);
- border-radius: 6px;
- color: var(--office-dark);
- font-weight: 500;
- text-align: left;
- display: flex;
- align-items: center;
- gap: 10px;
- cursor: pointer;
- transition: all 0.2s ease;
- margin-bottom: 8px;
-}
-
-.action-btn:hover {
- background-color: var(--office-hover);
- border-color: var(--office-secondary);
- color: var(--office-secondary);
-}
-
-.action-btn i {
- width: 20px;
- text-align: center;
- font-size: 18px;
-}
-
-.photo-container {
- text-align: center;
- padding: 16px;
- background-color: #fafafa;
- border-radius: 8px;
- border: 1px solid var(--office-border);
-}
-
-.patient-photo {
- width: 150px;
- height: 150px;
- border-radius: 8px;
- object-fit: cover;
- border: 3px solid white;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- cursor: pointer;
- transition: transform 0.3s ease;
-}
-
-.patient-photo:hover {
- transform: scale(1.05);
-}
-
-/* ============================================
- CONTEXT TOGGLE BUTTON
- ============================================ */
-.context-toggle {
- position: fixed;
- right: 24px;
- bottom: 24px;
- width: 56px;
- height: 56px;
- border-radius: 50%;
- background: linear-gradient(135deg, var(--office-primary), #ff6b35);
- color: white;
- border: none;
- box-shadow: 0 4px 12px rgba(183, 71, 42, 0.3);
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 20px;
- z-index: 1010;
- transition: all 0.3s ease;
-}
-
-.context-toggle:hover {
- transform: translateY(-2px);
- box-shadow: 0 6px 16px rgba(183, 71, 42, 0.4);
-}
-
-/* ============================================
- TEST MODE INDICATOR
- ============================================ */
-.test-indicator {
- background: linear-gradient(45deg, #ffd700, #ffed4e);
- color: #8a6d3b;
padding: 4px 12px;
border-radius: 4px;
font-size: 12px;
- font-weight: 600;
- display: inline-flex;
- align-items: center;
- gap: 6px;
- margin-left: 12px;
animation: pulse 2s infinite;
}
-@keyframes pulse {
- 0% { opacity: 1; }
- 50% { opacity: 0.7; }
- 100% { opacity: 1; }
-}
-
-/* ============================================
- LANGUAGE SELECTOR
- ============================================ */
-.language-selector {
+/* Spinner amélioré */
+.spinner-responsive {
display: flex;
+ justify-content: center;
align-items: center;
- gap: 8px;
- padding: 6px 12px;
- background-color: rgba(255, 255, 255, 0.1);
- border-radius: 4px;
- cursor: pointer;
- transition: background-color 0.2s ease;
- color: #313c4c;
+ min-height: 300px;
}
-.language-selector:hover {
- background-color: rgba(255, 255, 255, 0.2);
+.spinner-responsive i {
+ font-size: 48px;
+ color: var(--office-primary);
+ animation: spin 1s linear infinite;
}
-.language-flag {
- width: 24px;
- height: 16px;
- object-fit: cover;
- border-radius: 2px;
+@keyframes spin {
+ 0% { transform: rotate(0deg); }
+ 100% { transform: rotate(360deg); }
}
/* ============================================
- MODAL CUSTOMIZATION
+ RESPONSIVE AMÉLIORÉ
============================================ */
-.modal-office .modal-header {
- background: linear-gradient(135deg, var(--office-secondary), #1e4a8b);
- color: white;
- border-bottom: none;
-}
-
-.modal-office .modal-title {
- font-weight: 600;
-}
-
-/* ============================================
- RESPONSIVE DESIGN
- ============================================ */
-@media (max-width: 1200px) {
- .app-sidebar {
- width: var(--sidebar-collapsed);
- }
-
- .app-main {
- margin-left: var(--sidebar-collapsed);
- }
-
- .nav-text,
- .nav-title,
- .nav-badge,
- .nav-arrow {
- display: none;
- }
-
- .nav-link {
- justify-content: center;
- padding: 16px;
- }
-
- .nav-link i {
- margin-right: 0;
- font-size: 20px;
- }
-
- .nav-submenu .nav-link {
- padding: 12px;
- justify-content: center;
- }
-
- .nav-submenu .nav-link::before {
- display: none;
- }
-
- .context-panel {
- width: 100%;
- right: -100%;
- }
-}
@media (max-width: 768px) {
.app-sidebar {
- transform: translateX(-100%);
- width: var(--sidebar-width);
+ transition: transform 0.3s ease;
}
- .app-sidebar.open {
+ .app-sidebar.show {
transform: translateX(0);
+ box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}
- .app-main {
- margin-left: 0;
- }
-
- .header-content {
- padding: 0 16px;
- }
-
- .content-area {
- padding: 16px;
- }
-
- .user-info {
- display: none;
- }
-
- .nav-text,
- .nav-title,
- .nav-badge,
- .nav-arrow {
- display: block;
+ .context-toggle {
+ width: 48px;
+ height: 48px;
+ right: 16px;
+ bottom: 16px;
}
}
/* ============================================
- SCROLLBAR STYLING
+ ACCESSIBILITÉ
============================================ */
-.app-sidebar::-webkit-scrollbar,
-.context-body::-webkit-scrollbar {
- width: 6px;
+
+.nav-link:focus {
+ outline: 2px solid var(--office-secondary);
+ outline-offset: -2px;
}
-.app-sidebar::-webkit-scrollbar-track,
-.context-body::-webkit-scrollbar-track {
- background: rgba(255, 255, 255, 0.1);
- border-radius: 3px;
+.context-toggle:focus {
+ outline: 3px solid var(--office-secondary);
+ outline-offset: 2px;
}
-.app-sidebar::-webkit-scrollbar-thumb,
-.context-body::-webkit-scrollbar-thumb {
- background: rgba(255, 255, 255, 0.3);
- border-radius: 3px;
+/* High contrast mode */
+@media (prefers-contrast: high) {
+ :root {
+ --office-border: #000000;
+ --office-dark: #000000;
+ }
+
+ .nav-link.active {
+ outline: 3px solid #000;
+ }
}
-.app-sidebar::-webkit-scrollbar-thumb:hover,
-.context-body::-webkit-scrollbar-thumb:hover {
- background: rgba(255, 255, 255, 0.4);
+/* Reduced motion */
+@media (prefers-reduced-motion: reduce) {
+ * {
+ animation-duration: 0.01ms !important;
+ animation-iteration-count: 1 !important;
+ transition-duration: 0.01ms !important;
+ }
}
\ No newline at end of file
diff --git a/Bootstrap_new/css/ux_enhancements.css b/Bootstrap_new/css/ux_enhancements.css
index e04f7d5..7a2cbdb 100644
--- a/Bootstrap_new/css/ux_enhancements.css
+++ b/Bootstrap_new/css/ux_enhancements.css
@@ -1,558 +1,71 @@
/* ============================================
- ENHANCEMENTS UX POUR PORTAIL INTER SANTÉ
+ UX ENHANCEMENTS - ANIMATIONS ET MICRO-INTERACTIONS
============================================ */
-:root {
- /* Variables UX avancées */
- --ux-transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
- --ux-shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
- --ux-shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.12);
- --ux-shadow-hard: 0 10px 30px rgba(0, 0, 0, 0.15);
- --ux-border-radius-sm: 8px;
- --ux-border-radius-md: 12px;
- --ux-border-radius-lg: 20px;
-
- /* Variables d'animation */
- --animation-duration-fast: 150ms;
- --animation-duration-normal: 300ms;
- --animation-duration-slow: 500ms;
-}
-
-/* ============================================
- ENHANCED SIDEBAR UX
- ============================================ */
-.app-sidebar {
- --sidebar-hover-glow: 0 0 20px rgba(255, 255, 255, 0.1);
-}
-
-.nav-item {
+/* Effet de vague au clic */
+.ripple {
position: relative;
-}
-
-.nav-link {
- position: relative;
- overflow: visible;
- transition: all var(--animation-duration-normal) var(--ux-transition-smooth);
- border-left: 3px solid transparent;
- will-change: transform, background-color, border-color;
-}
-
-.nav-link:hover {
- background: linear-gradient(90deg,
- rgba(255, 255, 255, 0.1) 0%,
- rgba(255, 255, 255, 0.05) 100%);
- transform: translateX(8px);
- border-left-color: rgba(255, 255, 255, 0.5);
- box-shadow: var(--sidebar-hover-glow);
-}
-
-.nav-link.active {
- background: linear-gradient(90deg,
- rgba(255, 255, 255, 0.2) 0%,
- rgba(255, 255, 255, 0.1) 100%);
- border-left-color: #ffffff;
- box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.1),
- 0 0 20px rgba(255, 255, 255, 0.15);
- font-weight: 600;
- letter-spacing: 0.3px;
-}
-
-/* Indicateur visuel pour lien actif */
-.nav-link.active::before {
- content: '';
- position: absolute;
- left: -3px;
- top: 50%;
- transform: translateY(-50%);
- width: 6px;
- height: 6px;
- background-color: white;
- border-radius: 50%;
- box-shadow: 0 0 10px white;
- animation: pulse-active 2s infinite;
-}
-
-@keyframes pulse-active {
- 0%, 100% {
- opacity: 1;
- transform: translateY(-50%) scale(1);
- }
- 50% {
- opacity: 0.7;
- transform: translateY(-50%) scale(1.2);
- }
-}
-
-/* Sous-menus améliorés */
-.nav-submenu {
- background: linear-gradient(180deg,
- rgba(0, 0, 0, 0.15) 0%,
- rgba(0, 0, 0, 0.1) 100%);
- border-radius: var(--ux-border-radius-sm);
- margin: 6px 12px;
- border-left: 2px solid rgba(255, 255, 255, 0.2);
- transition: all 0.4s var(--ux-transition-smooth);
- max-height: 0;
overflow: hidden;
}
-.nav-submenu.show {
- max-height: 500px;
- padding: 8px 0;
- margin-top: 8px;
- margin-bottom: 12px;
- animation: slideDown 0.4s var(--ux-transition-smooth);
-}
-
-@keyframes slideDown {
- from {
- opacity: 0;
- transform: translateY(-10px);
- max-height: 0;
- }
- to {
- opacity: 1;
- transform: translateY(0);
- max-height: 500px;
- }
-}
-
-/* ============================================
- CONTEXT BUTTON - QUILLBOT STYLE
- ============================================ */
-.context-toggle {
- position: fixed;
- right: 30px;
- bottom: 30px;
- width: 60px;
- height: 60px;
- border-radius: 50%;
- background: linear-gradient(135deg, #b7472a 0%, #ff6b35 100%);
- color: white;
- border: 3px solid white;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 24px;
- z-index: 1050;
- transition: all 0.5s var(--ux-transition-smooth);
- opacity: 0.2;
- transform: scale(0.8);
- box-shadow:
- 0 4px 25px rgba(183, 71, 42, 0.15),
- inset 0 0 20px rgba(255, 255, 255, 0.2);
- backdrop-filter: blur(10px);
- will-change: transform, opacity, box-shadow;
-}
-
-/* Animation d'attente */
-.context-toggle::after {
+.ripple::after {
content: '';
position: absolute;
- width: 72px;
- height: 72px;
- border: 2px solid rgba(183, 71, 42, 0.3);
- border-radius: 50%;
- animation: ripple 3s infinite;
+ top: 50%;
+ left: 50%;
+ width: 5px;
+ height: 5px;
+ background: rgba(255, 255, 255, 0.5);
+ opacity: 0;
+ border-radius: 100%;
+ transform: scale(1, 1) translate(-50%);
+ transform-origin: 50% 50%;
+}
+
+.ripple:focus:not(:active)::after {
+ animation: ripple 1s ease-out;
}
@keyframes ripple {
- 0% {
- transform: scale(0.8);
- opacity: 1;
+ 0% {
+ transform: scale(0, 0);
+ opacity: 0.5;
}
- 100% {
- transform: scale(1.2);
- opacity: 0;
- }
-}
-
-/* État au survol et activation */
-.context-toggle:hover,
-.context-toggle.active,
-body:has(.proximity-hover-area:hover) .context-toggle {
- opacity: 1 !important;
- transform: scale(1.1) !important;
- box-shadow:
- 0 8px 35px rgba(183, 71, 42, 0.4),
- 0 0 30px rgba(255, 107, 53, 0.3),
- inset 0 0 25px rgba(255, 255, 255, 0.3);
- animation: bounce 0.5s var(--ux-transition-smooth);
-}
-
-@keyframes bounce {
- 0%, 100% { transform: scale(1.1); }
- 50% { transform: scale(1.15); }
-}
-
-/* Rotation quand le panel est ouvert */
-.context-panel.open ~ .context-toggle {
- transform: rotate(180deg) scale(1.1);
- background: linear-gradient(135deg, #2b579a 0%, #1e4a8b 100%);
- right: 410px;
-}
-
-/* Zone de détection de proximité invisible */
-.proximity-hover-area {
- position: fixed;
- right: 0;
- bottom: 0;
- width: 200px;
- height: 200px;
- z-index: 1049;
- pointer-events: none;
-}
-
-/* Feedback visuel pour la zone */
-.proximity-hover-area::before {
- content: '';
- position: absolute;
- right: 30px;
- bottom: 30px;
- width: 100px;
- height: 100px;
- background: radial-gradient(circle, rgba(183, 71, 42, 0.1) 0%, transparent 70%);
- border-radius: 50%;
- opacity: 0;
- transition: opacity var(--animation-duration-normal);
-}
-
-.proximity-hover-area:hover::before {
- opacity: 1;
-}
-
-/* ============================================
- ENHANCED CONTEXT PANEL
- ============================================ */
-.context-panel {
- transition: right var(--animation-duration-slow) var(--ux-transition-smooth);
- box-shadow:
- -5px 0 30px rgba(0, 0, 0, 0.15),
- 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
- border-left: 3px solid var(--office-primary);
- will-change: right;
-}
-
-.context-panel.open {
- animation: slideInRight 0.5s var(--ux-transition-smooth);
-}
-
-@keyframes slideInRight {
- from {
- transform: translateX(100px);
- opacity: 0.8;
- }
- to {
- transform: translateX(0);
- opacity: 1;
- }
-}
-
-.context-header {
- background: linear-gradient(135deg, var(--office-primary) 0%, #d9534f 100%);
- padding: 25px 30px;
- border-bottom: 3px solid rgba(255, 255, 255, 0.2);
-}
-
-.context-title {
- font-size: 20px;
- font-weight: 700;
-}
-
-.context-close {
- transition: all var(--animation-duration-normal);
- width: 40px;
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.context-close:hover {
- background: rgba(255, 255, 255, 0.2);
- transform: rotate(90deg);
-}
-
-/* Sections avec effet de profondeur */
-.context-section {
- background: white;
- border-radius: var(--ux-border-radius-md);
- padding: 20px;
- margin-bottom: 25px;
- box-shadow: var(--ux-shadow-soft);
- border: 1px solid var(--office-border);
- transition: all var(--animation-duration-normal);
- position: relative;
- overflow: hidden;
-}
-
-.context-section:hover {
- transform: translateY(-3px);
- box-shadow: var(--ux-shadow-medium);
- border-color: var(--office-secondary);
-}
-
-.context-section::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- width: 4px;
- height: 100%;
- background: linear-gradient(to bottom, var(--office-primary), var(--office-secondary));
- opacity: 0.7;
-}
-
-.section-title {
- color: var(--office-secondary);
- font-size: 15px;
- margin-bottom: 15px;
- padding-bottom: 10px;
- border-bottom: 2px solid rgba(43, 87, 154, 0.1);
- position: relative;
-}
-
-.section-title::after {
- content: '';
- position: absolute;
- bottom: -2px;
- left: 0;
- width: 50px;
- height: 2px;
- background: linear-gradient(90deg, var(--office-primary), var(--office-secondary));
-}
-
-/* Cards améliorées */
-.info-box {
- background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
- border-radius: var(--ux-border-radius-sm);
- padding: 18px;
- border: 1px solid rgba(0, 0, 0, 0.08);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
- transition: all var(--animation-duration-normal);
-}
-
-.info-box:hover {
- border-color: var(--office-secondary);
- box-shadow:
- inset 0 2px 8px rgba(43, 87, 154, 0.05),
- 0 3px 10px rgba(0, 0, 0, 0.05);
-}
-
-.info-value {
- font-size: 16px;
- font-weight: 600;
- color: var(--office-dark);
- line-height: 1.5;
-}
-
-/* Boutons d'action améliorés */
-.action-btn {
- background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
- border: 2px solid var(--office-border);
- border-radius: var(--ux-border-radius-sm);
- padding: 15px 20px;
- margin-bottom: 12px;
- transition: all var(--animation-duration-normal) var(--ux-transition-smooth);
- position: relative;
- overflow: hidden;
- will-change: transform, border-color, background;
-}
-
-.action-btn:hover {
- transform: translateX(8px);
- border-color: var(--office-secondary);
- background: linear-gradient(135deg, #f0f7ff 0%, #e3eeff 100%);
- box-shadow:
- 5px 5px 15px rgba(43, 87, 154, 0.1),
- inset 0 0 20px rgba(255, 255, 255, 0.5);
-}
-
-.action-btn::before {
- content: '';
- position: absolute;
- left: -100%;
- top: 0;
- width: 100%;
- height: 100%;
- background: linear-gradient(90deg,
- transparent,
- rgba(255, 255, 255, 0.4),
- transparent);
- transition: left 0.6s;
-}
-
-.action-btn:hover::before {
- left: 100%;
-}
-
-/* Photo patient améliorée */
-.photo-container {
- background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
- border-radius: var(--ux-border-radius-md);
- padding: 25px;
- border: 2px dashed var(--office-border);
- transition: all var(--animation-duration-normal);
-}
-
-.photo-container:hover {
- border-color: var(--office-primary);
- background: linear-gradient(135deg, #fff5f2 0%, #ffffff 100%);
- transform: scale(1.02);
-}
-
-.patient-photo {
- width: 180px;
- height: 180px;
- border-radius: var(--ux-border-radius-md);
- object-fit: cover;
- border: 5px solid white;
- box-shadow:
- 0 10px 30px rgba(0, 0, 0, 0.15),
- 0 0 0 1px rgba(0, 0, 0, 0.05);
- transition: all 0.4s var(--ux-transition-smooth);
- cursor: pointer;
- will-change: transform, box-shadow;
-}
-
-.patient-photo:hover {
- transform: scale(1.08) rotate(2deg);
- box-shadow:
- 0 20px 40px rgba(0, 0, 0, 0.2),
- 0 0 0 3px rgba(183, 71, 42, 0.3);
-}
-
-/* ============================================
- HEADER ENHANCEMENTS
- ============================================ */
-.app-header {
- backdrop-filter: blur(10px);
- background: linear-gradient(135deg,
- rgba(243, 242, 241, 0.95) 0%,
- rgba(255, 255, 255, 0.98) 100%);
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
- box-shadow:
- 0 4px 20px rgba(0, 0, 0, 0.05),
- inset 0 1px 0 rgba(255, 255, 255, 0.8);
-}
-
-.user-avatar {
- background: linear-gradient(135deg, var(--office-primary) 0%, #ff8c69 100%);
- box-shadow:
- 0 4px 15px rgba(183, 71, 42, 0.3),
- inset 0 0 20px rgba(255, 255, 255, 0.3);
- transition: all var(--animation-duration-normal);
- will-change: transform, box-shadow;
-}
-
-.user-avatar:hover {
- transform: scale(1.1) rotate(5deg);
- box-shadow:
- 0 6px 25px rgba(183, 71, 42, 0.4),
- inset 0 0 25px rgba(255, 255, 255, 0.4);
-}
-
-.notification-badge {
- background: linear-gradient(135deg, #107c10 0%, #20a020 100%);
- box-shadow: 0 3px 10px rgba(16, 124, 16, 0.4);
- animation: pulse-notification 2s infinite;
-}
-
-@keyframes pulse-notification {
- 0%, 100% { transform: scale(1); }
- 50% { transform: scale(1.1); }
-}
-
-/* ============================================
- MAIN CONTENT ENHANCEMENTS
- ============================================ */
-.app-main {
- background: linear-gradient(135deg,
- #f3f2f1 0%,
- #f8f7f6 30%,
- #fefefe 100%);
-}
-
-.content-area {
- animation: fadeIn 0.6s var(--ux-transition-smooth);
-}
-
-@keyframes fadeIn {
- from {
- opacity: 0;
- transform: translateY(20px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
-}
-
-.nav-bar {
- background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
- border-radius: var(--ux-border-radius-md);
- box-shadow: var(--ux-shadow-soft);
- border: 1px solid rgba(0, 0, 0, 0.06);
- backdrop-filter: blur(10px);
-}
-
-.nav-tab {
- transition: all var(--animation-duration-normal);
- position: relative;
- overflow: hidden;
- will-change: transform, box-shadow;
-}
-
-.nav-tab:hover {
- transform: translateY(-2px);
- box-shadow: 0 5px 15px rgba(43, 87, 154, 0.1);
-}
-
-.nav-tab.active {
- background: linear-gradient(135deg, var(--office-secondary) 0%, #3a6bc0 100%);
- box-shadow:
- 0 5px 20px rgba(43, 87, 154, 0.3),
- inset 0 0 20px rgba(255, 255, 255, 0.2);
- transform: translateY(-2px);
- animation: tab-active-pulse 3s infinite;
-}
-
-@keyframes tab-active-pulse {
- 0%, 100% {
- box-shadow: 0 5px 20px rgba(43, 87, 154, 0.3);
- }
- 50% {
- box-shadow: 0 5px 25px rgba(43, 87, 154, 0.5);
+ 20% {
+ transform: scale(25, 25);
+ opacity: 0.3;
+ }
+ 100% {
+ opacity: 0;
+ transform: scale(40, 40);
}
}
+/* Effet de levitation pour les cartes */
.content-card {
- background: linear-gradient(135deg, #ffffff 0%, #fcfcfc 100%);
- border-radius: var(--ux-border-radius-md);
- box-shadow: var(--ux-shadow-soft);
- border: 1px solid rgba(0, 0, 0, 0.05);
- transition: all 0.4s;
- will-change: transform, box-shadow;
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.content-card:hover {
- transform: translateY(-3px);
- box-shadow: var(--ux-shadow-medium);
- border-color: rgba(43, 87, 154, 0.1);
+ transform: translateY(-4px);
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
-/* ============================================
- LOADING STATES
- ============================================ */
-.loading-placeholder {
- background: linear-gradient(90deg,
- #f0f0f0 25%,
- #e0e0e0 50%,
- #f0f0f0 75%);
+/* Animation du bouton contexte */
+.context-toggle {
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
+}
+
+.context-toggle:hover {
+ transform: scale(1.1) translateY(-2px);
+ box-shadow: 0 8px 20px rgba(183, 71, 42, 0.4);
+}
+
+/* Loading skeleton */
+.skeleton {
+ background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: loading 1.5s infinite;
- border-radius: var(--ux-border-radius-sm);
}
@keyframes loading {
@@ -560,274 +73,66 @@ body:has(.proximity-hover-area:hover) .context-toggle {
100% { background-position: -200% 0; }
}
-/* ============================================
- ACCESSIBILITY ENHANCEMENTS
- ============================================ */
-
-/* Navigation au clavier */
-body.keyboard-navigation .nav-link:focus,
-body.keyboard-navigation .action-btn:focus,
-body.keyboard-navigation .context-toggle:focus {
- outline: 3px solid rgba(43, 87, 154, 0.5);
- outline-offset: 3px;
- box-shadow: 0 0 0 6px rgba(43, 87, 154, 0.1);
+/* Smooth scrolling */
+html {
+ scroll-behavior: smooth;
}
-/* Lien skip pour accessibilité */
-.skip-link {
- position: absolute;
- top: -40px;
- left: 0;
- background: var(--office-primary);
- color: white;
- padding: 8px 16px;
- border-radius: 0 0 4px 0;
- text-decoration: none;
- font-weight: 600;
- z-index: 9999;
- transition: top 0.3s;
+/* Focus styles améliorés */
+:focus-visible {
+ outline: 3px solid var(--office-secondary);
+ outline-offset: 2px;
+ border-radius: 4px;
}
-.skip-link:focus {
- top: 0;
- outline: 3px solid white;
- outline-offset: -3px;
-}
-
-/* High contrast mode */
-@media (prefers-contrast: high) {
- .nav-link.active {
- border-left: 4px solid white;
- background-color: rgba(255, 255, 255, 0.3);
- }
-
- .context-section {
- border: 2px solid var(--office-dark);
- }
-
- .action-btn {
- border: 2px solid currentColor;
- }
-}
-
-/* Reduced motion */
-@media (prefers-reduced-motion: reduce) {
- *,
- *::before,
- *::after {
- animation-duration: 0.01ms !important;
- animation-iteration-count: 1 !important;
- transition-duration: 0.01ms !important;
- scroll-behavior: auto !important;
- }
-
- .context-toggle::after {
- animation: none;
- }
-}
-
-/* Dark mode support */
-@media (prefers-color-scheme: dark) {
- .app-header {
- background: rgba(30, 30, 30, 0.95);
- border-bottom-color: rgba(255, 255, 255, 0.1);
- }
-
- .content-card {
- background: #2a2a2a;
- border-color: #404040;
- color: #e0e0e0;
- }
-
- .nav-bar {
- background: #2a2a2a;
- border-color: #404040;
- }
-
- .info-box {
- background: #333;
- border-color: #444;
- }
-
- .action-btn {
- background: #333;
- border-color: #444;
- color: #e0e0e0;
- }
-}
-
-/* ============================================
- RESPONSIVE ENHANCEMENTS
- ============================================ */
-@media (max-width: 1200px) {
- .app-sidebar:hover {
- width: var(--sidebar-width);
- }
-
- .app-sidebar:hover .nav-text,
- .app-sidebar:hover .nav-arrow {
- display: block;
- animation: fadeIn 0.3s;
- }
-
- .context-panel {
- width: 90%;
- }
-
- .context-panel.open ~ .context-toggle {
- right: calc(90% + 20px);
- }
-}
-
-@media (max-width: 768px) {
- .context-toggle {
- width: 50px;
- height: 50px;
- font-size: 20px;
- right: 20px;
- bottom: 20px;
- }
-
- .context-toggle::after {
- width: 60px;
- height: 60px;
- }
-
- .context-panel {
- width: 100%;
- }
-
- .context-panel.open ~ .context-toggle {
- right: calc(100% - 70px);
- }
-
- .nav-bar {
- padding: 12px 15px;
- margin: 10px;
- }
-
- .nav-tabs {
- padding: 5px 0;
- }
-
- .nav-tab {
- padding: 8px 12px;
- font-size: 13px;
- }
-
- /* Masquer certains éléments sur mobile */
- .user-info .user-role {
- display: none;
- }
-
- .test-indicator span {
- display: none;
- }
-
- .test-indicator {
- padding: 4px 8px;
- }
-}
-
-@media (max-width: 480px) {
- .header-content {
- padding: 0 12px;
- }
-
- .app-logo span {
- font-size: 16px;
- }
-
- .user-name {
- display: none;
- }
-
- .context-body {
- padding: 16px;
- }
-
- .context-section {
- padding: 15px;
- }
-
- .patient-photo {
- width: 140px;
- height: 140px;
- }
-}
-
-/* ============================================
- UTILITY CLASSES
- ============================================ */
-.visually-hidden {
- position: absolute;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: -1px;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- white-space: nowrap;
- border: 0;
-}
-
-.text-balance {
- text-wrap: balance;
-}
-
-.text-pretty {
- text-wrap: pretty;
-}
-
-/* Connection warning */
-.connection-warning {
- position: fixed;
- top: 70px;
- left: 50%;
- transform: translateX(-50%);
- z-index: 9999;
- max-width: 90%;
- animation: slideDown 0.3s ease-out;
-}
-
-/* Animation for loaded images */
-img.loaded {
- animation: fadeInUp 0.5s ease-out;
+/* Animation d'entrée */
+.fade-in-up {
+ animation: fadeInUp 0.6s ease forwards;
+ opacity: 0;
+ transform: translateY(20px);
}
@keyframes fadeInUp {
- from {
- opacity: 0;
- transform: translateY(10px);
- }
to {
opacity: 1;
transform: translateY(0);
}
}
-/* Print styles */
-@media print {
- .app-sidebar,
- .app-header,
- .context-panel,
- .context-toggle,
- .nav-bar {
- display: none !important;
- }
-
- .app-main {
- margin-left: 0;
- padding-top: 0;
- }
-
- .content-card {
- box-shadow: none;
- border: 1px solid #ddd;
- }
-
- body {
- background: white;
- color: black;
- }
+/* Tooltip personnalisé */
+[data-tooltip] {
+ position: relative;
+}
+
+[data-tooltip]:hover::before {
+ content: attr(data-tooltip);
+ position: absolute;
+ bottom: 100%;
+ left: 50%;
+ transform: translateX(-50%);
+ background: var(--office-dark);
+ color: white;
+ padding: 6px 12px;
+ border-radius: 4px;
+ font-size: 12px;
+ white-space: nowrap;
+ z-index: 1000;
+ margin-bottom: 8px;
+ animation: fadeIn 0.2s ease;
+}
+
+[data-tooltip]:hover::after {
+ content: '';
+ position: absolute;
+ bottom: 100%;
+ left: 50%;
+ transform: translateX(-50%);
+ border: 6px solid transparent;
+ border-top-color: var(--office-dark);
+ margin-bottom: 2px;
+}
+
+@keyframes fadeIn {
+ from { opacity: 0; }
+ to { opacity: 1; }
}
\ No newline at end of file
diff --git a/Bootstrap_new/js/ux-manager.js b/Bootstrap_new/js/ux-manager.js
index bb653ed..d3b5361 100644
--- a/Bootstrap_new/js/ux-manager.js
+++ b/Bootstrap_new/js/ux-manager.js
@@ -1,1377 +1,511 @@
-/**
- * UX Manager pour Portail Inter Santé
- * Gestion avancée de l'expérience utilisateur
- * Version: 2025.12.20.01
- */
-
-// Configuration globale
-const UXConfig = {
- debug: false,
- transitionSpeed: 300,
- proximityRadius: 150,
- notificationPollInterval: 30000,
- saveState: true
-};
-
-// Module principal UX Manager
+// UX Manager - Gestionnaire d'expérience utilisateur modulaire
class UXManager {
constructor() {
- this.contextPanelOpen = false;
- this.sidebarOpen = false;
- this.activeMenuId = window.appConfig?.activeParentId || null;
- this.proximityDetectionActive = true;
-
- this.modules = {
- navigation: null,
- context: null,
- notifications: null,
- accessibility: null,
- performance: null
- };
+ this.navigation = new NavigationManager();
+ this.contextPanel = new ContextPanelManager();
+ this.notifications = new NotificationManager();
+ this.accessibility = new AccessibilityManager();
+ this.performance = new PerformanceManager();
+ this.language = new LanguageManager();
this.init();
}
- /**
- * Initialisation du système UX
- */
init() {
- try {
- console.log('🚀 UX Manager initialisation...');
-
- // Initialiser les modules
- this.modules.navigation = new NavigationManager();
- this.modules.context = new ContextPanelManager();
- this.modules.notifications = new NotificationManager();
- this.modules.accessibility = new AccessibilityManager();
- this.modules.performance = new PerformanceManager();
-
- // Restaurer l'état précédent
- this.restoreState();
-
- // Configurer les événements globaux
- this.setupGlobalEvents();
-
- // Lancer les pollings
- this.startPollings();
-
- console.log('✅ UX Manager prêt');
-
- } catch (error) {
- console.error('❌ Erreur initialisation UX Manager:', error);
- }
+ console.log('[UX Manager] Initialisation...');
+ this.navigation.init();
+ this.contextPanel.init();
+ this.notifications.init();
+ this.accessibility.init();
+ this.performance.init();
+ this.language.init();
+
+ // Vérifier la session
+ this.checkSession();
+
+ // Initialiser le Service Worker
+ this.initServiceWorker();
}
- /**
- * Restaurer l'état depuis localStorage
- */
- restoreState() {
- if (!UXConfig.saveState) return;
-
- try {
- const savedPanelState = localStorage.getItem('contextPanelOpen');
- if (savedPanelState === 'true') {
- // Ouvrir avec délai pour meilleure UX
- setTimeout(() => {
- this.modules.context.togglePanel();
- }, 1000);
- }
-
- const savedMenuState = localStorage.getItem('expandedMenus');
- if (savedMenuState) {
- this.modules.navigation.restoreMenuState(JSON.parse(savedMenuState));
- }
-
- } catch (e) {
- if (UXConfig.debug) console.warn('Impossible de restaurer l\'état:', e);
- }
- }
-
- /**
- * Configurer les événements globaux
- */
- setupGlobalEvents() {
- // Gestionnaire de redimensionnement avec debounce
- let resizeTimeout;
- window.addEventListener('resize', () => {
- clearTimeout(resizeTimeout);
- resizeTimeout = setTimeout(() => {
- this.handleResize();
- }, 250);
- });
-
- // Navigation au clavier
- document.addEventListener('keydown', (e) => {
- this.handleKeyboardNavigation(e);
- });
-
- // Prévenir la fermeture accidentelle avec données non sauvegardées
- window.addEventListener('beforeunload', (e) => {
- // Ici vous pouvez ajouter une logique pour vérifier les données non sauvegardées
- // if (this.hasUnsavedChanges()) {
- // e.preventDefault();
- // e.returnValue = '';
- // }
- });
- }
-
- /**
- * Gérer le redimensionnement de la fenêtre
- */
- handleResize() {
- const isMobile = window.innerWidth < 768;
- document.body.classList.toggle('mobile-view', isMobile);
-
- // Ajuster le comportement du sidebar sur mobile
- if (!isMobile && this.sidebarOpen) {
- document.getElementById('sidebar')?.classList.remove('open');
- this.sidebarOpen = false;
- }
- }
-
- /**
- * Gérer la navigation au clavier
- */
- handleKeyboardNavigation(e) {
- // Marquer la navigation clavier pour le CSS
- if (e.key === 'Tab') {
- document.body.classList.add('keyboard-navigation');
- }
-
- // Échap pour fermer les modales
- if (e.key === 'Escape') {
- if (this.contextPanelOpen) {
- this.modules.context.togglePanel();
- }
-
- // Fermer toutes les modales Bootstrap ouvertes
- const openModals = document.querySelectorAll('.modal.show');
- openModals.forEach(modal => {
- const bsModal = bootstrap.Modal.getInstance(modal);
- if (bsModal) bsModal.hide();
- });
- }
-
- // Navigation dans les menus avec flèches
- if (e.target.closest('.sidebar-nav')) {
- this.modules.navigation.handleKeyboardMenuNavigation(e);
- }
- }
-
- /**
- * Démarrer les pollings automatiques
- */
- startPollings() {
- // Polling des notifications
- setInterval(() => {
- this.modules.notifications.pollNotifications();
- }, UXConfig.notificationPollInterval);
-
- // Premier poll immédiat
- setTimeout(() => {
- this.modules.notifications.pollNotifications();
- }, 2000);
- }
-
- /**
- * Basculer le panneau contexte
- */
toggleContextPanel() {
- return this.modules.context.togglePanel();
+ this.contextPanel.toggle();
}
- /**
- * Afficher la modale photo
- */
- openPhotoModal() {
- return this.modules.context.openPhotoModal();
- }
-
- /**
- * Basculer le sidebar mobile
- */
toggleSidebar() {
const sidebar = document.getElementById('sidebar');
- if (!sidebar) return;
+ sidebar.classList.toggle('show');
+ }
+
+ checkSession() {
+ const dureeSession = parseInt(document.getElementById('dureeSession').value) || 30;
+ const dureeMinutes = dureeSession * 60 * 1000;
- this.sidebarOpen = !this.sidebarOpen;
- sidebar.classList.toggle('open');
+ setInterval(() => {
+ const derniereAction = sessionStorage.getItem('derniere_action');
+ const maintenant = Date.now();
+
+ if (derniereAction && (maintenant - derniereAction > dureeMinutes)) {
+ this.showSessionWarning();
+ }
+ }, 60000); // Vérifier toutes les minutes
+ }
+
+ showSessionWarning() {
+ const isAnglophone = window.appConfig.isAnglophone;
+ const message = isAnglophone
+ ? 'Your session will expire soon. Do you want to extend it?'
+ : 'Votre session va bientôt expirer. Souhaitez-vous la prolonger?';
- const toggleBtn = document.querySelector('.sidebar-toggle');
- if (toggleBtn) {
- toggleBtn.setAttribute('aria-expanded', this.sidebarOpen);
+ Swal.fire({
+ title: isAnglophone ? 'Session Warning' : 'Avertissement de session',
+ text: message,
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonText: isAnglophone ? 'Extend' : 'Prolonger',
+ cancelButtonText: isAnglophone ? 'Logout' : 'Déconnexion'
+ }).then((result) => {
+ if (result.isConfirmed) {
+ sessionStorage.setItem('derniere_action', Date.now());
+ } else {
+ window.location.href = window.appConfig.racineWeb + 'Connexion/deconnecter';
+ }
+ });
+ }
+
+ initServiceWorker() {
+ if ('serviceWorker' in navigator) {
+ navigator.serviceWorker.ready.then(registration => {
+ console.log('[UX Manager] Service Worker prêt:', registration.scope);
+ });
+ }
+ }
+}
+
+// Navigation Manager - Gestion des menus
+class NavigationManager {
+ constructor() {
+ this.currentOpenMenu = null;
+ }
+
+ init() {
+ this.setupMenuBehavior();
+ this.setupKeyboardNavigation();
+ this.setupActiveMenu();
+ }
+
+ setupMenuBehavior() {
+ // Désactiver le comportement Bootstrap par défaut
+ document.querySelectorAll('.nav-link[data-bs-toggle="collapse"]').forEach(link => {
+ link.addEventListener('click', (e) => {
+ const targetId = link.getAttribute('href').substring(1);
+ this.toggleMenu(targetId, e);
+ });
+ });
+
+ // Fermer le menu en cliquant ailleurs
+ document.addEventListener('click', (e) => {
+ if (!e.target.closest('.app-sidebar')) {
+ this.closeAllMenus();
+ }
+ });
+ }
+
+ toggleMenu(menuId, event) {
+ if (event) {
+ event.preventDefault();
+ event.stopPropagation();
}
- // Fermer le sidebar si on clique à l'extérieur (mobile uniquement)
- if (this.sidebarOpen && window.innerWidth < 768) {
+ const menu = document.getElementById(menuId);
+ const link = document.querySelector(`[href="#${menuId}"]`);
+
+ if (!menu || !link) return;
+
+ // Si ce menu est déjà ouvert, le fermer
+ if (this.currentOpenMenu === menuId) {
+ this.closeMenu(menuId);
+ this.currentOpenMenu = null;
+ } else {
+ // Fermer le menu actuellement ouvert
+ if (this.currentOpenMenu) {
+ this.closeMenu(this.currentOpenMenu);
+ }
+
+ // Ouvrir le nouveau menu
+ this.openMenu(menuId);
+ this.currentOpenMenu = menuId;
+ }
+ }
+
+ openMenu(menuId) {
+ const menu = document.getElementById(menuId);
+ const link = document.querySelector(`[href="#${menuId}"]`);
+
+ if (menu && link) {
+ menu.classList.add('show');
+ link.classList.add('active');
+ link.setAttribute('aria-expanded', 'true');
+ link.querySelector('.nav-arrow').style.transform = 'rotate(90deg)';
+ }
+ }
+
+ closeMenu(menuId) {
+ const menu = document.getElementById(menuId);
+ const link = document.querySelector(`[href="#${menuId}"]`);
+
+ if (menu && link) {
+ menu.classList.remove('show');
+ link.classList.remove('active');
+ link.setAttribute('aria-expanded', 'false');
+ link.querySelector('.nav-arrow').style.transform = 'rotate(0deg)';
+ }
+ }
+
+ closeAllMenus() {
+ document.querySelectorAll('.nav-submenu.show').forEach(menu => {
+ const menuId = menu.id;
+ this.closeMenu(menuId);
+ });
+ this.currentOpenMenu = null;
+ }
+
+ setupKeyboardNavigation() {
+ document.addEventListener('keydown', (e) => {
+ if (e.key === 'Escape') {
+ this.closeAllMenus();
+ }
+
+ // Navigation par flèches
+ if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
+ const focused = document.activeElement;
+ if (focused.classList.contains('nav-link')) {
+ e.preventDefault();
+ this.navigateMenu(focused, e.key);
+ }
+ }
+ });
+ }
+
+ navigateMenu(currentElement, direction) {
+ const allLinks = Array.from(document.querySelectorAll('.nav-link'));
+ const currentIndex = allLinks.indexOf(currentElement);
+
+ if (direction === 'ArrowDown' && currentIndex < allLinks.length - 1) {
+ allLinks[currentIndex + 1].focus();
+ } else if (direction === 'ArrowUp' && currentIndex > 0) {
+ allLinks[currentIndex - 1].focus();
+ }
+ }
+
+ setupActiveMenu() {
+ // Ouvrir automatiquement le menu actif au chargement
+ const activeParentId = window.appConfig.activeParentId;
+ if (activeParentId !== null && activeParentId !== '') {
+ const menuId = `submenu${activeParentId}`;
setTimeout(() => {
- document.addEventListener('click', this.closeSidebarOnClickOutside.bind(this), { once: true });
+ this.openMenu(menuId);
+ this.currentOpenMenu = menuId;
}, 100);
}
}
-
- /**
- * Fermer le sidebar en cliquant à l'extérieur
- */
- closeSidebarOnClickOutside(e) {
- const sidebar = document.getElementById('sidebar');
- const toggleBtn = document.querySelector('.sidebar-toggle');
-
- if (!sidebar?.contains(e.target) && !toggleBtn?.contains(e.target)) {
- sidebar.classList.remove('open');
- this.sidebarOpen = false;
- if (toggleBtn) toggleBtn.setAttribute('aria-expanded', 'false');
- }
- }
}
-// ============================================
-// MODULE: Gestionnaire de Navigation
-// ============================================
-
-class NavigationManager {
- constructor() {
- this.expandedMenus = new Set();
- this.activeMenuId = window.appConfig?.activeParentId || null;
- this.init();
- }
-
- init() {
- this.setupMenuAutoClose();
- this.highlightActiveMenu();
- this.setupMenuInteractions();
- }
-
- /**
- * Fermer automatiquement les menus inactifs
- */
- setupMenuAutoClose() {
- // Fermer tous les sous-menus sauf celui actif
- document.querySelectorAll('.nav-submenu.show').forEach(submenu => {
- const menuId = submenu.id;
- const parentLink = document.querySelector(`[href="#${menuId}"]`);
-
- if (!parentLink?.classList.contains('active')) {
- this.collapseMenu(submenu.id);
- }
- });
-
- // Fermer les menus quand on clique ailleurs
- document.addEventListener('click', (e) => {
- if (!e.target.closest('.nav-item')) {
- this.collapseAllExceptActive();
- }
- });
- }
-
- /**
- * Mettre en évidence le menu actif
- */
- highlightActiveMenu() {
- if (!this.activeMenuId) return;
-
- const activeLink = document.querySelector(`[href="#submenu${this.activeMenuId}"]`);
- if (activeLink) {
- activeLink.classList.add('active');
- this.expandMenu(`submenu${this.activeMenuId}`);
- }
-
- // Mettre en évidence les enfants actifs
- document.querySelectorAll('.nav-submenu .nav-link').forEach(link => {
- const href = link.getAttribute('href');
- if (href && href.includes(window.appConfig.activeLink)) {
- link.classList.add('active');
- link.setAttribute('aria-current', 'page');
- }
- });
- }
-
- /**
- * Configurer les interactions des menus
- */
- setupMenuInteractions() {
- document.querySelectorAll('.nav-link[data-bs-toggle="collapse"]').forEach(link => {
- link.addEventListener('click', (e) => {
- const menuId = link.getAttribute('href').substring(1);
-
- // Si on clique sur un menu déjà actif, ne rien faire
- if (link.classList.contains('active')) return;
-
- // Fermer tous les autres menus
- this.collapseAllExcept(menuId);
-
- // Sauvegarder l'état
- this.saveMenuState();
- });
- });
- }
-
- /**
- * Développer un menu
- */
- expandMenu(menuId) {
- const submenu = document.getElementById(menuId);
- const parentLink = document.querySelector(`[href="#${menuId}"]`);
-
- if (submenu && parentLink) {
- submenu.classList.add('show');
- parentLink.setAttribute('aria-expanded', 'true');
- parentLink.classList.add('active');
-
- const arrow = parentLink.querySelector('.nav-arrow');
- if (arrow) arrow.style.transform = 'rotate(90deg)';
-
- this.expandedMenus.add(menuId);
- }
- }
-
- /**
- * Réduire un menu
- */
- collapseMenu(menuId) {
- const submenu = document.getElementById(menuId);
- const parentLink = document.querySelector(`[href="#${menuId}"]`);
-
- if (submenu && parentLink) {
- submenu.classList.remove('show');
- parentLink.setAttribute('aria-expanded', 'false');
- parentLink.classList.remove('active');
-
- const arrow = parentLink.querySelector('.nav-arrow');
- if (arrow) arrow.style.transform = 'rotate(0deg)';
-
- this.expandedMenus.delete(menuId);
- }
- }
-
- /**
- * Réduire tous les menus sauf un
- */
- collapseAllExcept(exceptMenuId) {
- document.querySelectorAll('.nav-submenu.show').forEach(submenu => {
- if (submenu.id !== exceptMenuId) {
- this.collapseMenu(submenu.id);
- }
- });
- }
-
- /**
- * Réduire tous les menus sauf l'actif
- */
- collapseAllExceptActive() {
- const activeMenuId = `submenu${this.activeMenuId}`;
- this.collapseAllExcept(activeMenuId);
- }
-
- /**
- * Gérer la navigation clavier dans les menus
- */
- handleKeyboardMenuNavigation(e) {
- const currentItem = e.target.closest('.nav-link');
- if (!currentItem) return;
-
- const items = Array.from(document.querySelectorAll('.nav-link'));
- const currentIndex = items.indexOf(currentItem);
-
- switch (e.key) {
- case 'ArrowDown':
- e.preventDefault();
- if (currentIndex < items.length - 1) {
- items[currentIndex + 1].focus();
- }
- break;
-
- case 'ArrowUp':
- e.preventDefault();
- if (currentIndex > 0) {
- items[currentIndex - 1].focus();
- }
- break;
-
- case 'ArrowRight':
- e.preventDefault();
- if (currentItem.hasAttribute('data-bs-toggle')) {
- const menuId = currentItem.getAttribute('href').substring(1);
- this.expandMenu(menuId);
- }
- break;
-
- case 'ArrowLeft':
- e.preventDefault();
- if (currentItem.hasAttribute('data-bs-toggle')) {
- const menuId = currentItem.getAttribute('href').substring(1);
- this.collapseMenu(menuId);
- }
- break;
-
- case 'Enter':
- case ' ':
- e.preventDefault();
- if (currentItem.hasAttribute('data-bs-toggle')) {
- const menuId = currentItem.getAttribute('href').substring(1);
- if (this.expandedMenus.has(menuId)) {
- this.collapseMenu(menuId);
- } else {
- this.expandMenu(menuId);
- }
- } else if (currentItem.href) {
- window.location.href = currentItem.href;
- }
- break;
- }
- }
-
- /**
- * Sauvegarder l'état des menus
- */
- saveMenuState() {
- if (!UXConfig.saveState) return;
-
- try {
- const state = Array.from(this.expandedMenus);
- localStorage.setItem('expandedMenus', JSON.stringify(state));
- } catch (e) {
- if (UXConfig.debug) console.warn('Impossible de sauvegarder l\'état des menus:', e);
- }
- }
-
- /**
- * Restaurer l'état des menus
- */
- restoreMenuState(state) {
- if (!Array.isArray(state)) return;
-
- state.forEach(menuId => {
- this.expandMenu(menuId);
- });
- }
-}
-
-// ============================================
-// MODULE: Gestionnaire du Panneau Contexte
-// ============================================
-
+// Context Panel Manager - Gestion du panneau de contexte
class ContextPanelManager {
constructor() {
this.panel = document.getElementById('contextPanel');
this.toggleButton = document.querySelector('.context-toggle');
this.proximityArea = document.querySelector('.proximity-hover-area');
this.isOpen = false;
-
- this.init();
}
init() {
- if (!this.panel || !this.toggleButton) {
- console.warn('❌ Éléments du panneau contexte non trouvés');
- return;
- }
-
this.setupProximityDetection();
- this.setupAnimations();
- this.setupCloseBehavior();
+ this.setupKeyboardControls();
}
- /**
- * Détection de proximité (style QuillBot)
- */
setupProximityDetection() {
if (!this.proximityArea) return;
- let proximityTimeout;
+ this.proximityArea.addEventListener('mouseenter', () => {
+ this.toggleButton.style.opacity = '1';
+ this.toggleButton.style.transform = 'scale(1.1)';
+ });
- // Détection de la souris
- document.addEventListener('mousemove', (e) => {
- if (this.isOpen) return;
-
- const rect = this.proximityArea.getBoundingClientRect();
- const centerX = rect.left + rect.width / 2;
- const centerY = rect.top + rect.height / 2;
-
- const distance = Math.sqrt(
- Math.pow(e.clientX - centerX, 2) +
- Math.pow(e.clientY - centerY, 2)
- );
-
- clearTimeout(proximityTimeout);
-
- if (distance < UXConfig.proximityRadius) {
- // Souris proche - montrer le bouton
- this.showButton();
- } else {
- // Souris éloignée - cacher progressivement
- proximityTimeout = setTimeout(() => {
- this.hideButton();
- }, 1000);
+ this.proximityArea.addEventListener('mouseleave', () => {
+ if (!this.isOpen) {
+ this.toggleButton.style.opacity = '0.2';
+ this.toggleButton.style.transform = 'scale(1)';
}
});
- // Toujours montrer le bouton quand le panel est ouvert
- this.panel.addEventListener('transitionend', () => {
- if (this.isOpen) {
- this.showButton();
- }
- });
+ // Initial opacity
+ this.toggleButton.style.opacity = '0.2';
}
- /**
- * Afficher le bouton contexte
- */
- showButton() {
- if (this.toggleButton) {
- this.toggleButton.style.opacity = '0.8';
- this.toggleButton.classList.add('active');
- }
- }
-
- /**
- * Cacher le bouton contexte
- */
- hideButton() {
- if (this.toggleButton && !this.isOpen) {
- this.toggleButton.style.opacity = '0.2';
- this.toggleButton.classList.remove('active');
- }
- }
-
- /**
- * Configurer les animations
- */
- setupAnimations() {
- // Observer pour animations d'entrée
- const observer = new IntersectionObserver((entries) => {
- entries.forEach(entry => {
- if (entry.isIntersecting) {
- entry.target.classList.add('animate__animated', 'animate__fadeInUp');
- }
- });
- }, { threshold: 0.1 });
-
- // Observer les sections du panneau
- document.querySelectorAll('.context-section').forEach(section => {
- observer.observe(section);
- });
- }
-
- /**
- * Configurer le comportement de fermeture
- */
- setupCloseBehavior() {
- // Fermer avec Échap
+ setupKeyboardControls() {
document.addEventListener('keydown', (e) => {
+ if (e.ctrlKey && e.shiftKey && e.key === 'C') {
+ e.preventDefault();
+ this.toggle();
+ }
+
if (e.key === 'Escape' && this.isOpen) {
- this.togglePanel();
- }
- });
-
- // Fermer en cliquant à l'extérieur
- document.addEventListener('click', (e) => {
- if (this.isOpen &&
- !this.panel.contains(e.target) &&
- !this.toggleButton.contains(e.target)) {
- this.togglePanel();
+ this.close();
}
});
}
- /**
- * Basculer l'état du panneau
- */
- togglePanel() {
- this.isOpen = !this.isOpen;
-
+ toggle() {
if (this.isOpen) {
- this.openPanel();
+ this.close();
} else {
- this.closePanel();
+ this.open();
}
-
- // Mettre à jour les attributs ARIA
- this.toggleButton.setAttribute('aria-expanded', this.isOpen);
-
- // Sauvegarder l'état
- if (UXConfig.saveState) {
- localStorage.setItem('contextPanelOpen', this.isOpen.toString());
- }
-
- return this.isOpen;
}
- /**
- * Ouvrir le panneau
- */
- openPanel() {
+ open() {
this.panel.classList.add('open');
- this.toggleButton.classList.add('panel-open');
+ this.toggleButton.setAttribute('aria-expanded', 'true');
+ this.toggleButton.style.opacity = '1';
+ this.isOpen = true;
- // Focus sur le premier élément focusable
+ // Focus sur le bouton de fermeture
setTimeout(() => {
- const firstFocusable = this.panel.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
- if (firstFocusable) firstFocusable.focus();
- }, UXConfig.transitionSpeed);
-
- // Émettre un événement personnalisé
- this.dispatchEvent('contextpanel:open');
+ this.panel.querySelector('.context-close').focus();
+ }, 300);
}
- /**
- * Fermer le panneau
- */
- closePanel() {
+ close() {
this.panel.classList.remove('open');
- this.toggleButton.classList.remove('panel-open');
+ this.toggleButton.setAttribute('aria-expanded', 'false');
+ this.toggleButton.style.opacity = '0.2';
+ this.isOpen = false;
// Retourner le focus au bouton toggle
this.toggleButton.focus();
-
- // Cacher progressivement le bouton
- setTimeout(() => {
- if (!this.isOpen) this.hideButton();
- }, 1000);
-
- // Émettre un événement personnalisé
- this.dispatchEvent('contextpanel:close');
- }
-
- /**
- * Ouvrir la modale photo
- */
- openPhotoModal() {
- const modalElement = document.getElementById('photoModal');
- if (modalElement) {
- const modal = new bootstrap.Modal(modalElement);
- modal.show();
- }
- }
-
- /**
- * Émettre un événement personnalisé
- */
- dispatchEvent(eventName, detail = {}) {
- const event = new CustomEvent(eventName, {
- detail: { ...detail, timestamp: Date.now() }
- });
- document.dispatchEvent(event);
}
}
-// ============================================
-// MODULE: Gestionnaire de Notifications
-// ============================================
-
+// Notification Manager
class NotificationManager {
constructor() {
- this.badge = document.getElementById('notificationCount');
- this.lastCount = 0;
- this.unreadMessages = [];
-
- this.init();
+ this.countElement = document.getElementById('notificationCount');
+ this.unreadCount = 0;
}
init() {
- this.setupBadgeAnimation();
- this.setupMessagePolling();
+ this.loadNotifications();
+ this.setupPolling();
}
- /**
- * Configurer l'animation du badge
- */
- setupBadgeAnimation() {
- if (!this.badge) return;
-
- // Animation de pulse pour nouveaux messages
- this.badge.addEventListener('animationend', () => {
- this.badge.classList.remove('pulse');
- });
+ loadNotifications() {
+ // Simuler le chargement des notifications
+ this.updateCount(3); // Exemple: 3 notifications non lues
}
- /**
- * Configurer le polling des messages
- */
- setupMessagePolling() {
- // Poll initial
- this.pollNotifications();
-
- // Écouter les événements de nouvelle notification
- document.addEventListener('newnotification', (e) => {
- this.handleNewNotification(e.detail);
- });
- }
-
- /**
- * Poller les notifications
- */
- async pollNotifications() {
- try {
- // Remplacer par votre appel API réel
- const response = await this.fetchNotifications();
- const data = await response.json();
+ updateCount(count) {
+ this.unreadCount = count;
+ if (this.countElement) {
+ this.countElement.textContent = count;
+ this.countElement.style.display = count > 0 ? 'flex' : 'none';
- this.updateBadge(data.count);
-
- if (data.newMessages > 0) {
- this.showNewNotificationAlert(data.newMessages);
- this.unreadMessages = data.messages || [];
- }
-
- } catch (error) {
- if (UXConfig.debug) console.warn('Erreur polling notifications:', error);
+ // Mettre à jour le titre de la page
+ const baseTitle = document.title.replace(/^\(\d+\)\s*/, '');
+ document.title = count > 0 ? `(${count}) ${baseTitle}` : baseTitle;
}
}
- /**
- * Récupérer les notifications
- */
- async fetchNotifications() {
- // Simuler une API - remplacer par votre endpoint réel
- return {
- ok: true,
- json: async () => ({
- count: Math.floor(Math.random() * 10),
- newMessages: Math.random() > 0.7 ? 1 : 0,
- messages: []
- })
- };
-
- // En production, utiliser :
- // return fetch('api/notifications/count', {
- // headers: { 'X-Requested-With': 'XMLHttpRequest' }
- // });
+ setupPolling() {
+ // Vérifier les nouvelles notifications toutes les 30 secondes
+ setInterval(() => {
+ // À implémenter: appel AJAX pour vérifier les nouvelles notifications
+ // this.checkNewNotifications();
+ }, 30000);
}
- /**
- * Mettre à jour le badge
- */
- updateBadge(count) {
- if (!this.badge) return;
+ showMessagesModal() {
+ const modal = new bootstrap.Modal(document.getElementById('messagesModal'));
+ modal.show();
- const hasNew = count > this.lastCount;
- this.lastCount = count;
-
- this.badge.textContent = count;
- this.badge.style.display = count > 0 ? 'flex' : 'none';
-
- if (hasNew && count > 0) {
- this.badge.classList.add('pulse');
-
- // Notification système si autorisée
- if (Notification.permission === 'granted' && document.hidden) {
- this.showSystemNotification(count);
- }
- }
+ // Charger les messages
+ this.loadMessages();
}
- /**
- * Afficher une alerte pour nouvelles notifications
- */
- showNewNotificationAlert(count) {
- // Créer un toast Bootstrap
- const toastHTML = `
-
-
- ');
-
- $.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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
-
- $.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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
-
- 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").prop('disabled', true);
-
- $("#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").prop('disabled', true);
-
- 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").prop('disabled', true);
- $("#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").prop('disabled', false);
- */
-}
-
-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").prop('disabled', true);
- $("#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").prop('disabled', false);
- */
-
- 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").prop('disabled', false);
- 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").prop('disabled', true);
-
- $.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();
@@ -3955,13201 +64,6 @@ function ajax_context_beneficiaire_afficher(idBeneficiaire, okId)
});
}
-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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
-
- $.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").prop('disabled', true);
- // $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
-
- $.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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
-
- $.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").prop('disabled', true);
- $("#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").prop('disabled', true);
-
- // 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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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").prop('disabled', true);
- $("#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()
-{
- $.ajax({
- url: $("#racineWeb").val()+"Ajaxmessagerieliste/",
- error: function(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 == undefined || codeSociete <= " ") && 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);
- msgNonLus=$("#msgNonLus").val();
- $("#span_notification").text(msgNonLus);
- // Ajout du 27/10/2024 => déconnecter si session expirée
- deconnexion=$("#deconnexion").val();
-
- // alert("deconnexion => "+deconnexion);
-
- 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();
- }
-
-
- if($('#nomForm').val() == "histordv")
- {
- listerrdv();
- }
-
-});
-
-// 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();
-
-
- 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){
- debugger;
- 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").prop('disabled', false);
- $("#login").focus();
-
- }else
- {
- $("#btn_connexion").prop('disabled', true);
- }
- }
- });
-}
-
-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()
{
@@ -17167,1656 +81,3 @@ function change_password()
}
});
}
-
-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)
-{
- $("#contenu").html('' + '' + '
');
-
- 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/");
-}
-
-function alert_limite(code)
-{
- if(code=="G"){
- v_msg="Limite du plafond ou du nombre de transaction est atteint pour cette garantie !";
- v_msgEng="Limit of the ceiling or number of transactions has been reached for this guarantee!";
- }else{
- v_msg="Limite du plafond ou du nombre de transaction est atteint pour cet acte !";
- v_msgEng="Limit of the ceiling or number of transactions has been reached for this act!";
- }
-
-
- alert_ebene(v_msg, v_msgEng);
- return;
-}
-
-//Face KANE 26-09-2025
-function re_init_photo_face()
-{
- var photo = document.getElementById('photo_face');
- photo.setAttribute('src', "");
- $('#message_face').html("");
- $('#image_face').val("");
- $("#div_wait_face_ebene").html('');
-}
-
-function ebene_init_photo_face() // OK
-{
- faceRegistered = $("#faceRegistered").val();
- if(faceRegistered=="1")
- {
- v_msg="Cettte personne a déjà une face dans le système!";
- v_msgEng="This person already has a face in the system!";
- alert_ebene(v_msg, v_msgEng);
- $('#message_face').html("");
- return;
- }
- re_init_photo_face();
- $("#btn_pop_save_face").click();
-}
-
-function ebene_enregistrer_photo_face() // OK
-{
- $("#ebene_confirmer_photo_face").prop('disabled', true);
- $("#ebene_supprimer_photo_face").prop('disabled', true);
- $("#ebene_take_photo_face").prop('disabled', true);
- $("#motif").prop('disabled', true);
-
- $("ebene_confirmer_photo_face").prop('disabled', true);
- $("ebene_supprimer_photo_face").prop('disabled', true);
- $("ebene_take_photo_face").prop('disabled', true);
- $("motif").prop('disabled', true);
-
- $('#message_face').html("");
- $("#div_wait_face_ebene").html('');
-
- $("#okId").val("-1");
- $("#okId_face").val("-1");
-
- $("#del_face").val("0");
- image_face = $("#image_face").val();
- if(image_face<=" ")
- {
- v_msg="Veuillez prendre une photo!";
- v_msgEng="Please take a photo!";
- alert_ebene(v_msg, v_msgEng);
- return;
- }
-
- $("#div_wait_face_ebene").html('' + '' + '
');
-
- compare_face = $("#compare_face").val();
-
- v_idBeneficiaire=$("#idBeneficiaire_C").val();
-
- var dataURL = canvas.toDataURL("image/jpeg");
-
- $.ajax({
- url: $("#racineWeb").val()+"Fichebeneficiaire/ebeneenregistrerface/",
- type: 'POST',
- data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"},
- success: function(data) {
- $("#ebene_take_photo_face").prop('disabled', false);
- $("#div_wait_face_ebene").html('');
- $("#message_face").html(data);
- photo_succes = $("#photo_succes").val();
- if(photo_succes=="1")
- {
- v_msg="Enrôlement effectué avec succès!";
- v_msgEng="Enrollment completed successfully!!";
- // alert_ebene(v_msg, v_msgEng);
- setTimeout(() => {
- window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+v_idBeneficiaire);
- }, 1000)
- }
- },
- error: function(data) {
- },
- complete: function(data) {
- $("#div_wait_face_ebene").html('');
- }
- });
-}
-
-function fiche_beneficiaire()
-{
- idBeneficiaire = $("#idBeneficiaire").val();
-
- window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+idBeneficiaire);
-}
-
-/*
-function actualiser_page()
-{
- window.location.assign($("#racineWeb" ).val()+$("#vue" ).val()+"/");
-}
-*/
-
-function actualiser_page() {
-
- $("#contenu").html('' + '' + '
');
-
-
- location.reload();
-}
-
-function prestataires(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Prestataires/");
-}
-
-function historiqueremboursement(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Historiqueremboursement/");
-}
-
-function historiquecontestation(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Historiquecontestation/");
-}
-
-
-function gedglobal(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Ged/");
-}
-
-
-function historiquerdv(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Historiquerdv/");
-}
-
-function envoisms(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Envoisms/");
-}
-
-
-function pharmaciegarde(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Pharmaciegarde()/");
-}
-
-function accueilassure(){
- $("#contenu").html('' + '' + '
');
-
- window.location.assign($("#racineWeb" ).val()+"Accueilassure/");
-}
\ No newline at end of file
diff --git a/Js/sw-register.js b/Js/sw-register.js
new file mode 100644
index 0000000..86afa33
--- /dev/null
+++ b/Js/sw-register.js
@@ -0,0 +1,132 @@
+// Enregistrement du Service Worker
+if ('serviceWorker' in navigator) {
+ window.addEventListener('load', function() {
+ // S'assurer que nous sommes sur HTTPS en production
+ if (location.protocol === 'https:' || location.hostname === 'localhost') {
+ navigator.serviceWorker.register('/service-worker.js')
+ .then(function(registration) {
+ console.log('[Service Worker] Enregistré avec succès:', registration.scope);
+
+ // Vérifier les mises à jour
+ registration.addEventListener('updatefound', () => {
+ const newWorker = registration.installing;
+ console.log('[Service Worker] Mise à jour trouvée:', newWorker.state);
+
+ newWorker.addEventListener('statechange', () => {
+ if (newWorker.state === 'installed' && navigator.serviceWorker.controller) {
+ // Nouvelle version disponible
+ console.log('[Service Worker] Nouvelle version disponible');
+ this.showUpdateNotification();
+ }
+ });
+ });
+ })
+ .catch(function(error) {
+ console.error('[Service Worker] Échec de l\'enregistrement:', error);
+ });
+ }
+ });
+
+ // Gestion hors ligne
+ window.addEventListener('online', () => {
+ document.documentElement.classList.remove('offline');
+ console.log('[App] Connexion rétablie');
+ this.showOnlineNotification();
+ });
+
+ window.addEventListener('offline', () => {
+ document.documentElement.classList.add('offline');
+ console.log('[App] Mode hors ligne');
+ this.showOfflineNotification();
+ });
+}
+
+// Notification de mise à jour
+function showUpdateNotification() {
+ if (window.appConfig?.isAnglophone) {
+ if (confirm('A new version is available. Reload the page?')) {
+ window.location.reload();
+ }
+ } else {
+ if (confirm('Une nouvelle version est disponible. Recharger la page?')) {
+ window.location.reload();
+ }
+ }
+}
+
+// Notification en ligne
+function showOnlineNotification() {
+ // Créer une notification toast
+ const toast = document.createElement('div');
+ toast.className = 'position-fixed top-0 end-0 p-3';
+ toast.style.zIndex = '9999';
+
+ toast.innerHTML = `
+
+
+
+ ${window.appConfig?.isAnglophone
+ ? 'Connection restored. Synchronization in progress...'
+ : 'Connexion rétablie. Synchronisation en cours...'}
+
+
+ `;
+
+ document.body.appendChild(toast);
+
+ // Supprimer après 3 secondes
+ setTimeout(() => {
+ toast.remove();
+ }, 3000);
+}
+
+// Notification hors ligne
+function showOfflineNotification() {
+ // Créer une notification toast
+ const toast = document.createElement('div');
+ toast.className = 'position-fixed top-0 end-0 p-3';
+ toast.style.zIndex = '9999';
+
+ toast.innerHTML = `
+
+
+
+ ${window.appConfig?.isAnglophone
+ ? 'No internet connection. Working in offline mode.'
+ : 'Pas de connexion Internet. Mode hors ligne actif.'}
+
+
+ `;
+
+ document.body.appendChild(toast);
+
+ // Supprimer après 5 secondes
+ setTimeout(() => {
+ toast.remove();
+ }, 5000);
+}
+
+// Fonction pour forcer la mise à jour du Service Worker
+function updateServiceWorker() {
+ if ('serviceWorker' in navigator) {
+ navigator.serviceWorker.ready.then(registration => {
+ registration.update().then(() => {
+ console.log('[Service Worker] Mise à jour forcée');
+ });
+ });
+ }
+}
+
+// Exporter pour une utilisation externe
+window.serviceWorker = {
+ update: updateServiceWorker,
+ isSupported: 'serviceWorker' in navigator
+};
\ No newline at end of file
diff --git a/Vue/gabarit.php b/Vue/gabarit.php
index b2d7d38..bc897cb 100755
--- a/Vue/gabarit.php
+++ b/Vue/gabarit.php
@@ -34,61 +34,68 @@ foreach ($menus as $key0 => $menuParent) {
-
+
= htmlspecialchars($_SESSION['vue'] ?? 'INTER SANTÉ') ?> | Portail Santé
-
+
-
-
-
+
+
+
+
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -98,11 +105,11 @@ foreach ($menus as $key0 => $menuParent) {