{"version":3,"sources":["webpack:///src/app/modules/external-document/external-document.component.ts","webpack:///src/app/modules/external-document/external-document.component.html","webpack:///src/app/modules/external-document/external-document.component.scss","webpack:///src/app/modules/external-document/external-document.routing.module.ts","webpack:///src/app/modules/external-document/external-document.module.ts"],"names":["router","route","fb","healthProfessionalService","patientService","petService","prescriptionService","infusionService","attestationService","examService","orientationService","prescriptionModelService","attestationModelService","examModelService","orientationModelService","victaProtocolService","notification","documentService","modalService","nzModalService","clientAppService","coreService","super","nzBackfill","isPatientNotFound","search","initialLoading","adding","destroyed$","ReplaySubject","this","init","code","patientId","callbackUrl","payload","response","resend","title","isPet","modalSendDocumentComponent","createTplModal","sendDocumentRequired","isSendDocumentRequired","showDownloadSignedPdf","colorSetting","closeModal","subscribe","sent","console","log","params","petId","queryParams","URLSearchParams","toString","url","window","location","href","doc","documentForm","getRawValue","patient","patientForm","value","documentSaved","isVeterinarian","pet","local","document","documentType","savedDocumentPrescription","type","save","prescriber","userId","toPromise","message","hasDuplicatedMaterials","examList","notify","loading","valid","savedDocumentInfusion","warn","err","status","error","pipe","take","duplicatedMaterials","findDuplicatedMaterials","duplicatedExams","map","element","findDuplicatedExams","exams","filter","arr","length","join","findDuplicatedItems","field","sorted_arr","sort","a","b","results","i","push","documentTypes","prescription","selectPrescriptionLayout","saveDocument","previewPdf","layout","generateAndOpenPdf","signPdf","getUrlToSignDocument","_id","token","request","showSendDocumentOnCallback","ui","victaFeature","version","supportedVersion","method","modalSelectLayout","selectLayout","async","data","addressValue","next","complete","groups","getProtocols","professionalType","show","initialState","backdrop","content","selectEvent","protocol","selectedDocumentModel","documentsTemplate","getListDocumentsTemplates","hideEdit","showFavoritePrescriptionsModel","modal","keyboard","model","deleteEvent","modelId","hide","confirm","nzTitle","nzContent","nzOnOk","deleteDocumentModel","nzOnCancel","typesOfDocuments","deleteById","getListByPrescriberId","isValidPrescription","documentModel","class","msg","getFormError","medicaments","medicament","name","dosage","static","nativeAsync","selector","template","routes","path","component","redirectTo","ExternalDocumentRoutingModule","imports","forChild","exports","ExternalDocumentModule","declarations","PatientsModule","DocumentModule","forRoot"],"mappings":"orBAsCa,EAAyB,cAAS,IAmB7C,YACYA,EACAC,EACAC,EACAC,EACAC,EACAC,EACFC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACEC,EACFC,EACAC,EACEC,EACAC,GAEVC,MACEtB,EACAC,EACAC,EACAmB,EACAJ,EACAd,EACAC,EACAC,EACAe,GAhCQ,KAAApB,SACA,KAAAC,QACA,KAAAC,KACA,KAAAC,4BACA,KAAAC,iBACA,KAAAC,aACF,KAAAC,sBACA,KAAAC,kBACA,KAAAC,qBACA,KAAAC,cACA,KAAAC,qBACA,KAAAC,2BACA,KAAAC,0BACA,KAAAC,mBACA,KAAAC,0BACA,KAAAC,uBACA,KAAAC,eACE,KAAAC,kBACF,KAAAC,eACA,KAAAC,iBACE,KAAAC,mBACA,KAAAC,cAvCZ,KAAAE,YAAa,EACb,KAAAC,mBAAoB,EACpB,KAAAC,QAAS,EACT,KAAAC,gBAAiB,EAIjB,KAAAC,QAAS,EAQD,KAAAC,WAAqC,IAAIC,EAAA,EAuCjD,uBACE,MAAO,aAGT,WACEC,KAAKC,OAGP,sBACEC,EACAC,GACA,YAAEC,EAAc,GAAE,QAAEC,EAAU,GAAE,SAAEC,EAAW,GAAE,OAAEC,GAAS,EAAK,MAAEC,EAAQ,GAAE,MAAEC,GAAQ,GAAU,IAE/FT,KAAKU,2BAA2BC,eAAeT,EAAMC,EAAW,CAC9DS,qBAAsBZ,KAAKa,uBAC3BC,uBAAuB,EACvBP,SACAC,QACAC,QACAM,aAAcf,KAAKe,eAGrBf,KAAKU,2BAA2BM,WAAWC,UAAWC,IAOpD,GANIA,EACFC,QAAQC,IAAI,qBAEZD,QAAQC,IAAI,mBAGVhB,EAAa,CACf,MAAMiB,EAAc,CAAEnB,OAAMG,WACxBI,EACFY,EAAOC,MAAQnB,EAEfkB,EAAOlB,UA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IACE,IACI,IACL,OAzCd,GGlCb,MAAMC,EAAiB,CACrB,CAAEC,KAAM,aAAcC,UAAW,GACjC,CAAED,KAAM,cAAeC,UAAW,GAClC,CAAED,KAAM,GAAIE,WAAY,Q,IAObC,EAA6B,QAA7BA,EAA6B,aAJzC,YAAS,CACRC,QAAS,CAAC,IAAaC,SAASN,IAChCO,QAAS,CAAC,QAECH,G,ICsBAI,EAAsB,QAAtBA,EAAsB,aApBlC,YAAS,CACRC,aAAc,CAAC,GACfF,QAAS,CAAC,GACVF,QAAS,CACP,IACA,IACAD,EACA,EAAAM,eACA,IACA,EAAAC,eACA,IAAiBC,QAAQ,IACzB,IACA,IACA,IACA,IACA,IAAcA,UACd,IACA,IAAYA,cAGHJ","file":"x","sourcesContent":["import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { CoreService } from '@app/core/services/core.service';\nimport { AttestationService } from '@app/modules/document/pages/attestation/attestation.service';\nimport { ModelAddFavoriteDocumentComponent } from '@app/modules/document/pages/model-add-favorite-document/model-add-favorite-document.component';\nimport { ModelListFavoriteDocumentComponent } from '@app/modules/document/pages/model-list-favorite-document/model-list-favorite-document.component';\nimport { OrientationService } from '@app/modules/document/pages/orientation/orientation.service';\nimport { DocumentService } from '@app/modules/document/services/document.service';\nimport { ExamService } from '@app/modules/document/services/exam.service';\nimport { PrescriptionService } from '@app/modules/document/services/prescription.service';\nimport { HealthProfessionalService } from '@app/modules/health-professional/services/health-professional.service';\nimport { PatientsService } from '@app/modules/patients/services/patients.service';\nimport { ModalSendDocumentComponent } from '@app/shared/components/modal-send-document/modal-send-document.component';\nimport { Patient } from '@app/shared/models';\nimport { AppToastService } from '@app/shared/services/app-toast.service';\nimport { NzModalService } from 'ng-zorro-antd/modal';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { ReplaySubject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { ModalListVictaProtocolComponent } from '../document/pages/modal-list-victa-protocol/modal-list-victa-protocol.component';\nimport { ModalSelectLayoutComponent } from '../document/pages/modal-select-layout/modal-select-layout.component';\nimport { AttestationModelService } from '../document/services/attestation-model.service';\nimport { ExamModelService } from '../document/services/exam-model.service';\nimport { InfusionService } from '../document/services/infusion.service';\nimport { OrientationModelService } from '../document/services/orientation-model.service';\nimport { PrescriptionModelService } from '../document/services/prescription-model.service';\nimport { VictaProtocolService } from '../document/services/victa-protocol.service';\nimport { PetPatientService } from '../patients/services/pet-patient.service';\nimport { BaseExternalDocumentComponent } from './base-external-document.component';\nimport { ClientAppService } from './services/client-app.service';\nimport { nativeAsync } from '@app/shared/decorators/nativeAsync';\n\n@Component({\n  selector: 'app-external-document',\n  templateUrl: './external-document.component.html',\n  styleUrls: ['./external-document.component.scss']\n})\nexport class ExternalDocumentComponent extends BaseExternalDocumentComponent\n  implements OnInit, OnDestroy {\n  nzBackfill = false;\n  isPatientNotFound = false;\n  search = true;\n  initialLoading = true;\n\n  patients: Patient[];\n  selectedDocumentModel: any;\n  adding = false;\n\n  @ViewChild(ModalSendDocumentComponent, { static: true })\n  modalSendDocumentComponent: ModalSendDocumentComponent;\n\n  @ViewChild(ModalSelectLayoutComponent, { static: true })\n  modalSelectLayout: ModalSelectLayoutComponent;\n\n  private destroyed$: ReplaySubject<boolean> = new ReplaySubject<boolean>();\n\n  constructor(\n    protected router: Router,\n    protected route: ActivatedRoute,\n    protected fb: FormBuilder,\n    protected healthProfessionalService: HealthProfessionalService,\n    protected patientService: PatientsService,\n    protected petService: PetPatientService,\n    private prescriptionService: PrescriptionService,\n    private infusionService: InfusionService,\n    private attestationService: AttestationService,\n    private examService: ExamService,\n    private orientationService: OrientationService,\n    private prescriptionModelService: PrescriptionModelService,\n    private attestationModelService: AttestationModelService,\n    private examModelService: ExamModelService,\n    private orientationModelService: OrientationModelService,\n    private victaProtocolService: VictaProtocolService,\n    private notification: AppToastService,\n    protected documentService: DocumentService,\n    private modalService: BsModalService,\n    private nzModalService: NzModalService,\n    protected clientAppService: ClientAppService,\n    protected coreService: CoreService\n  ) {\n    super(\n      router,\n      route,\n      fb,\n      coreService,\n      documentService,\n      healthProfessionalService,\n      patientService,\n      petService,\n      clientAppService\n    );\n  }\n\n  get supportedVersion() {\n    return 'PRODUCTION';\n  }\n\n  ngOnInit() {\n    this.init();\n  }\n\n  showSendDocumentModal(\n    code: string,\n    patientId: string,\n    { callbackUrl = '', payload = '', response = '', resend = false, title = '', isPet = false } = {}\n  ): void {\n    this.modalSendDocumentComponent.createTplModal(code, patientId, {\n      sendDocumentRequired: this.isSendDocumentRequired,\n      showDownloadSignedPdf: false,\n      resend,\n      title,\n      isPet,\n      colorSetting: this.colorSetting\n    });\n\n    this.modalSendDocumentComponent.closeModal.subscribe((sent: boolean) => {\n      if (sent) {\n        console.log('Documento enviado');\n      } else {\n        console.log('Envio cancelado');\n      }\n\n      if (callbackUrl) {\n        const params: any = { code, payload };\n        if (isPet) {\n          params.petId = patientId;\n        } else {\n          params.patientId = patientId;\n        }\n        params.response = response; // last query param\n        const queryParams = new URLSearchParams(params).toString();\n        const url = `${callbackUrl}?${queryParams}`;\n        window.location.href = url;\n      }\n    });\n  }\n  @nativeAsync\n  private async saveDocument() {\n    try {\n      const doc = this.documentForm.getRawValue();\n      const patient = this.patientForm.value;\n      if (this.isVeterinarian) {\n        doc.pet = patient;\n      } else {\n        doc.patient = patient;\n      }\n      doc.local = this.local;\n      doc.code = this.document && this.document.code;\n\n      let documentSaved: any;\n      switch (this.documentType) {\n        case 'Prescrição':\n          documentSaved = await this.savedDocumentPrescription(doc);\n          documentSaved.type = 'prescription';\n          break;\n        case 'Atestado':\n          documentSaved = await this.attestationService\n            .save({ prescriber: this.prescriber.userId, ...doc })\n            .toPromise();\n          documentSaved.type = 'attestation';\n          break;\n        case 'Exame':\n          const message = this.hasDuplicatedMaterials(this.documentForm.value.examList);\n          if (message) {\n            this.notification.notify('warning', 'Aviso', message);\n            this.loading = false;\n            return null;\n          }\n\n          if (!this.documentForm.valid) {\n            this.notification.notify(\n              'warning',\n              'Aviso',\n              'Você adicionou um novo campo mas não o preencheu.'\n            );\n            this.loading = false;\n            return null;\n          }\n          documentSaved = await this.examService\n            .save({ prescriber: this.prescriber.userId, ...doc })\n            .toPromise();\n          documentSaved.type = 'exam';\n          break;\n        case 'Outros':\n          if (!this.documentForm.valid) {\n            this.notification.notify('warning', 'Aviso', 'Orientações não pode ficar em branco');\n            this.loading = false;\n            return null;\n          }\n          documentSaved = await this.orientationService\n            .save({ prescriber: this.prescriber.userId, ...doc })\n            .toPromise();\n          documentSaved.type = 'orientation';\n          break;\n        case 'Infusão':\n          documentSaved = await this.savedDocumentInfusion(doc);\n          documentSaved.type = 'infusion';\n          break;\n        default:\n          console.warn('Document type unknown: ', this.documentType);\n          this.loading = false;\n          return null;\n      }\n      return documentSaved;\n    } catch (err) {\n      if (err.status === 400) {\n        this.notification.notify(\n          'error',\n          'Erro ao salvar documento',\n          err.error.error && err.error.error.message\n        );\n      } else {\n        this.notification.notify(\n          'error',\n          'Erro',\n          `Erro ao salvar um documento do tipo ${this.documentType}`\n        );\n      }\n      throw err;\n    }\n  }\n  @nativeAsync\n  async savedDocumentInfusion(document) {\n    return this.infusionService\n      .save({ prescriber: this.prescriber.userId, ...document })\n      .pipe(take(1))\n      .toPromise();\n  }\n  @nativeAsync\n  async savedDocumentPrescription(document) {\n    return await this.prescriptionService\n      .save({ prescriber: this.prescriber.userId, ...document })\n      .pipe(take(1))\n      .toPromise();\n  }\n\n  private hasDuplicatedMaterials(examList: any[]) {\n    const duplicatedMaterials = this.findDuplicatedMaterials(examList);\n\n    const duplicatedExams = examList\n      .map(element => this.findDuplicatedExams(element.exams))\n      .filter(arr => arr.length);\n\n    if (duplicatedMaterials.length > 0) {\n      return `Prescrição não pode conter materiais repetidos: ${duplicatedMaterials.join(', ')}.`;\n    }\n    if (duplicatedExams.length > 0) {\n      return `Prescrição não pode conter exames repetidos: ${duplicatedExams.join(', ')}.`;\n    }\n    return '';\n  }\n\n  private findDuplicatedMaterials(arr) {\n    return this.findDuplicatedItems(arr, 'material');\n  }\n\n  private findDuplicatedExams(arr) {\n    return this.findDuplicatedItems(arr, 'name');\n  }\n\n  private findDuplicatedItems(arr, field) {\n    const sorted_arr = arr.sort((a, b) => (a[field] > b[field] ? 1 : -1));\n    const results = [];\n    for (let i = 0; i < sorted_arr.length - 1; i++) {\n      if (sorted_arr[i + 1][field] === sorted_arr[i][field]) {\n        results.push(sorted_arr[i][field]);\n      }\n    }\n    return results;\n  }\n  @nativeAsync\n  async saveAndPreviewPdf() {\n    if (this.documentType === this.documentTypes.prescription) {\n      this.selectPrescriptionLayout('preview');\n    } else {\n      try {\n        this.loading = true;\n        const documentSaved = await this.saveDocument();\n        await this.previewPdf(documentSaved);\n      } catch (err) {\n        console.error(err);\n      }\n      this.loading = false;\n    }\n  }\n  @nativeAsync\n  private async previewPdf(documentSaved: any, layout = {}) {\n    try {\n      await this.documentService.generateAndOpenPdf(documentSaved.code, layout);\n    } catch (err) {\n      this.notification.notify('error', 'Erro', 'Erro ao gerar PDF do documento');\n      throw err;\n    }\n  }\n  @nativeAsync\n  async saveAndSignPdf() {\n    if (this.documentType === this.documentTypes.prescription) {\n      this.selectPrescriptionLayout('sign');\n    } else {\n      try {\n        this.loading = true;\n        const documentSaved = await this.saveDocument();\n        await this.signPdf(documentSaved.code);\n      } catch (err) {\n        console.error(err);\n      }\n      this.loading = false;\n    }\n  }\n  @nativeAsync\n  private async signPdf(code: string, layout = {}) {\n    const url = await this.documentService.getUrlToSignDocument({\n      code,\n      prescriber: this.prescriber,\n      patientId: this.patientForm.value._id,\n      layout,\n      token: this.token,\n      payload: this.payload,\n      callbackUrl: this.request.callbackUrl,\n      showSendDocumentOnCallback: this.request.ui && this.request.ui.showSendDocumentOnCallback,\n      victaFeature: this.victaFeature,\n      version: this.supportedVersion\n    });\n    window.location.href = url;\n  }\n\n  private selectPrescriptionLayout(method: string) {\n    this.modalSelectLayout.createTplModal();\n    this.modalSelectLayout.selectLayout.pipe(take(1)).subscribe(async data => {\n      try {\n        this.loading = true;\n        delete data.addressValue;\n        const documentSaved = await this.saveDocument();\n        if (method === 'preview') {\n          await this.previewPdf(documentSaved, data);\n        } else {\n          await this.signPdf(documentSaved.code, data);\n        }\n      } catch (err) {\n        console.error(err);\n      }\n      this.loading = false;\n    });\n  }\n\n  ngOnDestroy(): void {\n    this.destroyed$.next(true);\n    this.destroyed$.complete();\n  }\n  @nativeAsync\n  async showVictaProtocols() {\n    try {\n      this.loading = true;\n      const groups = await this.victaProtocolService.getProtocols(this.prescriber.professionalType);\n      this.loading = false;\n\n      const modal = this.modalService.show(ModalListVictaProtocolComponent, {\n        initialState: { groups, colorSetting: this.colorSetting },\n        backdrop: 'static'\n      });\n\n      modal.content.selectEvent.subscribe(protocol => {\n        this.selectedDocumentModel = protocol;\n        this.adding = true;\n      });\n    } catch (err) {\n      this.loading = false;\n      this.notification.notify('warning', 'Aviso', 'Não foi possível recuperar protocolos');\n    }\n  }\n  @nativeAsync\n  async showModelListFavoriteDocument() {\n    try {\n      this.loading = true;\n      const documentsTemplate = await this.getListDocumentsTemplates();\n\n      if (documentsTemplate.length) {\n        const initialState = {\n          documentType: this.documentType,\n          documentsTemplate,\n          colorSetting: this.colorSetting,\n          hideEdit: true\n        };\n\n        this.showFavoritePrescriptionsModel(initialState);\n      } else {\n        this.notification.notify(\n          'warning',\n          'Aviso',\n          'Você ainda não possui modelos de prescrições cadastrados. Salve um modelo em Favoritos.'\n        );\n      }\n    } catch (err) {\n      this.notification.notify('warning', 'Aviso', 'Não foi possível recuperar a lista de modelos');\n    } finally {\n      this.loading = false;\n    }\n  }\n\n  private showFavoritePrescriptionsModel(initialState: any) {\n    const modal = this.modalService.show(ModelListFavoriteDocumentComponent, {\n      initialState,\n      backdrop: 'static',\n      keyboard: false\n    });\n    modal.content.selectEvent.subscribe(model => {\n      this.selectedDocumentModel = model;\n      this.adding = true;\n    });\n\n    modal.content.deleteEvent.subscribe((modelId: string) => {\n      modal.hide();\n      this.nzModalService.confirm({\n        nzTitle: 'Atenção',\n        nzContent: `Tem certeza que deseja excluir este modelo de ${this.documentType} da sua lista?`,\n        nzOnOk: async () => {\n          try {\n            await this.deleteDocumentModel(modelId);\n            this.notification.notify('success', 'Sucesso', 'Modelo excluído com sucesso');\n          } catch (err) {\n            this.notification.notify('warning', 'Aviso', 'Não foi possível excluir este item');\n          }\n        },\n        nzOnCancel: () => this.showFavoritePrescriptionsModel(initialState)\n      });\n    });\n  }\n  @nativeAsync\n  private async deleteDocumentModel(modelId) {\n    switch (this.documentType) {\n      case this.typesOfDocuments[0]:\n        await this.prescriptionModelService.deleteById(modelId, this.prescriber.userId);\n        break;\n      case this.typesOfDocuments[1]:\n        await this.examModelService.deleteById(modelId);\n        break;\n      case this.typesOfDocuments[2]:\n        await this.attestationModelService.deleteById(modelId);\n        break;\n      case this.typesOfDocuments[3]:\n        await this.orientationModelService.deleteById(modelId);\n        break;\n    }\n  }\n  @nativeAsync\n  private async getListDocumentsTemplates() {\n    let documentsTemplate = [];\n    switch (this.documentType) {\n      case this.typesOfDocuments[0]:\n        documentsTemplate = await this.prescriptionModelService.getListByPrescriberId(\n          this.prescriber.userId\n        );\n        break;\n      case this.typesOfDocuments[1]:\n        documentsTemplate = await this.examModelService.getListByPrescriberId(this.prescriber.userId);\n        break;\n      case this.typesOfDocuments[2]:\n        documentsTemplate = await this.attestationModelService.getListByPrescriberId(\n          this.prescriber.userId\n        );\n        break;\n      case this.typesOfDocuments[3]:\n        documentsTemplate = await this.orientationModelService.getListByPrescriberId(\n          this.prescriber.userId\n        );\n        break;\n    }\n\n    return documentsTemplate;\n  }\n\n  showModalAddFavoritePrescription() {\n    if (this.isValidPrescription()) {\n      this.documentForm.value.prescriber = this.prescriber.userId;\n      const initialState = {\n        documentModel: this.documentForm.value,\n        documentType: this.documentType,\n        colorSetting: this.colorSetting,\n        prescriber: this.prescriber\n      };\n      this.modalService.show(ModelAddFavoriteDocumentComponent, {\n        class: 'modal-lg',\n        initialState,\n        backdrop: 'static',\n        keyboard: false\n      });\n    } else {\n      const msg = this.getFormError(this.documentType);\n      this.notification.notify('warning', 'Aviso', msg);\n    }\n  }\n\n  private getFormError(documentType: string): string {\n    switch (documentType) {\n      case 'Prescrição':\n        return 'Selecione e preencha dados do medicamento ou digite um texto livre';\n      case 'Exame':\n        return 'Selecione um material e um exame para cada material';\n      default:\n        return 'Preencha os campos obrigatórios';\n    }\n  }\n\n  private isValidPrescription() {\n    const medicaments = this.documentForm.value.medicaments;\n    for (const medicament of medicaments) {\n      if (!medicament.name || !medicament.dosage) {\n        return false;\n      }\n    }\n    return true;\n  }\n}\n","export default \"<div *ngFor=\\\"let message of messages\\\">\\n  <nz-alert nzType=\\\"warning\\\" [nzMessage]=\\\"message\\\"></nz-alert>\\n</div>\\n<div class=\\\"page-content\\\" theme>\\n  <section class=\\\"section container-fluid prescription d-flex flex-column\\\" *ngIf=\\\"!initialLoading\\\">\\n    <div class=\\\"row _p-20\\\">\\n      <div class=\\\"hospital-brand doc-type\\\">\\n        <h4 class=\\\"hospital-name\\\">{{ documentType }}</h4>\\n      </div>\\n\\n      <div class=\\\"hospital-brand\\\" *ngIf=\\\"showLocal\\\">\\n        <nz-dropdown nzTrigger=\\\"click\\\">\\n          <a nz-dropdown><i class=\\\"fa fa-caret-circle-solid\\\"></i></a>\\n          <ul nz-menu nzSelectable>\\n            <div *ngFor=\\\"let address of prescriber?.commercialData\\\">\\n              <li nz-menu-item (click)=\\\"changeLocal(address)\\\">\\n                <a>{{ address.name }}</a>\\n              </li>\\n            </div>\\n          </ul>\\n        </nz-dropdown>\\n        <h4 class=\\\"hospital-name\\\">{{ local?.name }}</h4>\\n      </div>\\n    </div>\\n\\n    <form [formGroup]=\\\"patientForm\\\">\\n      <nz-form-item *ngIf=\\\"patient\\\">\\n        <nz-form-control>\\n          <input\\n            id=\\\"cpfPatient\\\"\\n            appPatientSearch\\n            class=\\\"input-name\\\"\\n            formControlName=\\\"name\\\"\\n            nz-input\\n            disabled\\n            [ngStyle]=\\\"{ color: colorSetting?.primary }\\\"\\n          />\\n        </nz-form-control>\\n      </nz-form-item>\\n      <app-infusion-protocol\\n        *ngIf=\\\"documentType === 'Infusão' && victaFeature\\\"\\n        [infusion]=\\\"document\\\"\\n        [colorSetting]=\\\"colorSetting\\\"\\n        [protocolSelected]=\\\"selectedDocumentModel\\\"\\n        (formEmitter)=\\\"documentForm = $event\\\"\\n      ></app-infusion-protocol>\\n\\n      <app-prescription\\n        *ngIf=\\\"documentType === 'Prescrição' && !victaFeature && adding\\\"\\n        [prescription]=\\\"document\\\"\\n        [prescriptionModel]=\\\"selectedDocumentModel\\\"\\n        [colorSetting]=\\\"colorSetting\\\"\\n        (formEmitter)=\\\"documentForm = $event\\\"\\n      ></app-prescription>\\n\\n      <app-exam\\n        *ngIf=\\\"documentType === 'Exame' && adding\\\"\\n        [exam]=\\\"document\\\"\\n        [colorSetting]=\\\"colorSetting\\\"\\n        (formEmitter)=\\\"documentForm = $event\\\"\\n      ></app-exam>\\n\\n      <app-attestation\\n        *ngIf=\\\"documentType === 'Atestado' && adding\\\"\\n        [patient]=\\\"patient\\\"\\n        [attestation]=\\\"document\\\"\\n        [colorSetting]=\\\"colorSetting\\\"\\n        (formEmitter)=\\\"documentForm = $event\\\"\\n      ></app-attestation>\\n\\n      <app-orientation\\n        *ngIf=\\\"documentType === 'Outros' && adding\\\"\\n        [orientation]=\\\"document\\\"\\n        [colorSetting]=\\\"colorSetting\\\"\\n        (formEmitter)=\\\"documentForm = $event\\\"\\n      ></app-orientation>\\n\\n      <div class=\\\"add-prescription\\\" *ngIf=\\\"!signed && validRequest\\\">\\n        <button\\n          [ngStyle]=\\\"{\\n            'background-color': colorSetting?.secondary,\\n            'border-color': colorSetting?.secondary\\n          }\\\"\\n          (click)=\\\"showVictaProtocols()\\\"\\n          *ngIf=\\\"victaFeature && documentType === 'Infusão'\\\"\\n          class=\\\"btn btn-icon btn-success btn-add text-capitalize\\\"\\n          type=\\\"button\\\"\\n        >\\n          <span class=\\\"btn-inner--text\\\" *ngIf=\\\"!documentForm.get('protocols')?.value\\\"\\n            >Sugestão de Protocolos</span\\n          >\\n          <span class=\\\"btn-inner--text\\\" *ngIf=\\\"documentForm.get('protocols')?.value\\\"\\n            >Adicionar protocolo</span\\n          >\\n          <span\\n            class=\\\"btn-inner--icon\\\"\\n            [ngStyle]=\\\"{\\n              'background-color': colorSetting?.primary,\\n              'border-color': colorSetting?.primary\\n            }\\\"\\n            ><i class=\\\"fa fa-plus\\\"></i\\n          ></span>\\n        </button>\\n        <button\\n          [ngStyle]=\\\"{\\n            'background-color': colorSetting?.secondary,\\n            'border-color': colorSetting?.secondary\\n          }\\\"\\n          (click)=\\\"showModelListFavoriteDocument()\\\"\\n          *ngIf=\\\"!victaFeature && patientForm.valid && documentType === 'Prescrição'\\\"\\n          class=\\\"btn btn-icon btn-success btn-add text-capitalize\\\"\\n          type=\\\"button\\\"\\n        >\\n          <span class=\\\"btn-inner--text\\\">Selecionar modelo salvo</span>\\n          <span\\n            class=\\\"btn-inner--icon\\\"\\n            [ngStyle]=\\\"{\\n              'background-color': colorSetting?.primary,\\n              'border-color': colorSetting?.primary\\n            }\\\"\\n            ><i class=\\\"fa fa-plus\\\"></i\\n          ></span>\\n        </button>\\n        <button\\n          [ngStyle]=\\\"{\\n            'background-color': colorSetting?.secondary,\\n            'border-color': colorSetting?.secondary\\n          }\\\"\\n          (click)=\\\"showModalAddFavoritePrescription()\\\"\\n          *ngIf=\\\"!victaFeature && adding && documentType === 'Prescrição'\\\"\\n          class=\\\"btn btn-icon btn-success btn-add text-capitalize\\\"\\n          type=\\\"button\\\"\\n        >\\n          <span class=\\\"btn-inner--text\\\">Salvar como modelo</span>\\n          <span\\n            class=\\\"btn-inner--icon\\\"\\n            [ngStyle]=\\\"{\\n              'background-color': colorSetting?.primary,\\n              'border-color': colorSetting?.primary\\n            }\\\"\\n            ><i class=\\\"fa fa-plus\\\"></i\\n          ></span>\\n        </button>\\n        <button\\n          [ngStyle]=\\\"{\\n            'background-color': colorSetting?.secondary,\\n            'border-color': colorSetting?.secondary\\n          }\\\"\\n          (click)=\\\"toggleAdding()\\\"\\n          *ngIf=\\\"!victaFeature && !adding\\\"\\n          class=\\\"btn btn-icon btn-success btn-add text-capitalize\\\"\\n          type=\\\"button\\\"\\n        >\\n          <span class=\\\"btn-inner--text\\\" *ngIf=\\\"!adding || documentType === 'Prescrição'\\\"\\n            >Adicionar {{ documentType }}</span\\n          >\\n          <span\\n            class=\\\"btn-inner--icon\\\"\\n            [ngStyle]=\\\"{\\n              'background-color': colorSetting?.primary,\\n              'border-color': colorSetting?.primary\\n            }\\\"\\n            ><i class=\\\"fa fa-plus\\\"></i\\n          ></span>\\n        </button>\\n      </div>\\n    </form>\\n  </section>\\n</div>\\n\\n<div\\n  *ngIf=\\\"!initialLoading\\\"\\n  class=\\\"footer d-flex align-items-center fixed-bottom justify-content-end\\\"\\n  [ngStyle]=\\\"{ 'background-color': colorSetting?.footer }\\\"\\n  theme\\n>\\n  <button\\n    class=\\\"btn btn-success\\\"\\n    type=\\\"button\\\"\\n    (click)=\\\"saveAndSignPdf()\\\"\\n    [ngClass]=\\\"{ disabled: invalidForm }\\\"\\n    [ngStyle]=\\\"{\\n      color: 'white',\\n      'background-color': colorSetting?.secondary,\\n      'border-color': colorSetting?.secondary\\n    }\\\"\\n    [disabled]=\\\"invalidForm\\\"\\n  >\\n    Salvar e assinar <i class=\\\"fa fa-arrow-right\\\"></i>\\n  </button>\\n</div>\\n<ngx-loading [show]=\\\"loading || initialLoading\\\" [config]=\\\"{ backdropBorderRadius: '3px' }\\\"></ngx-loading>\\n<app-modal-send-document [colorSetting]=\\\"colorSetting\\\"></app-modal-send-document>\\n<app-modal-select-layout [colorSetting]=\\\"colorSetting\\\"></app-modal-select-layout>\\n\";","export default \"div nz-alert {\\n  text-align: center;\\n}\\n\\n.section {\\n  padding-top: 0;\\n}\\n\\n.prescription {\\n  height: calc(100vh - 50px);\\n  overflow-y: auto;\\n}\\n\\n.prescription .doc-type {\\n  margin-right: 25px;\\n}\\n\\n.prescription .hospital-brand {\\n  position: relative;\\n  display: flex;\\n  align-self: flex-end;\\n  justify-content: center;\\n  flex-direction: column;\\n  align-items: center;\\n  padding-top: 15px;\\n}\\n\\n.prescription .hospital-brand nz-dropdown {\\n  align-self: flex-end;\\n}\\n\\n.prescription .hospital-brand .rectangles {\\n  display: flex;\\n  flex-wrap: wrap;\\n  width: 48px;\\n}\\n\\n.prescription .hospital-brand .rectangles .rectangle {\\n  width: 24px;\\n  height: 24px;\\n}\\n\\n.prescription .hospital-brand .rectangles .rectangle.bg-light-alt {\\n  background-color: #4d4d4d;\\n}\\n\\n.prescription .hospital-brand .hospital-name {\\n  font-family: \\\"probold\\\";\\n  font-size: 23px;\\n  color: #4d4d4d;\\n  margin-top: 10px;\\n}\\n\\n.prescription .hospital-brand .arrow-circle {\\n  font-size: 24px;\\n  color: #4d4d4d;\\n  position: absolute;\\n  right: 0;\\n  top: 0;\\n}\\n\\n.prescription .input-name {\\n  background-color: transparent;\\n  border-color: transparent;\\n  font-family: \\\"roboto\\\";\\n  font-size: 40px;\\n  height: auto;\\n  border-radius: 0;\\n  border-bottom: 1px solid;\\n}\\n\\n@media (max-width: 1025px) {\\n  .prescription .input-name {\\n    font-size: 30px;\\n  }\\n}\\n\\n.prescription .input-name:hover {\\n  border-bottom: 1px dashed #4d4d4d;\\n}\\n\\n.prescription .input-name:focus {\\n  border-bottom: 1px dashed #4d4d4d;\\n  box-shadow: none;\\n}\\n\\n.add-prescription {\\n  padding: 20px 0;\\n  border-top: 1px solid #f5f5f5;\\n  min-height: 81px;\\n  display: flex;\\n  justify-content: center;\\n}\\n\\n@media (max-width: 1025px) {\\n  .add-prescription .btn-icon .btn-inner--text {\\n    font-size: 13px;\\n    word-break: break-word;\\n    line-height: 13px;\\n  }\\n}\\n\\n.add-prescription.adding-bg {\\n  background-color: #f5f5f5;\\n  border-top: 1px solid transparent;\\n}\\n\\n.add-prescription .btn-add-name {\\n  padding: 0px 10px;\\n  margin: 10px;\\n}\\n\\n.add-prescription .btn-add {\\n  display: flex;\\n  padding: 0 0 0 8px;\\n  height: 40px;\\n  align-items: center;\\n  border-radius: 10px;\\n  overflow: hidden;\\n  border: 0;\\n  font-family: \\\"probold\\\", sans-serif;\\n}\\n\\n.add-prescription .btn-add .btn-inner--icon {\\n  background-color: #1b403a;\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  height: 40px;\\n  width: 50px;\\n}\\n\\n.buttons-save-prescription {\\n  height: 50px;\\n  padding: 0;\\n  border: 0;\\n}\\n\\n.buttons-save-prescription .btn {\\n  box-shadow: none;\\n  border-radius: 0;\\n  height: 100%;\\n  padding-top: 0.725rem;\\n}\\n\\n.buttons-save-prescription .btn i {\\n  margin-left: 10px;\\n}\\n\\n.buttons-save-prescription .btn i:before {\\n  font-size: 16px;\\n}\\n\\n.fixed {\\n  position: fixed;\\n  bottom: 0;\\n  height: 120px;\\n  width: 100%;\\n}\\n\\n.footer {\\n  height: 50px;\\n  padding: 0;\\n  border: 0;\\n  z-index: 1;\\n}\\n\\n.footer .social-icons a {\\n  font-family: Arial, sans-serif;\\n}\\n\\n.footer .btn {\\n  box-shadow: none;\\n  border-radius: 0;\\n  height: 100%;\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  padding-top: 0.725rem;\\n}\\n\\n@media (max-width: 1025px) {\\n  .footer .btn {\\n    font-size: 14px;\\n  }\\n}\\n\\n@media (max-width: 360px) {\\n  .footer .btn {\\n    font-size: 12px;\\n  }\\n}\\n\\n.footer .btn i {\\n  margin-left: 10px;\\n}\\n\\n.footer .btn i:before {\\n  font-size: 16px;\\n}\\n\\n.footer .input-group .btn {\\n  background-color: #ebebeb;\\n  color: #3c3c3c;\\n  font-size: 10px !important;\\n}\\n\\n.footer .input-group .form-control {\\n  color: white;\\n  background-color: transparent;\\n  border: 1px solid white;\\n}\\n\\n.footer .input-group .form-control::-moz-placeholder {\\n  opacity: 1;\\n  color: white;\\n}\\n\\n.footer .input-group .form-control::placeholder {\\n  opacity: 1;\\n  color: white;\\n}\\n\\n.medicationNameInput {\\n  background-color: transparent;\\n  border-color: transparent;\\n  height: 100%;\\n  box-shadow: none;\\n}\\n\\ntextarea {\\n  resize: none;\\n  background-color: transparent;\\n  border: 0;\\n  border-radius: 0;\\n  box-shadow: none;\\n  padding-left: 12px;\\n  color: #4d4d4d;\\n  font-size: 18px;\\n}\\n\\ntextarea:hover, textarea:focus {\\n  border-color: transparent;\\n  box-shadow: none;\\n}\\n\\n.free-prescription {\\n  display: flex;\\n}\\n\\n.free-prescription .break-line {\\n  margin-left: 7px;\\n  white-space: pre-wrap;\\n}\\n\\n.toolbar {\\n  display: flex;\\n}\\n\\n.toolbar .menu-toggler {\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  padding: 0;\\n  border-radius: 0;\\n  width: 80px;\\n  filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.16));\\n  margin: 0;\\n}\\n\\n.toolbar .menu-toggler .fa:before {\\n  font-size: 22px;\\n}\\n\\n.toolbar .menu-toggler,\\n.toolbar .toolbar-options {\\n  height: 80px;\\n}\\n\\n.toolbar .toolbar-menu {\\n  flex: 1;\\n}\\n\\n.toolbar .toolbar-menu .toolbar-options {\\n  background-color: #f5f5f5;\\n  display: flex;\\n  align-items: center;\\n  justify-content: flex-end;\\n  padding-right: 40px;\\n  padding-left: 60px;\\n}\\n\\n.toolbar .toolbar-menu .toolbar-options .btn {\\n  font-family: \\\"problack\\\", sans-serif;\\n}\\n\\n.toolbar .toolbar-menu .toolbar-options .btn-green {\\n  background-color: #87ebe1;\\n  border-color: #87ebe1;\\n  color: #1b403a;\\n}\\n\\n.toolbar .toolbar-menu .toolbar-options .btn-default {\\n  background-color: #afafaf;\\n  border-color: #afafaf;\\n  color: white;\\n}\\n\\n.toolbar .toolbar-menu .toolbar-tags {\\n  background-color: #ebebeb;\\n  height: 40px;\\n  border-radius: 0 0 10px 10px;\\n}\";","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { ExternalDocumentComponent } from './external-document.component';\n\nconst routes: Routes = [\n  { path: 'new/:token', component: ExternalDocumentComponent },\n  { path: 'edit/:token', component: ExternalDocumentComponent },\n  { path: '', redirectTo: 'new' }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule]\n})\nexport class ExternalDocumentRoutingModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { DocumentModule } from '@app/modules/document/document.module';\nimport { SharedModule } from '@app/shared';\nimport { ComponentsModule } from '@app/shared/components/components.module';\nimport { NzCardModule, NzDropDownModule } from 'ng-zorro-antd';\nimport { NzCarouselModule } from 'ng-zorro-antd/carousel';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzPopoverModule } from 'ng-zorro-antd/popover';\nimport { ModalModule } from 'ngx-bootstrap/modal';\nimport { NgxLoadingModule } from 'ngx-loading';\nimport { NgxMaskModule } from 'ngx-mask';\nimport { PatientsModule } from './../patients/patients.module';\nimport { ExternalDocumentComponent } from './external-document.component';\nimport { ExternalDocumentRoutingModule } from './external-document.routing.module';\n\n@NgModule({\n  declarations: [ExternalDocumentComponent],\n  exports: [ExternalDocumentComponent],\n  imports: [\n    CommonModule,\n    SharedModule,\n    ExternalDocumentRoutingModule,\n    PatientsModule,\n    ComponentsModule,\n    DocumentModule,\n    NgxLoadingModule.forRoot({}),\n    NzDropDownModule,\n    NzCardModule,\n    NzCarouselModule,\n    NzIconModule,\n    NgxMaskModule.forRoot(),\n    NzPopoverModule,\n    ModalModule.forRoot()\n  ]\n})\nexport class ExternalDocumentModule {}\n"]}