{"id":35417,"date":"2022-06-01T11:33:07","date_gmt":"2022-06-01T15:33:07","guid":{"rendered":"https:\/\/dormalab.com\/questionnaire-matinal\/"},"modified":"2025-02-10T08:38:57","modified_gmt":"2025-02-10T13:38:57","slug":"questionnaire-matinal","status":"publish","type":"page","link":"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/","title":{"rendered":"Questionnaire du matin"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"35417\" class=\"elementor elementor-35417 elementor-35413\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-21b7001 e-flex e-con-boxed e-con e-parent\" data-id=\"21b7001\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8519ebc elementor-widget elementor-widget-html\" data-id=\"8519ebc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Document<\/title>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            margin: 20px;\n            padding: 0;\n        }\n\n        h1 {\n            text-align: left;\n            margin-top: 50px;\n            font-size: 45px;\n            margin-left: 450px;\n            margin-bottom: 40px;\n        }\n\n        h2 {\n            color: #007BFF;\n            font-size: 25px;\n            margin-top: 30px;\n            margin-bottom: 30px;\n        }\n\n        form {\n            max-width: 600px;\n            margin: 20px auto;\n            display: none;\n        }\n\n        form.active {\n            display: block;\n        }\n\n        label {\n            display: block;\n            margin-top: 15px;\n        }\n\n        input,\n        textarea {\n            width: 100%;\n            padding: 10px;\n            margin-top: 5px;\n            font-size: 16px;\n            box-sizing: border-box;\n        }\n\n        button {\n            background-color: #007BFF;\n            width: 20%;\n            height: 30%;\n            font-size: 16px;\n            padding: 10px;\n            margin-top: 5px;\n            color: white;\n            border: none;\n            cursor: pointer;\n            margin-top: 20px;\n            box-sizing: border-box;\n        }\n\n        button:hover {\n            background-color: #0056b3;\n        }\n    <\/style>\n<\/head>\n\n<body>\n    <!-- Formulaire en anglais -->\n    <div id=\"errorMessageDiv\"><\/div>\n    <form class=\"active\" id=\"morning-questionnaire\">\n        <h2>Questionnaire du matin<\/h2>\n        <label for=\"wake-up-time\">\u00c0 quelle heure vous \u00eates-vous r\u00e9veill\u00e9(e) ce matin?<\/label>\n        <input type=\"text\" id=\"wake-up-time\" name=\"wake-up-time\" required>\n\n        <label for=\"wake-up-times\">Combien de fois vous \u00eates-vous r\u00e9veill\u00e9(e) la nuit derni\u00e8re?<\/label>\n        <input type=\"text\" id=\"wake-up-times\" name=\"wake-up-times\" min=\"0\" required>\n\n        <label for=\"lights-out-time\">\u00c0 quelle heure avez-vous \u00e9teint la lumi\u00e8re hier soir? (Heure et minute)<\/label>\n        <input type=\"text\" id=\"lights-out-time\" name=\"lights-out-time\" required>\n\n        <label for=\"fall-asleep-time\">Combien de temps (en minutes) pensez-vous avoir mis pour vous endormir hier\n            soir?<\/label>\n        <input type=\"text\" id=\"fall-asleep-time\" name=\"fall-asleep-time\" min=\"0\" required>\n\n        <label for=\"awake-times\">\u00c0 quelles heures vous \u00eates-vous r\u00e9veill\u00e9(e)? (approximativement)<\/label>\n        <input type=\"text\" id=\"awake-times\" name=\"awake-times\" required>\n\n        <label for=\"differences\">\u00c0 part l'appareil, y a-t-il eu quelque chose qui a rendu votre nuit diff\u00e9rente des\n            nuits habituelles?<\/label>\n        <textarea id=\"differences\" name=\"differences\" rows=\"4\"><\/textarea>\n\n        <button type=\"submit\">Soumettre<\/button>\n    <\/form>\n\n    <script>\n\n        function getSleepStudyId() {\n            const urlParams = new URLSearchParams(window.location.search);\n            return urlParams.get('sleepStudyId');\n        }\n\n        document.getElementById(\"morning-questionnaire\").addEventListener(\"submit\", async function (event) {\n            event.preventDefault();\n\n            let sleepStudyId = getSleepStudyId();\n            console.log(\"Retrieved sleepStudyId from url params:\", sleepStudyId);\n\n            if (!sleepStudyId) {\n                console.log(\"No sleepStudyId provided. Failed loading\");\n                if (!sleepStudyId) {\n                    alert(\"Failed to retrieve sleepStudyId. Please try again.\");\n                    return;\n                }\n            }\n\n            console.log(\"sleepStudyId:\", sleepStudyId);\n\n            const requestData = {\n                sleepStudyId: sleepStudyId,\n                morningWakeupTime: document.getElementById(\"wake-up-time\").value,\n                numberOfTimesAwoke: document.getElementById(\"wake-up-times\").value,\n                lightsTurnedOffTime: document.getElementById(\"lights-out-time\").value,\n                minutesToFallAsleep: document.getElementById(\"fall-asleep-time\").value,\n                awakeTimes: document.getElementById(\"awake-times\").value,\n                nightDifference: document.getElementById(\"differences\").value\n            };\n\n            try {\n                const response = await fetch(\"http:\/\/localhost:3000\/dev\/sleepStudy\/submitMorningQuestionnaire\", {\n                    method: \"POST\",\n                    headers: {\n                        \"Content-Type\": \"application\/json\"\n                    },\n                    body: JSON.stringify(requestData)\n                });\n\n                const data = await response.json();\n                console.log(\"Server Response:\", data);\n\n                if (data.success) {\n                    alert(\"Questionnaire envoy\u00e9 avec succ\u00e8s!\");\n                } else {\n                    alert(\"Error submitting questionnaire : \" + data.error);\n                }\n            } catch (error) {\n                console.error(\"Error:\", error);\n                alert(\"An error occurred while submitting the questionnaire.\");\n            }\n        });\n\n        document.addEventListener(\"DOMContentLoaded\", function () {\n            const sleepStudyId = getSleepStudyId();\n            const errorMessageDiv = document.getElementById(\"errorMessageDiv\");\n\n            if (!sleepStudyId) {\n                errorMessageDiv.innerHTML = \"<p class='error'>On dirait qu'il y a une erreur et on ne peut pas charger votre formulaire. Veuillez contacter le 1-855-218-5186.<\/p>\";\n                document.getElementById(\"morning-questionnaire\").style.display = \"none\";\n            } \n        })\n    <\/script>\n<\/body>\n\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Document Questionnaire du matin \u00c0 quelle heure vous \u00eates-vous r\u00e9veill\u00e9(e) ce matin? Combien de fois vous \u00eates-vous r\u00e9veill\u00e9(e) la nuit derni\u00e8re? \u00c0 quelle heure avez-vous \u00e9teint la lumi\u00e8re hier soir? (Heure et minute) Combien de temps (en minutes) pensez-vous avoir mis pour vous endormir hier soir? \u00c0 quelles heures vous \u00eates-vous r\u00e9veill\u00e9(e)? (approximativement) \u00c0 part &#8230; <a title=\"Questionnaire du matin\" class=\"read-more\" href=\"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/\" aria-label=\"En savoir plus sur Questionnaire du matin\">Lire la suite<\/a><\/p>\n","protected":false},"author":20,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-35417","page","type-page","status-publish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Questionnaire du matin - \u00c9valuez votre sommeil - Dorma Sleep Clinics<\/title>\n<meta name=\"description\" content=\"Remplissez le questionnaire m\u00e9dical et laissez un sp\u00e9cialiste du sommeil \u00e9valuer votre sommeil. Nous diagnostiquons l&#039;apn\u00e9e du sommeil, l&#039;insomnie et le ronflement.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Questionnaire du matin - \u00c9valuez votre sommeil - Dorma Sleep Clinics\" \/>\n<meta property=\"og:description\" content=\"Remplissez le questionnaire m\u00e9dical et laissez un sp\u00e9cialiste du sommeil \u00e9valuer votre sommeil. Nous diagnostiquons l&#039;apn\u00e9e du sommeil, l&#039;insomnie et le ronflement.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/\" \/>\n<meta property=\"og:site_name\" content=\"Dorma Sleep Clinics\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-10T13:38:57+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/questionnaire-matinal\\\/\",\"url\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/questionnaire-matinal\\\/\",\"name\":\"Questionnaire du matin - \u00c9valuez votre sommeil - Dorma Sleep Clinics\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/#website\"},\"datePublished\":\"2022-06-01T15:33:07+00:00\",\"dateModified\":\"2025-02-10T13:38:57+00:00\",\"description\":\"Remplissez le questionnaire m\u00e9dical et laissez un sp\u00e9cialiste du sommeil \u00e9valuer votre sommeil. Nous diagnostiquons l'apn\u00e9e du sommeil, l'insomnie et le ronflement.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/questionnaire-matinal\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/dormalab.com\\\/fr\\\/questionnaire-matinal\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/questionnaire-matinal\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Questionnaire du matin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/\",\"name\":\"Dorma Sleep Clinics\",\"description\":\"Sleep Well Live Well\",\"publisher\":{\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/#organization\",\"name\":\"Dorma Clinique Du Sommeil\",\"url\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/dormalab.com\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/Dorma-Logotype-RGB-Black-scaled-e1578787470924.png\",\"contentUrl\":\"https:\\\/\\\/dormalab.com\\\/wp-content\\\/uploads\\\/2019\\\/10\\\/Dorma-Logotype-RGB-Black-scaled-e1578787470924.png\",\"width\":120,\"height\":25,\"caption\":\"Dorma Clinique Du Sommeil\"},\"image\":{\"@id\":\"https:\\\/\\\/dormalab.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Questionnaire du matin - \u00c9valuez votre sommeil - Dorma Sleep Clinics","description":"Remplissez le questionnaire m\u00e9dical et laissez un sp\u00e9cialiste du sommeil \u00e9valuer votre sommeil. Nous diagnostiquons l'apn\u00e9e du sommeil, l'insomnie et le ronflement.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/","og_locale":"fr_FR","og_type":"article","og_title":"Questionnaire du matin - \u00c9valuez votre sommeil - Dorma Sleep Clinics","og_description":"Remplissez le questionnaire m\u00e9dical et laissez un sp\u00e9cialiste du sommeil \u00e9valuer votre sommeil. Nous diagnostiquons l'apn\u00e9e du sommeil, l'insomnie et le ronflement.","og_url":"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/","og_site_name":"Dorma Sleep Clinics","article_modified_time":"2025-02-10T13:38:57+00:00","twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/","url":"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/","name":"Questionnaire du matin - \u00c9valuez votre sommeil - Dorma Sleep Clinics","isPartOf":{"@id":"https:\/\/dormalab.com\/fr\/#website"},"datePublished":"2022-06-01T15:33:07+00:00","dateModified":"2025-02-10T13:38:57+00:00","description":"Remplissez le questionnaire m\u00e9dical et laissez un sp\u00e9cialiste du sommeil \u00e9valuer votre sommeil. Nous diagnostiquons l'apn\u00e9e du sommeil, l'insomnie et le ronflement.","breadcrumb":{"@id":"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dormalab.com\/fr\/questionnaire-matinal\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dormalab.com\/fr\/questionnaire-matinal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dormalab.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Questionnaire du matin"}]},{"@type":"WebSite","@id":"https:\/\/dormalab.com\/fr\/#website","url":"https:\/\/dormalab.com\/fr\/","name":"Dorma Sleep Clinics","description":"Sleep Well Live Well","publisher":{"@id":"https:\/\/dormalab.com\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dormalab.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/dormalab.com\/fr\/#organization","name":"Dorma Clinique Du Sommeil","url":"https:\/\/dormalab.com\/fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/dormalab.com\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/dormalab.com\/wp-content\/uploads\/2019\/10\/Dorma-Logotype-RGB-Black-scaled-e1578787470924.png","contentUrl":"https:\/\/dormalab.com\/wp-content\/uploads\/2019\/10\/Dorma-Logotype-RGB-Black-scaled-e1578787470924.png","width":120,"height":25,"caption":"Dorma Clinique Du Sommeil"},"image":{"@id":"https:\/\/dormalab.com\/fr\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/dormalab.com\/fr\/wp-json\/wp\/v2\/pages\/35417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dormalab.com\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dormalab.com\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dormalab.com\/fr\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/dormalab.com\/fr\/wp-json\/wp\/v2\/comments?post=35417"}],"version-history":[{"count":0,"href":"https:\/\/dormalab.com\/fr\/wp-json\/wp\/v2\/pages\/35417\/revisions"}],"wp:attachment":[{"href":"https:\/\/dormalab.com\/fr\/wp-json\/wp\/v2\/media?parent=35417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}