{"version":3,"sources":["webpack:///./src/components/button-saving.vue?d744","webpack:///src/components/button-saving.vue","webpack:///./src/components/button-saving.vue?1ec9","webpack:///./src/components/button-saving.vue","webpack:///./src/components/task/NphThankyou.vue?8a03","webpack:///src/components/task/NphThankyou.vue","webpack:///./src/components/task/NphThankyou.vue?62d7","webpack:///./src/components/task/NphThankyou.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","isDisabled","_e","_v","_s","loadingText","displayText","staticRenderFns","props","type","Boolean","required","default","isSaving","String","component","on","$event","preventDefault","submit2","apply","arguments","isLoading","currentPatientAssociated","officeName","prev","components","BtnSaving","data","form","questions","code","question","answer","seenChiro","otherInquiry","computed","mapGetters","yesNoSelection","TaskInfo","getTaskInfo","JSON","parse","TaskItem","getTaskItem","methods","mapActions","TaskType","api","task","request","updateTaskComplete","facilityId","facilityID","id","TaskID","patientId","patientID","updateCaseHistoryComplete","caseHistoryId","getTaskCurrentCaseHistoryId","taskID","$router","push","path","currentIndex","getTaskPreviousTaskType","findIndex","c","getTaskCurrentTaskType","prevPage","length","setTaskCurrentTaskType","back","page","removePage","submit","caseHistoryQuestions","getCaseHistoryQuestions","record","filter","description","forEach","update","find","x"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAACE,YAAY,kBAAkBC,MAAM,CAAC,KAAO,SAAS,SAAWP,EAAIQ,aAAa,CAAER,EAAY,SAAEI,EAAG,OAAO,CAACE,YAAY,mCAAmCC,MAAM,CAAC,KAAO,SAAS,cAAc,UAAUP,EAAIS,KAAMT,EAAY,SAAEI,EAAG,OAAO,CAACJ,EAAIU,GAAG,IAAIV,EAAIW,GAAGX,EAAIY,aAAa,OAAOR,EAAG,OAAO,CAACJ,EAAIU,GAAG,IAAIV,EAAIW,GAAGX,EAAIa,aAAa,UAC9aC,EAAkB,GCiBP,GAC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D,QAAAC,KAAA,CAAAC,KAAA,OAEAvC,OACA,MAAAwC,EAAA,KAAAC,wBAAAC,UACAC,OAAA,KAAAC,wBAEA,IAAAC,EAAA,GAEAA,GADA,IAAAL,EAEA,KAAAC,wBAAA,KAAAA,wBAAAK,OAAA,GAEA,KAAAL,wBAAAD,EAAA,GAEA,KAAAO,uBAAA,CACAC,MAAA,EACAC,KAAAJ,EACAK,WAAA,KAAAN,2BAIA,gBACA,KAAA/C,WAAA,QAEA,KAAAsD,SACA,MAAAC,QAAA7B,OAAAC,KAAAC,QAAA4B,wBACA,CACA1B,WAAA,KAAA7B,yBAAA8B,WACAM,cAAA,KAAAC,8BAIAmB,EAAAF,EAAAjD,KAAAoD,OACAZ,GACA,qBAAAA,EAAAa,aAAA,iBAAAb,EAAAa,aAGAF,EAAAG,QAAAd,IACA,MAAAe,EAAA,KAAAtD,KAAAC,UAAAsD,KAAAC,KAAAtD,OAAAqC,EAAAa,aAEAE,IACAA,EAAAlD,OAAAmC,EAAAnC,UAIA,KAAAX,WAAA,ICxMiY,I,YCO7XP,EAAY,eACd,EACAvB,EACAe,GACA,EACA,KACA,KACA,MAIa,aAAAQ,E","file":"js/chunk-131c491a.6f74f379.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"submit\",\"disabled\":_vm.isDisabled}},[(_vm.isSaving)?_c('span',{staticClass:\"spinner-border spinner-border-sm\",attrs:{\"role\":\"status\",\"aria-hidden\":\"true\"}}):_vm._e(),(_vm.isSaving)?_c('span',[_vm._v(\" \"+_vm._s(_vm.loadingText)+\" \")]):_c('span',[_vm._v(\" \"+_vm._s(_vm.displayText)+\" \")])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <button class=\"btn btn-primary\" type=\"submit\" :disabled=\"isDisabled\">\n    <span\n      class=\"spinner-border spinner-border-sm\"\n      role=\"status\"\n      aria-hidden=\"true\"\n      v-if=\"isSaving\"\n    ></span>\n    <span v-if=\"isSaving\">\n      {{ loadingText }}\n    </span>\n    <span v-else>\n      {{ displayText }}\n    </span>\n  </button>\n</template>\n\n<script>\nexport default {\n  props: {\n    isDisabled: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    isSaving: {\n      type: Boolean,\n      required: true,\n      default: false\n    },\n    loadingText: {\n      type: String,\n      required: false,\n      default: 'Saving ...'\n    },\n    displayText: {\n      type: String,\n      required: false,\n      default: 'Next'\n    }\n  }\n}\n</script>\n\n<style></style>\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./button-saving.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./button-saving.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./button-saving.vue?vue&type=template&id=1d185c25\"\nimport script from \"./button-saving.vue?vue&type=script&lang=js\"\nexport * from \"./button-saving.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{attrs:{\"role\":\"main\"}},[_c('form',{staticClass:\"mt-5 mr-2 ml-2 justify-content-md-center\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit2.apply(null, arguments)}}},[_c('div',{staticClass:\"col\"},[_c('section',{staticClass:\"card\"},[_c('header',{staticClass:\"card\"}),_c('div',{staticClass:\"card-body\"},[(!_vm.isLoading)?_c('div',{},[_c('div',{staticClass:\"row text-center f-weight-550\"},[_c('div',{staticClass:\"col-lg-12 text-center\"},[_c('h3',{staticClass:\"label f-weight-550\"},[_vm._v(\" Thank you! We look forward to seeing you. \")]),_c('h4',{staticClass:\"label f-weight-550\"},[_vm._v(_vm._s(_vm.currentPatientAssociated.officeName))])])])]):_c('div',[_c('div',{staticClass:\"col-12\"},[_c('content-placeholders',{attrs:{\"rounded\":true,\"centered\":true}},[_c('content-placeholders-text',{attrs:{\"lines\":5}})],1)],1)])]),_c('footer',{staticClass:\"card-footer\"},[_c('div',{staticClass:\"row justify-content-end\"},[_c('div',{staticClass:\"col-sm-9\"},[(_vm.getTaskPreviousTaskType)?_c('button',{staticClass:\"btn btn-default mr-2\",attrs:{\"type\":\"reset\"},on:{\"click\":_vm.prev}},[_vm._v(\" Back \")]):_vm._e(),_c('btn-saving',{attrs:{\"is-saving\":_vm.isSaving,\"loading-text\":'Completing...',\"display-text\":'Continue'}})],1)])])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <section role=\"main\">\n    <form @submit.prevent=\"submit2\" class=\"mt-5 mr-2 ml-2 justify-content-md-center\">\n      <div class=\"col\">\n        <section class=\"card\">\n          <header class=\"card\"></header>\n          <div class=\"card-body\">\n            <div class=\"\" v-if=\"!isLoading\">\n              <div class=\"row text-center f-weight-550\">\n                <div class=\"col-lg-12 text-center\">\n                  <h3 class=\"label f-weight-550\">\n                    Thank you! We look forward to seeing you.\n                  </h3>\n                  <h4 class=\"label f-weight-550\">{{ currentPatientAssociated.officeName }}</h4>\n                </div>\n              </div>\n              <!-- <div\n                class=\"form-group row\"\n                v-for=\"q in form.questions\"\n                :key=\"q.code\"\n              >\n                <div class=\"col-lg-6 mx-auto\">\n                  <label class=\"label f-weight-550\">{{ q.question }}</label>\n                  <multiselect\n                    :searchable=\"false\"\n                    v-model=\"q.answer\"\n                    :options=\"yesNoSelection\"\n                    :multiple=\"false\"\n                  />\n                </div>\n              </div>\n\n              <div class=\"row\">\n                <div class=\"col-lg-12 text-center\">\n                  <h3 class=\"label f-weight-550\">\n                    The doctor will ask you for details during your visit.\n                  </h3>\n                </div>\n              </div> -->\n            </div>\n            <div v-else>\n              <div class=\"col-12\">\n                <content-placeholders :rounded=\"true\" :centered=\"true\">\n                  <content-placeholders-text :lines=\"5\" />\n                </content-placeholders>\n              </div>\n            </div>\n          </div>\n          <footer class=\"card-footer\">\n            <div class=\"row justify-content-end\">\n              <div class=\"col-sm-9\">\n                <button type=\"reset\" class=\"btn btn-default mr-2\" @click=\"prev\" v-if=\"getTaskPreviousTaskType\">\n                  Back\n                </button>\n                <btn-saving :is-saving=\"isSaving\" :loading-text=\"'Completing...'\" :display-text=\"'Continue'\" />\n              </div>\n            </div>\n          </footer>\n        </section>\n      </div>\n    </form>\n  </section>\n</template>\n\n<script>\n// import Multiselect from 'vue-multiselect'\nimport '../../../node_modules/vue-multiselect/dist/vue-multiselect.min.css'\nimport api from '../../api/http-common.js'\nimport { mapGetters, mapActions } from 'vuex'\nimport BtnSaving from '../button-saving.vue'\nexport default {\n  components: {\n    // Multiselect,\n    BtnSaving\n  },\n  data() {\n    return {\n      isSaving: false,\n      isLoading: false,\n      form: {\n        questions: [\n          {\n            code: 'SeenChiropractor',\n            question: 'Have you ever seen a chiropractor before?',\n            answer: ''\n          },\n          {\n            code: 'DoctorToKnow',\n            question: 'Is there anything else you want the doctor to know?',\n            answer: ''\n          }\n        ],\n        seenChiro: null,\n        otherInquiry: null\n      }\n    }\n  },\n  computed: {\n    ...mapGetters([\n      'getProfilePatientAssociated',\n      'getTaskCurrentCaseHistoryId',\n      'getTaskPreviousTaskType',\n      'getTaskCurrentTaskType',\n      'currentPatientAssociated',\n      'getTaskInfo',\n      'getTaskItem'\n    ]),\n    yesNoSelection() {\n      return ['Yes', 'No']\n    },\n    TaskInfo() {\n      if (this.getTaskInfo === '') {\n        return undefined\n      } else {\n        return JSON.parse(this.getTaskInfo)\n      }\n    },\n    TaskItem() {\n      return this.getTaskItem\n    }\n  },\n  methods: {\n    ...mapActions(['setTaskCurrentTaskType']),\n    async submit() {\n      if (this.TaskInfo) {\n        if (this.TaskInfo.TaskType === 'INS') {\n          await api.task.request.updateTaskComplete({\n            facilityId: this.currentPatientAssociated.facilityID,\n            id: this.TaskInfo.TaskID,\n            patientId: this.currentPatientAssociated.patientID\n          })\n          this.isSaving = false\n          // await this.$router.push({ path: '/' })\n        } else {\n          await api.task.request.updateCaseHistoryComplete({\n            facilityId: this.currentPatientAssociated.facilityID,\n            caseHistoryId: this.getTaskCurrentCaseHistoryId\n          })\n        }\n      } else {\n        if (this.TaskItem) {\n          await api.task.request.updateTaskComplete({\n            facilityId: this.currentPatientAssociated.facilityID,\n            id: this.TaskItem.taskID,\n            patientId: this.currentPatientAssociated.patientID\n          })\n        }\n        await api.task.request.updateCaseHistoryComplete({\n          facilityId: this.currentPatientAssociated.facilityID,\n          caseHistoryId: this.getTaskCurrentCaseHistoryId\n        })\n      }\n      this.isSaving = false\n      // await this.$router.push({ path: '/' })\n    },\n    async submit2() {\n      await this.$router.push({ path: '/' })\n    },\n    prev() {\n      const currentIndex = this.getTaskPreviousTaskType.findIndex(\n        (c) => c === this.getTaskCurrentTaskType\n      )\n      let prevPage = ''\n      if (currentIndex === -1) {\n        prevPage =\n          this.getTaskPreviousTaskType[this.getTaskPreviousTaskType.length - 1]\n      } else {\n        prevPage = this.getTaskPreviousTaskType[currentIndex - 1]\n      }\n      this.setTaskCurrentTaskType({\n        back: true,\n        page: prevPage,\n        removePage: this.getTaskCurrentTaskType\n      })\n    }\n  },\n  async mounted() {\n    this.isLoading = true\n    // complete the task without having submit button clicked - requested here https://sprints.zoho.com/workspace/healthcoretech#P7/itemdetails/I155/details\n    await this.submit()\n    const caseHistoryQuestions = await api.task.request.getCaseHistoryQuestions(\n      {\n        facilityId: this.currentPatientAssociated.facilityID,\n        caseHistoryId: this.getTaskCurrentCaseHistoryId\n      }\n    )\n\n    const record = caseHistoryQuestions.data.filter(\n      (c) =>\n        c.description === 'SeenChiropractor' || c.description === 'DoctorToKnow'\n    )\n    // console.log('record', record)\n    record.forEach((c) => {\n      const update = this.form.questions.find((x) => x.code === c.description)\n      // console.log('update', update)\n      if (update) {\n        update.answer = c.answer\n      }\n    })\n\n    this.isLoading = false\n  }\n}\n</script>\n\n<style></style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./NphThankyou.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./NphThankyou.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./NphThankyou.vue?vue&type=template&id=028bb662\"\nimport script from \"./NphThankyou.vue?vue&type=script&lang=js\"\nexport * from \"./NphThankyou.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}