Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.62 KB | None | 0 0
  1. let table = {
  2. 1: {
  3. "question_text": "Êtes-vous enceinte?",
  4. "question_img": "enceinte.png",
  5. "type": 1,
  6. "doctor": false,
  7. "response": {
  8. 'oui': {
  9. 'text': 'Oui',
  10. 'image': 'oui.gif',
  11.  
  12. },
  13. 'non': {
  14. 'text': 'Non',
  15. 'image': 'non.jpg'
  16. }
  17. },
  18. "callback": function (obj, data) {
  19. if (data === "oui") {
  20. obj.goto(2);
  21. }
  22. if (data === 'non') {
  23. window.location.href = '#!/'
  24.  
  25. }
  26. }
  27.  
  28. },
  29. 2: {
  30. "question_text": "Terme?",
  31. "question_img": "",
  32. "type": 1,
  33. "doctor": true,
  34. "response": {
  35. '_24SA': {
  36. 'text': '< 24 SA',
  37. 'image': ''
  38. },
  39. '24SA': {
  40. 'text': '> 24 SA',
  41. 'image': ''
  42. },
  43. '34SA': {
  44. 'text': '> 34 SA',
  45. 'image': ''
  46. }
  47.  
  48. },
  49. "callback": function (obj, data)
  50. // Sauvegarde à faire sur le terme, à savoir que sur la question ''Contractions ultérines'' il y aura <34 SA qui n'est pas une réponse ici.
  51. {
  52. if (data === "_24SA") {
  53. obj.goto(3);
  54.  
  55. terme = 22;
  56. }
  57. if (data === '24SA') {
  58. obj.goto(3);
  59. terme = 27;
  60. }
  61. if (data === "34SA") {
  62. obj.goto(3);
  63. terme = 38;
  64. }
  65. }
  66. },
  67.  
  68. 3: {
  69. "question_text": "Avez-vous des enfants?",
  70. "question_img": "parite.png",
  71. "type": 1,
  72. "doctor": false,
  73. "response":
  74. {
  75.  
  76. 'oui': {
  77. 'text': 'Oui',
  78. 'image': 'oui.gif'
  79. },
  80. 'non': {
  81. 'text': 'Non',
  82. 'image': 'non.jpg'
  83. },
  84.  
  85.  
  86. },
  87. "callback": function (obj, data) {
  88. if (data === "oui") {
  89. obj.goto(4);
  90. }
  91. if (data === 'non') {
  92. obj.goto(5);
  93. }
  94.  
  95.  
  96. }
  97. },
  98. 4: {
  99. "question_text": "Combien en avez-vous?",
  100. "question_img": "parite.png",
  101. "type": 1,
  102. "doctor": false,
  103. "response": {
  104. '1': {
  105. 'text': 'I',
  106. 'image': ''
  107. },
  108. '2': {
  109. 'text': 'II',
  110. 'image': ''
  111. },
  112. '3': {
  113. 'text': 'III',
  114. 'image': ''
  115. },
  116. '4': {
  117. 'text': 'IIII',
  118. 'image': ''
  119. },
  120. '5': {
  121. 'text': 'IIIII',
  122. 'image': ''
  123. },
  124. '6': {
  125. 'text': 'IIIII+',
  126. 'image': ''
  127. },
  128. },
  129. "callback": function (obj, data)
  130. // Sauvegarde à faire comme pour terme, il servira pour primapare et multipare! 1 = primapare et 2,3,4,5 et 5+ sera pour multipare (tu me dis si tu comprend pas)
  131. {
  132. parite = data;
  133. obj.goto(5);
  134. }
  135.  
  136.  
  137. },
  138. 5: {
  139. "question_text": "Pouls?",
  140. "question_img": "",
  141. "type": 2,
  142. "doctor": true,
  143. "response": {},
  144. "callback": function (obj, data)
  145. // A marquer dans le résultat, si la température et à plus de >38 et que le pouls est à plus de 100 il sera marquer en orange(3) et en jaune si il est inférieur a 100. Comme pour la temp, si il est a <38° alors la questions est pas posé
  146. {
  147. if (data >= 100) {
  148. obj.manualRespond(data, 3);
  149. } else {
  150. obj.manualRespond(data, 2);
  151. }
  152.  
  153. obj.goto(6);
  154. }
  155.  
  156.  
  157. },
  158. 6: {
  159. "question_text": "Température ?",
  160. "question_img": "",
  161. "type": 2,
  162. "doctor": true,
  163. "response": {},
  164. "callback": function (obj, data) {
  165. temperature = parseFloat(data);
  166. obj.goto(7);
  167.  
  168. }
  169. },
  170. 7: {
  171. "question_text": "Tension Systolique",
  172. "question_img": "",
  173. "type": 2,
  174. "doctor": true,
  175. "response": {},
  176. "callback": function (obj, data) {
  177. sys = data;
  178. obj.goto(8);
  179. }
  180.  
  181.  
  182. },
  183. 8: {
  184. "question_text": "Tention Dyastolique",
  185. "question_img": "",
  186. "type": 2,
  187. "doctor": true,
  188. "response": {},
  189. "callback": function (obj, data)
  190. // 140 et 90 c'est normal c'est sa demande!
  191. {
  192.  
  193. if (sys >= 140 || data >= 90) {
  194. obj.goto(9);
  195. } else {
  196. if (temperature >= 38) {
  197. obj.goto(14);
  198. } else {
  199. obj.goto(15);
  200. }
  201. }
  202. }
  203. },
  204. 9: {
  205. "question_text": "Avez-vous eu des phosphènes?",
  206. "question_img": "phosphenes.png",
  207. "type": 1,
  208. "doctor": false,
  209. "response": {
  210. 'oui': {
  211. 'text': 'Oui',
  212. 'image': 'oui.gif',
  213. 'lvl': 3
  214. },
  215. 'non': {
  216. 'text': 'Non',
  217. 'image': 'non.jpg',
  218. 'lvl': 2
  219. },
  220. },
  221. "callback": function (obj, data) {
  222. obj.goto(10);
  223. }
  224. },
  225. 10: {
  226. "question_text": "Avez-vous eu des accouphènes?",
  227. "question_img": "accouphenes.png",
  228. "type": 1,
  229. "doctor": false,
  230. "response": {
  231. 'oui': {
  232. 'text': 'Oui',
  233. 'image': 'oui.gif',
  234. 'lvl': 3
  235. },
  236. 'non': {
  237. 'text': 'Non',
  238. 'image': 'non.jpg',
  239. 'lvl': 2
  240. },
  241. },
  242. "callback": function (obj, data) {
  243. obj.goto(11);
  244. }
  245.  
  246.  
  247. },
  248. 11: {
  249. "question_text": "Avez-vous eu une barre épigastrique?",
  250. "question_img": "epigastrique.png",
  251. "type": 1,
  252. "doctor": false,
  253. "response": {
  254. 'oui': {
  255. 'text': 'Oui',
  256. 'image': 'oui.gif',
  257. 'lvl': 3
  258. },
  259. 'non': {
  260. 'text': 'Non',
  261. 'image': 'non.jpg',
  262. 'lvl': 2
  263. },
  264. },
  265. "callback": function (obj, data) {
  266. obj.goto(12);
  267. }
  268.  
  269.  
  270. },
  271. 12: {
  272. "question_text": "Avez-vous des céphalées?",
  273. "question_img": "cephalees.png",
  274. "type": 1,
  275. "doctor": false,
  276. "response": {
  277. 'oui': {
  278. 'text': 'Oui',
  279. 'image': 'oui.gif',
  280. 'lvl': 3
  281. },
  282. 'non': {
  283. 'text': 'Non',
  284. 'image': 'non.jpg',
  285. 'lvl': 2
  286. },
  287. },
  288. "callback": function (obj, data) {
  289. obj.goto(13);
  290. }
  291.  
  292.  
  293. },
  294. 13: {
  295. "question_text": "Vous est-il arrivé d'avoir des oedèmes des membres inférieurs?",
  296. "question_img": "oedemedemi.gif",
  297. "type": 1,
  298. "doctor": false,
  299. "response": {
  300. 'oui': {
  301. 'text': 'Oui',
  302. 'image': 'oui.gif',
  303. 'lvl': 3
  304. },
  305. 'non': {
  306. 'text': 'Non',
  307. 'image': 'non.jpg',
  308. 'lvl': 2
  309. },
  310. },
  311. "callback": function (obj, data) {
  312. if (temperature >= 38) {
  313. obj.goto(14);
  314. } else {
  315. obj.goto(15);
  316. }
  317.  
  318. }
  319.  
  320.  
  321. },
  322. 14: {
  323. "question_text": "Ressentez-vous des frissons?",
  324. "question_img": "frisson.gif",
  325. "type": 1,
  326. "doctor": false,
  327. "response": {
  328. 'oui': {
  329. 'text': 'Oui',
  330. 'image': 'oui.gif',
  331. 'lvl': 3
  332. },
  333. 'non': {
  334. 'text': 'Non',
  335. 'image': 'non.jpg',
  336. 'lvl': 2
  337. },
  338. },
  339. "callback": function (obj, data) {
  340. obj.goto(15);
  341. }
  342.  
  343.  
  344. },
  345. 15: {
  346. "question_text": "Sur cette échelle de douleur, où estimeriez-vous la votre?",
  347. "question_img": "EVA.png",
  348. "type": 1,
  349. "doctor": false,
  350. "response": {
  351. '1': {
  352. 'text': '',
  353. 'image': 'eva1.png'
  354. },
  355. '2': {
  356. 'text': '',
  357. 'image': 'eva2.png'
  358. },
  359. '3': {
  360. 'text': '',
  361. 'image': 'eva3.png'
  362. },
  363. '4': {
  364. 'text': '',
  365. 'image': 'eva4.png'
  366. },
  367. '5': {
  368. 'text': '',
  369. 'image': 'eva5.png'
  370. },
  371. '6': {
  372. 'text': '',
  373. 'image': 'eva6.png'
  374. },
  375. '7': {
  376. 'text': '',
  377. 'image': 'eva7.png'
  378. },
  379. },
  380. "callback": function (obj, data)
  381. //1= <2 / 2=<4 / 3= < 5 / 4= <6 / 5= <7 / 6= <8 / 7= >8
  382. {
  383. if (parseInt(data) === 1) {
  384. obj.manualRespond('< 2', 0);
  385. }
  386.  
  387.  
  388. if (parseInt(data) === 2) {
  389. obj.manualRespond('< 4', 1);
  390. }
  391.  
  392.  
  393. if (parseInt(data) === 3) {
  394. obj.manualRespond('< 5', 1);
  395. }
  396.  
  397.  
  398. if (parseInt(data) === 4) {
  399. obj.manualRespond('< 6', 1);
  400. }
  401.  
  402.  
  403. if (parseInt(data) === 5) {
  404. obj.manualRespond('< 7', 2);
  405. }
  406.  
  407.  
  408. if (parseInt(data) === 6) {
  409. obj.manualRespond('< 8', 2);
  410. }
  411.  
  412.  
  413. if (parseInt(data) === 7) {
  414. obj.manualRespond('> 8', 4);
  415. }
  416.  
  417. obj.goto(16);
  418. }
  419.  
  420.  
  421. },
  422. 16: {
  423. "question_text": "Avez-vous eu des douleur permanente de début brutale?",
  424. "question_img": "douleurpermanentel.png",
  425. "type": 1,
  426. "doctor": false,
  427. "response": {
  428. 'oui': {
  429. 'text': 'Oui',
  430. 'image': 'oui.gif',
  431. 'lvl': 4
  432. },
  433. 'non': {
  434. 'text': 'Non',
  435. 'image': 'non.jpg'
  436. },
  437. },
  438. "callback": function (obj, data) {
  439. obj.goto(17);
  440. }
  441.  
  442.  
  443. },
  444. 17: {
  445. "question_text": "Avez-vous eu envie de pousser?",
  446. "question_img": "pousser.gif",
  447. "type": 1,
  448. "doctor": false,
  449. "response": {
  450. 'oui': {
  451. 'text': 'Oui',
  452. 'image': 'oui.gif',
  453. 'lvl': 4
  454. },
  455. 'non': {
  456. 'text': 'Non',
  457. 'image': 'non.jpg'
  458. },
  459. },
  460. "callback": function (obj, data) {
  461. obj.goto(18);
  462. }
  463.  
  464.  
  465. },
  466. 18: {
  467. "question_text": "Vous est-il arrivé de convulsé?",
  468. "question_img": "convulsions.gif",
  469. "type": 1,
  470. "doctor": false,
  471. "response": {
  472. 'oui': {
  473. 'text': 'Oui',
  474. 'image': 'oui.gif',
  475. 'lvl': 4
  476. },
  477. 'non': {
  478. 'text': 'Non',
  479. 'image': 'non.jpg'
  480. },
  481. },
  482. "callback": function (obj, data) {
  483. obj.goto(19);
  484. }
  485.  
  486.  
  487. },
  488. 19: {
  489. "question_text": "Avez-vous eu des perte de connaissance?",
  490. "question_img": "perteconnaissance.png",
  491. "type": 1,
  492. "doctor": false,
  493. "response": {
  494. 'oui': {
  495. 'text': 'Oui',
  496. 'image': 'oui.gif',
  497. 'lvl': 4
  498. },
  499. 'non': {
  500. 'text': 'Non',
  501. 'image': 'non.jpg'
  502. },
  503. },
  504. "callback": function (obj, data) {
  505. obj.goto(20);
  506. }
  507.  
  508.  
  509. },
  510. 20: {
  511. "question_text": "Avez-vous eu des hémorragies massives",
  512. "question_img": "hemorragiemassive.png",
  513. "type": 1,
  514. "doctor": false,
  515. "response": {
  516. 'oui': {
  517. 'text': 'Oui',
  518. 'image': 'oui.gif',
  519. 'lvl': 4
  520. },
  521. 'non': {
  522. 'text': 'Non',
  523. 'image': 'non.jpg'
  524. },
  525. },
  526. "callback": function (obj, data) {
  527. obj.goto(21);
  528. }
  529.  
  530.  
  531. },
  532. 21: {
  533. "question_text": "Avez-vous constaté des métrorragies actives modérées?",
  534. "question_img": "metroragies.png",
  535. "type": 1,
  536. "doctor": false,
  537. "response": {
  538. 'oui': {
  539. 'text': 'Oui',
  540. 'image': 'oui.gif',
  541. 'lvl': 3
  542. },
  543. 'non': {
  544. 'text': 'Non',
  545. 'image': 'non.jpg'
  546. },
  547. },
  548. "callback": function (obj, data) {
  549. obj.goto(22);
  550. }
  551.  
  552.  
  553. },
  554. 22: {
  555. "question_text": "Avez-vous eu une rupture prématurée des membranes?",
  556. "question_img": "rupturepremmemb.png",
  557. "type": 1,
  558. "doctor": false,
  559. "response": {
  560. 'oui': {
  561. 'text': 'Oui',
  562. 'image': 'oui.gif'
  563. },
  564. 'non': {
  565. 'text': 'Non',
  566. 'image': 'non.jpg'
  567. },
  568. },
  569. "callback": function (obj, data)
  570. // A ajouter au resultat avec les choix choisis plus haut: /!\ JE TE LAISSE FAIRE LA REDIRECTION DU OUI ET DU NON /!\
  571. // Si elle met oui : avec + de 38° (3) <24 SA (2) >24 SA (3)
  572. // Si elle met non : >38°(1) <38°(0)
  573. {
  574. if (data === "oui") {
  575.  
  576. if (temperature > 38) {
  577. obj.manualRespond('> 38°', 2);
  578. }
  579.  
  580. obj.goto(23);
  581.  
  582. if (terme < 24) {
  583. obj.manualRespond('< 24 SA', 2);
  584. }
  585.  
  586. obj.goto(23);
  587.  
  588. if (terme > 24) {
  589. obj.manualRespond('> 24 SA', 3);
  590. }
  591.  
  592. obj.goto(23);
  593. }
  594. if (data === "non") {
  595.  
  596. if (temperature > 38) {
  597. obj.manualRespond('> 38°', 2);
  598. }
  599.  
  600. obj.goto(23);
  601.  
  602. if (temperature < 38) {
  603. obj.manualRespond('< 38°', 0);
  604. }
  605.  
  606. obj.goto(23);
  607.  
  608. }
  609.  
  610.  
  611. }
  612. },
  613. 23: {
  614. "question_text": "Vous est-il arrivé d'avoir eu des pertes vaginales non sanglantes?",
  615. "question_img": "pertesvaginalesnnsang.png",
  616. "type": 1,
  617. "doctor": false,
  618. "response": {
  619. 'oui': {
  620. 'text': 'Oui',
  621. 'image': 'oui.gif',
  622. 'lvl': 1
  623. },
  624. 'non': {
  625. 'text': 'Non',
  626. 'image': 'non.jpg'
  627. }
  628.  
  629. },
  630. "callback": function (obj, data) {
  631. obj.goto(24)
  632. }
  633. },
  634. 24:
  635. {
  636. "question_text":
  637. "Avez-vous eu des pertes du bouchon muqueux isolé?",
  638. "question_img":
  639. "pertebouchon.png",
  640. "type":
  641. 1,
  642. "doctor":
  643. false,
  644. "response":
  645. {
  646. 'oui':
  647. {
  648. 'text':
  649. 'Oui',
  650. 'image':
  651. 'oui.gif',
  652. 'lvl':
  653. 1
  654. }
  655. ,
  656. 'non':
  657. {
  658. 'text':
  659. 'Non',
  660. 'image':
  661. 'non.jpg'
  662. }
  663.  
  664. }
  665. ,
  666. "callback":
  667.  
  668. function (obj, data) {
  669. obj.goto(25);
  670. }
  671. }
  672. ,
  673. 25:
  674. {
  675. "question_text":
  676. "Avez-vous ressenti des contractions utérines?",
  677. "question_img":
  678. "contractulterines.gif",
  679. "type":
  680. 1,
  681. "doctor":
  682. false,
  683. "response":
  684. {
  685. 'oui':
  686. {
  687. 'text':
  688. 'Oui',
  689. 'image':
  690. 'oui.gif',
  691. }
  692. ,
  693. 'non':
  694. {
  695. 'text':
  696. 'Non',
  697. 'image':
  698. 'non.jpg'
  699. }
  700.  
  701. }
  702. ,
  703. "callback":
  704.  
  705. function (obj, data)
  706. // Si oui, il faut savoir si c'est à plus ou à moins de 34 SA, si c'est moins ça demande les fréquences de contractions si c'est à plus de 34 SA alors ça passe à la question d'après
  707. {
  708. if (data === "oui") {
  709.  
  710. if (terme > 24) {
  711. obj.manualRespond('entre 24 et 32 SA', 3);
  712. }
  713.  
  714.  
  715. if (terme > 34) {
  716. obj.manualRespond('> 34 SA°', 1);
  717. obj.goto(27);
  718. } else {
  719. obj.goto(26);
  720. }
  721.  
  722.  
  723. }
  724. if (data === "non") {
  725. obj.goto(27);
  726. }
  727. }
  728. }
  729. ,
  730. 26:
  731. {
  732. "question_text":
  733. "À quelle fréquence arrivent-t'elle?",
  734. "question_img":
  735. "contractulterines.gif",
  736. "type":
  737. 1,
  738. "doctor":
  739. false,
  740. "response":
  741. {
  742. '5min':
  743. {
  744. 'text':
  745. '5 minutes',
  746. 'image':
  747. '5mn.gif',
  748. }
  749. ,
  750. '10min':
  751. {
  752. 'text':
  753. '10 minutes',
  754. 'image':
  755. '10mincontract.gif',
  756. }
  757. ,
  758. 'plus10':
  759. {
  760. 'text':
  761. '> 10 minutes',
  762. 'image':
  763. '15plus.gif'
  764. }
  765.  
  766. }
  767. ,
  768. "callback":
  769.  
  770. function (obj, data)
  771. //Pour les 3 réponses (5/10 et 10+) il faut qu'il récupère la réponse de parité (nombre d'enfants?) et la sauvegarde dans le résultat. A savoir que pour 5 min primapare comme multipare sont orange (3)
  772. // Pour 10 mins primapare est jaune (2) et multipare orange (3). Pour 10+, primapare et multipare sont jaune
  773. {
  774. if (data === "5min") {
  775. if (parite > 1) {
  776. obj.manualRespond('5 min Primapare', 3);
  777. }
  778.  
  779. if (parite === 2 || parite === 3 || parite === 4 || parite === 5 || parite === 6) {
  780. obj.manualRespond('5 min Multipare', 3);
  781. }
  782. }
  783. if (data === "10min") {
  784. if (parite > 1) {
  785. obj.manualRespond('10 min Primapare', 2);
  786. }
  787.  
  788. if (parite === 2 || parite === 3 || parite === 4 || parite === 5 || parite === 6) {
  789. obj.manualRespond('10 min Multipare', 3);
  790. }
  791. }
  792. if (data === "plus10") {
  793. if (parite > 1) {
  794. obj.manualRespond('10 min + Primapare', 2);
  795. }
  796.  
  797. if (parite === 2 || parite === 3 || parite === 4 || parite === 5 || parite === 6) {
  798. obj.manualRespond('10 min + Multipare', 2);
  799. }
  800.  
  801. }
  802.  
  803. obj.goto(27);
  804. }
  805.  
  806.  
  807. }
  808. ,
  809.  
  810. 27:
  811. {
  812. "question_text":
  813. "Avez-vous eu les mouvements actifs fœtaux diminués?",
  814. "question_img":
  815. "femme.gif",
  816. "type":
  817. 1,
  818. "doctor":
  819. false,
  820. "response":
  821. {
  822. 'oui':
  823. {
  824. 'text':
  825. 'Oui',
  826. 'image':
  827. 'oui.gif',
  828. 'lvl':
  829. 3
  830. }
  831. ,
  832. 'non':
  833. {
  834. 'text':
  835. 'Non',
  836. 'image':
  837. 'non.jpg'
  838. }
  839.  
  840. }
  841. ,
  842. "callback":
  843.  
  844. function (obj, data) {
  845. obj.goto(28);
  846. }
  847.  
  848. }
  849. ,
  850. 28:
  851. {
  852. "question_text":
  853. "Avez-vous eu un choc abdominal direct?",
  854. "question_img":
  855. "chocabdominaldirect.png",
  856. "type":
  857. 1,
  858. "doctor":
  859. false,
  860. "response":
  861. {
  862. 'oui':
  863. {
  864. 'text':
  865. 'Oui',
  866. 'image':
  867. 'oui.gif',
  868. 'lvl':
  869. 3
  870. }
  871. ,
  872. 'non':
  873. {
  874. 'text':
  875. 'Non',
  876. 'image':
  877. 'non.jpg'
  878. }
  879.  
  880. }
  881. ,
  882. "callback":
  883.  
  884. function (obj, data) {
  885. obj.goto(29);
  886. }
  887.  
  888. }
  889. ,
  890. 29:
  891. {
  892. "question_text":
  893. "Avez-vous eu un choc hors localisation abdominale?",
  894. "question_img":
  895. "chocsauflocalisationabdominale.png",
  896. "type":
  897. 1,
  898. "doctor":
  899. false,
  900. "response":
  901. {
  902. 'oui':
  903. {
  904. 'text':
  905. 'Oui',
  906. 'image':
  907. 'oui.gif',
  908. 'lvl':
  909. 1
  910.  
  911. }
  912. ,
  913. 'non':
  914. {
  915. 'text':
  916. 'Non',
  917. 'image':
  918. 'non.jpg'
  919. }
  920.  
  921. }
  922. ,
  923. "callback":
  924.  
  925. function (obj, data) {
  926. obj.goto(30);
  927. }
  928.  
  929. }
  930. ,
  931. 30:
  932. {
  933. "question_text":
  934. "Vous est-il arrivé d'avoir eu des dyspnée ne gênant pas la parole?",
  935. "question_img":
  936. "dyspneepasparole.png",
  937. "type":
  938. 1,
  939. "doctor":
  940. false,
  941. "response":
  942. {
  943. 'oui':
  944. {
  945. 'text':
  946. 'Oui',
  947. 'image':
  948. 'oui.gif',
  949. 'lvl':
  950. 3
  951. }
  952. ,
  953. 'non':
  954. {
  955. 'text':
  956. 'Non',
  957. 'image':
  958. 'non.jpg'
  959. }
  960.  
  961. }
  962. ,
  963. "callback":
  964.  
  965. function (obj, data) {
  966. obj.goto(31);
  967. }
  968.  
  969.  
  970. }
  971. ,
  972. 31:
  973. {
  974. "question_text":
  975. "Avez-vous eu des nausées?",
  976. "question_img":
  977. "nausees.png",
  978. "type":
  979. 1,
  980. "doctor":
  981. false,
  982. "response":
  983. {
  984. 'oui':
  985. {
  986. 'text':
  987. 'Oui',
  988. 'image':
  989. 'oui.gif',
  990. }
  991. ,
  992. 'non':
  993. {
  994. 'text':
  995. 'Non',
  996. 'image':
  997. 'non.jpg'
  998. }
  999.  
  1000. }
  1001. ,
  1002. "callback":
  1003.  
  1004. function (obj, data)
  1005. // Non= <38° (0) / >38° jaune (2)
  1006. // Oui= <38° jaune (2) / >38° orange (3)
  1007. {
  1008. if (data === "oui") {
  1009.  
  1010. if (temperature > 38) {
  1011. obj.manualRespond('> 38°', 3);
  1012. }
  1013.  
  1014. obj.goto(32);
  1015.  
  1016. if (temperature < 38) {
  1017. obj.manualRespond('< 38°', 2);
  1018. }
  1019.  
  1020. obj.goto(32);
  1021.  
  1022. }
  1023. if (data === "non") {
  1024.  
  1025. if (temperature > 38) {
  1026. obj.manualRespond('> 38°', 2);
  1027. }
  1028.  
  1029. obj.goto(32);
  1030.  
  1031. if (temperature < 38) {
  1032. obj.manualRespond('< 38°', 0);
  1033. }
  1034.  
  1035. obj.goto(32);
  1036.  
  1037. }
  1038. }
  1039. }
  1040. ,
  1041. 32:
  1042. {
  1043. "question_text":
  1044. "Avez-vous eu des vomissements?",
  1045. "question_img":
  1046. "vomissements.png",
  1047. "type":
  1048. 1,
  1049. "doctor":
  1050. false,
  1051. "response":
  1052. {
  1053. 'oui':
  1054. {
  1055. 'text':
  1056. 'Oui',
  1057. 'image':
  1058. 'oui.gif',
  1059. }
  1060. ,
  1061. 'non':
  1062. {
  1063. 'text':
  1064. 'Non',
  1065. 'image':
  1066. 'non.jpg'
  1067. }
  1068.  
  1069. }
  1070. ,
  1071. "callback":
  1072.  
  1073. function (obj, data) {
  1074. // Non= <38° (0) / >38° jaune (2)
  1075. // Oui= <38° jaune (2) / >38° orange (3)
  1076.  
  1077. if (data === "oui") {
  1078.  
  1079. if (temperature > 38) {
  1080. obj.manualRespond('> 38°', 3);
  1081. }
  1082.  
  1083. obj.goto(33);
  1084.  
  1085. if (temperature < 38) {
  1086. obj.manualRespond('< 38°', 2);
  1087. }
  1088.  
  1089. obj.goto(33);
  1090.  
  1091. }
  1092. if (data === "non") {
  1093.  
  1094. if (temperature > 38) {
  1095. obj.manualRespond('> 38°', 2);
  1096. }
  1097.  
  1098. obj.goto(33);
  1099.  
  1100. if (temperature < 38) {
  1101. obj.manualRespond('< 38°', 0);
  1102. }
  1103.  
  1104. obj.goto(33);
  1105.  
  1106. }
  1107. }
  1108. }
  1109. ,
  1110. 33:
  1111. {
  1112. "question_text":
  1113. "Avez-vous eu du prurit généralisé?",
  1114. "question_img":
  1115. "pruritgeneralise.png",
  1116. "type":
  1117. 1,
  1118. "doctor":
  1119. false,
  1120. "response":
  1121. {
  1122. 'oui':
  1123. {
  1124. 'text':
  1125. 'Oui',
  1126. 'image':
  1127. 'oui.gif',
  1128. 'lvl':
  1129. 2
  1130. }
  1131. ,
  1132. 'non':
  1133. {
  1134. 'text':
  1135. 'Non',
  1136. 'image':
  1137. 'non.jpg'
  1138. }
  1139. }
  1140. ,
  1141. "callback":
  1142.  
  1143. function (obj, data) {
  1144. obj.goto(34);
  1145. }
  1146.  
  1147. }
  1148. ,
  1149. 34:
  1150. {
  1151. "question_text":
  1152. "Avez-vous eu du prurit vulvaire?",
  1153. "question_img":
  1154. "vulvaire.png",
  1155. "type":
  1156. 1,
  1157. "doctor":
  1158. false,
  1159. "response":
  1160. {
  1161. 'oui':
  1162. {
  1163. 'text':
  1164. 'Oui',
  1165. 'image':
  1166. 'oui.gif',
  1167. }
  1168. ,
  1169. 'non':
  1170. {
  1171. 'text':
  1172. 'Non',
  1173. 'image':
  1174. 'non.jpg'
  1175. }
  1176.  
  1177. }
  1178. ,
  1179. "callback":
  1180.  
  1181. function (obj, data) {
  1182. // Non= <38° (0) / >38° jaune (2)
  1183. // Oui= <38° vert (1) / >38° orange (3)
  1184. if (data === "oui"
  1185. ) {
  1186.  
  1187. if (temperature > 38) {
  1188. obj.manualRespond('> 38°', 3);
  1189. }
  1190.  
  1191. obj.goto(35);
  1192.  
  1193. if (temperature < 38) {
  1194. obj.manualRespond('< 38°', 1);
  1195. }
  1196.  
  1197. obj.goto(35);
  1198.  
  1199. }
  1200. if (data === "non") {
  1201.  
  1202. if (temperature > 38) {
  1203. obj.manualRespond('> 38°', 2);
  1204. }
  1205.  
  1206. obj.goto(35);
  1207.  
  1208. if (temperature < 38) {
  1209. obj.manualRespond('< 38°', 0);
  1210. }
  1211.  
  1212. obj.goto(35);
  1213. }
  1214.  
  1215. }
  1216. }
  1217. ,
  1218. 35:
  1219. {
  1220. "question_text":
  1221. "Ressentez-vous des brûlures mictionnelles?",
  1222. "question_img":
  1223. "bruluresmictionnelles.png",
  1224. "type":
  1225. 1,
  1226. "doctor":
  1227. false,
  1228. "response":
  1229. {
  1230. 'oui':
  1231. {
  1232. 'text':
  1233. 'Oui',
  1234. 'image':
  1235. 'oui.gif',
  1236. }
  1237. ,
  1238. 'non':
  1239. {
  1240. 'text':
  1241. 'Non',
  1242. 'image':
  1243. 'non.jpg'
  1244. }
  1245.  
  1246. }
  1247. ,
  1248. "callback":
  1249.  
  1250. function (obj, data) {
  1251.  
  1252. // Non= <38° (0) / >38° jaune (2)
  1253. // Oui= <38° vert (1) / >38° orange (3)
  1254.  
  1255. if (data === "oui") {
  1256.  
  1257. if (temperature > 38) {
  1258. obj.manualRespond('> 38°', 3);
  1259. }
  1260.  
  1261. obj.goto(36);
  1262.  
  1263. if (temperature < 38) {
  1264. obj.manualRespond('< 38°', 1);
  1265. }
  1266.  
  1267. obj.goto(36);
  1268.  
  1269. }
  1270. if (data === "non") {
  1271.  
  1272. if (temperature > 38) {
  1273. obj.manualRespond('> 38°', 2);
  1274. }
  1275.  
  1276. obj.goto(36);
  1277.  
  1278. if (temperature < 38) {
  1279. obj.manualRespond('< 38°', 0);
  1280. }
  1281.  
  1282. obj.goto(36);
  1283. }
  1284. }
  1285. }
  1286. ,
  1287. 36:
  1288. {
  1289. "question_text":
  1290. "Avez-vous une envie fréquente d'uriner (pollakiurie)?",
  1291. "question_img":
  1292. "pollakiurie.png",
  1293. "type":
  1294. 1,
  1295. "doctor":
  1296. false,
  1297. "response":
  1298. {
  1299. 'oui':
  1300. {
  1301. 'text':
  1302. 'Oui',
  1303. 'image':
  1304. 'oui.gif',
  1305. 'lvl':
  1306. 1
  1307. }
  1308. ,
  1309. 'non':
  1310. {
  1311. 'text':
  1312. 'Non',
  1313. 'image':
  1314. 'non.jpg'
  1315. }
  1316.  
  1317. }
  1318. ,
  1319. "callback":
  1320.  
  1321. function (obj, data) {
  1322. obj.goto(37);
  1323. }
  1324.  
  1325. }
  1326. ,
  1327. 37:
  1328. {
  1329. "question_text":
  1330. "Avez-vous eu des hémorroïdes?",
  1331. "question_img":
  1332. "hemorroides.png",
  1333. "type":
  1334. 1,
  1335. "doctor":
  1336. false,
  1337. "response":
  1338. {
  1339. 'oui':
  1340. {
  1341. 'text':
  1342. 'Oui',
  1343. 'image':
  1344. 'oui.gif',
  1345. 'lvl':
  1346. 1
  1347. }
  1348. ,
  1349. 'non':
  1350. {
  1351. 'text':
  1352. 'Non',
  1353. 'image':
  1354. 'non.jpg'
  1355. }
  1356.  
  1357. }
  1358. ,
  1359. "callback":
  1360.  
  1361. function (obj, data) {
  1362. obj.goto(38);
  1363. }
  1364.  
  1365. }
  1366. ,
  1367. 38:
  1368. {
  1369. "question_text":
  1370. "Avez-vous été constipé?",
  1371. "question_img":
  1372. "constipation.png",
  1373. "type":
  1374. 1,
  1375. "doctor":
  1376. false,
  1377. "response":
  1378. {
  1379. 'oui':
  1380. {
  1381. 'text':
  1382. 'Oui',
  1383. 'image':
  1384. 'oui.gif',
  1385. 'lvl':
  1386. 1
  1387. }
  1388. ,
  1389. 'non':
  1390. {
  1391. 'text':
  1392. 'Non',
  1393. 'image':
  1394. 'non.jpg'
  1395. }
  1396.  
  1397. }
  1398. ,
  1399. "callback":
  1400.  
  1401. function (obj, data) {
  1402. obj.goto(39);
  1403. }
  1404.  
  1405. }
  1406. ,
  1407. 39:
  1408. {
  1409. "question_text":
  1410. "Avez-vous eu des douleurs lors de rapports sexuels (dyspareunie)?",
  1411. "question_img":
  1412. "dyspareunie.png",
  1413. "type":
  1414. 1,
  1415. "doctor":
  1416. false,
  1417. "response":
  1418. {
  1419. 'oui':
  1420. {
  1421. 'text':
  1422. 'Oui',
  1423. 'image':
  1424. 'oui.gif',
  1425. 'lvl':
  1426. 1
  1427. }
  1428. ,
  1429. 'non':
  1430. {
  1431. 'text':
  1432. 'Non',
  1433. 'image':
  1434. 'non.jpg'
  1435. }
  1436.  
  1437. }
  1438. ,
  1439. "callback":
  1440.  
  1441. function (obj, data) {
  1442. obj.goto(40);
  1443. }
  1444.  
  1445. }
  1446. ,
  1447. 40:
  1448. {
  1449. "question_text":
  1450. "Avez-vous eu un corps étranger dans le vagin?",
  1451. "question_img":
  1452. "corpsetranger.png",
  1453. "type":
  1454. 1,
  1455. "doctor":
  1456. false,
  1457. "response":
  1458. {
  1459. 'oui':
  1460. {
  1461. 'text':
  1462. 'Oui',
  1463. 'image':
  1464. 'oui.gif',
  1465. 'lvl':
  1466. 1
  1467. }
  1468. ,
  1469. 'non':
  1470. {
  1471. 'text':
  1472. 'Non',
  1473. 'image':
  1474. 'non.jpg'
  1475. }
  1476.  
  1477. }
  1478. ,
  1479. "callback":
  1480. function (obj, data) {
  1481.  
  1482. obj.result();
  1483. }
  1484.  
  1485. },
  1486. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement