{"version":3,"sources":["webpack:///src/app/modules/favorite-models/components/v1/attestation/attestation.component.ts","webpack:///src/app/modules/favorite-models/components/v1/attestation/attestation.component.html","webpack:///src/app/modules/favorite-models/components/v1/attestation/attestation.component.scss","webpack:///src/app/modules/favorite-models/components/v1/exam/exam.component.html","webpack:///src/app/modules/favorite-models/components/v1/exam/exam.component.ts","webpack:///src/app/modules/favorite-models/components/v1/exam/exam.component.scss","webpack:///src/app/modules/favorite-models/components/v1/orientation/orientation.component.ts","webpack:///src/app/modules/favorite-models/components/v1/orientation/orientation.component.html","webpack:///src/app/modules/favorite-models/components/v1/orientation/orientation.component.scss","webpack:///src/app/modules/favorite-models/components/v1/prescription/prescription.component.html","webpack:///src/app/modules/favorite-models/components/v1/prescription/prescription.component.ts","webpack:///src/app/modules/favorite-models/components/v1/prescription/prescription.component.scss","webpack:///src/app/modules/favorite-models/components/v2/favorite-attestation/favorite-attestation.component.ts","webpack:///src/app/modules/favorite-models/components/v2/favorite-attestation/favorite-attestation.component.html","webpack:///src/app/modules/favorite-models/components/v2/favorite-exam/favorite-exam.component.html","webpack:///src/app/modules/favorite-models/components/v2/favorite-exam/favorite-exam.component.ts","webpack:///src/app/modules/favorite-models/components/v2/favorite-orientation/favorite-orientation.component.ts","webpack:///src/app/modules/favorite-models/components/v2/favorite-orientation/favorite-orientation.component.html","webpack:///src/app/modules/favorite-models/components/v2/favorite-prescription/favorite-prescription.component.ts","webpack:///src/app/modules/favorite-models/components/v2/favorite-prescription/favorite-prescription.component.html","webpack:///src/app/modules/favorite-models/components/v2/favorite-prescription/favorite-prescription.component.scss","webpack:///src/app/modules/favorite-models/shared/favorite-models-state.service.ts","webpack:///src/app/modules/favorite-models/pages/favorite-models/favorite-models.component.ts","webpack:///src/app/modules/favorite-models/pages/favorite-models/favorite-models.component.html","webpack:///src/app/modules/favorite-models/pages/favorite-models/favorite-models.component.scss","webpack:///src/app/modules/favorite-models/favorite-models-routing.module.ts","webpack:///src/app/modules/favorite-models/components/shared/input-title/input-title.component.ts","webpack:///src/app/modules/favorite-models/components/shared/input-title/input-title.component.html","webpack:///src/app/modules/favorite-models/components/shared/input-title/input-title.component.scss","webpack:///src/app/modules/favorite-models/favorite-models.module.ts"],"names":["fb","formEmitter","this","attestationForm","group","text","control","required","title","description","onChangeValue","emit","attestation","value","reduce","accumulator","currentValue","get","setValue","attestationModel","addControl","valueChanges","subscribe","val","split","I","selector","template","examService","notification","hasForm","showJustification","buildForm","getMaterials","materials","exam","examForm","examList","array","justification","examListForm","push","formExamList","document","clear","forEach","ex","addMaterial","acc","examModel","material","exams","examsForm","materialForm","formExamItem","name","tuss","examListIndex","at","examType","adding","getExam","getExamTypes","res","examTypes","index","_id","valid","notify","list","length","onChangeJustification","removeAt","reset","examIndex","encapsulation","None","editMode","orientationForm","titleOrientation","orientations","orientation","orientationModel","patient","cpf","crService","search","signed","destroyed$","ReplaySubject","prescriptionForm","code","manipulatedprofile","undefined","showPatientCpf","showPrescriberCpf","medication","medicaments","local","next","complete","prescription","medicamentsFormCtrl","status","patchValue","m","addPrescription","nome","id","medicamentId","principio","principle","laboratorio","laboratory","ean","apresentacaoCustomizada","quantity","prescribedQuantity","chooseMedicament","addedMedication","manipuled","type","timer","pipe","take","prescriptionModel","addRow","manipulatedProfile","dosage","formGroup","filter","debounceTime","distinctUntilChanged","takeUntil","medications$","searchMedicament","medicament","selectedMedicament","formMedicaments","medicamentFormGroup","isVeterinarian","showModelForm","showCardTextBox","showCardCid","form","version","join","clearValidators","updateValueAndValidity","attestationDays","typeOfActivity","cid","items","documentoModel","init","resetValidationsDescription","setValidators","setErrors","showCardDataExams","verifyShowCards","fillForm","data","groupExam","showTuss","hasJustification","some","isEmpty","hasCid","trim","showCardObservation","showSearchMedicaments","observation","hasObservation","medicamentsFormArray","formGroupMedicament","prescriptionTypeId","typeCr","unitOfMeasurement","editing","FavoriteModelsStateService","_documentType","_version","providedIn","favoriteModelState","router","activateRouter","authService","prescriptionModelService","attestationModelService","examModelService","orientationModelService","modalService","coreService","HTTP_STATUS_CONFLICT","newDocument","documentsFavorites","documentsFavoritesFilter","descriptionTypeDocument","isMobile","onResize","isViewPortMobile","hasAccessNewModulePrescription","getListDocumentsTemplates","paramMap","async","modelId","params","loading","documentType","snapshot","selectedDocumentModel","getDocumentModel","user","Boolean","getById","getListByPrescriberId","documentTemplate","navigate","markFormGroup","documentForm","payload","prescriber","create","then","onSuccessCreateFavorite","catch","error","onFailureCreateFavorite","msg","getFormError","model","update","err","console","confirm","nzTitle","nzContent","nzOnOk","deleteDocumentModel","nzOnCancel","deleteById","item","RegExp","test","cidValues","map","a","nativeAsync","routes","path","component","FavoriteModelsRoutingModule","imports","forChild","exports","INPUT_FIELD_VALUE_ACCESSOR","provide","useExisting","InputTitleComponent","multi","onChangeCb","onTouchedCb","innerValue","v","fn","providers","FavoriteModelsModule","forRoot","declarations"],"mappings":"0QAUa,EAAoB,MAM/B,YAAoBA,GAAA,KAAAA,KAJV,KAAAC,YAAuC,IAAI,IAKnDC,KAAKC,gBAAkBD,KAAKF,GAAGI,MAAM,CACnCC,KAAMH,KAAKF,GAAGM,QAAQ,GAAI,IAAWC,UACrCC,MAAON,KAAKF,GAAGM,QAAQ,GAAI,IAAWC,UACtCE,YAAaP,KAAKF,GAAGM,QAAQ,MAIjC,WACEJ,KAAKQ,gBACLR,KAAKD,YAAYU,KAAKT,KAAKC,iBAG7B,gBACgBS,GACd,GAAIA,EAAa,CACf,MAAMC,EAAQD,EAAYH,YAAYK,OAAOA,CAC1CC,EAAaC,IAAiBD,EAAc,KAAOC,GAEtDd,KAAKC,gBAAgBc,IAAI,QAAQC,SAASL,GAC1CX,KAAKC,gBAAgBc,IAAI,eAAeC,SAASN,EAAYH,aAG/DP,KAAKQ,gBAGP,qBACqBS,GACnB,GAAIA,EAAkB,CACpBjB,KAAKC,gBAAgBiB,WAAW,QAASlB,KAAKF,GAAGM,QAAQ,GAAI,IAAWC,WAExE,MAAMM,EAAQM,EAAiBV,YAAYK,OAAOA,CAC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wDD,aADCA,EAAA,E,gKAzQU,EAAuB,aALnC,YAAU,CACT7N,SAAU,sBACVC,SCrBa,wnT,QCAA,snJ,iCF4CgBwJ,EACX,IACQ,IACJ,IACc,IACD,IACP,IACO,IACX,IACA,IACD,OA9BZ,GGpBb,MAAMqE,EAAiB,CACrB,CACEC,KAAM,GACNC,UAAW,EACXzF,KAAM,CACJ+C,aAAc,iBAGlB,CACEyC,KAAM,yBACNC,UAAW,EACXzF,KAAM,CACJ+C,aAAc,kB,IASP2C,EAA2B,QAA3BA,EAA2B,aAJvC,YAAS,CACRC,QAAS,CAAC,IAAaC,SAASL,IAChCM,QAAS,CAAC,QAECH,GCtBb,MAAMI,EAAuC,CAC3CC,QAAS,IACTC,YAAa,iBAAiBC,GAC9BC,OAAO,G,IASID,EAAmB,M,cAiB9B,KAAAE,WAA+B,OAC/B,KAAAC,YAAgC,OAZhC,YACE,OAAOnQ,KAAKoQ,WAGd,UAAUC,GACJA,IAAMrQ,KAAKoQ,aACbpQ,KAAKoQ,WAAaC,EAClBrQ,KAAKkQ,WAAWG,IAOpB,WAAWA,GACTrQ,KAAKW,MAAQ0P,EAEf,iBAAiBC,GACftQ,KAAKkQ,WAAaI,EAEpB,kBAAkBA,GAChBtQ,KAAKmQ,YAAcG,I,4BA1BpB,EAAA/O,I,aACA,EAAAA,KAFUyO,EAAmB,aAN/B,YAAU,CACTxO,SAAU,kBACVC,SCXa,2UDab8O,UAAW,CAACV,G,QEbC,saFeFG,G,IG2BAQ,EAAoB,QAApBA,EAAoB,aAvBhC,YAAS,CACRd,QAAS,CACP,IACAD,EACA,IACA,IAAiBgB,QAAQ,IACzB,IAAYA,UACZ,KAEFC,aAAc,CACZ,EACA,EACA,EACA,EAEA,EACA,EACA,EACA,EACA,EACAV,MAGSQ","file":"x","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Attestation } from '@app/shared/models/attestation';\nimport { Patient } from '@app/shared/models/patient';\n\n@Component({\n selector: 'app-attestation',\n templateUrl: './attestation.component.html',\n styleUrls: ['./attestation.component.scss']\n})\nexport class AttestationComponent implements OnInit {\n @Input() patient: Patient;\n @Output() formEmitter: EventEmitter<FormGroup> = new EventEmitter<FormGroup>();\n\n attestationForm: FormGroup;\n\n constructor(private fb: FormBuilder) {\n this.attestationForm = this.fb.group({\n text: this.fb.control('', Validators.required),\n title: this.fb.control('', Validators.required),\n description: this.fb.control('')\n });\n }\n\n ngOnInit() {\n this.onChangeValue();\n this.formEmitter.emit(this.attestationForm);\n }\n\n @Input()\n set attestation(attestation: Attestation) {\n if (attestation) {\n const value = attestation.description.reduce(\n (accumulator, currentValue) => accumulator + '\\n' + currentValue\n );\n this.attestationForm.get('text').setValue(value);\n this.attestationForm.get('description').setValue(attestation.description);\n }\n\n this.onChangeValue();\n }\n\n @Input()\n set attestationModel(attestationModel: any) {\n if (attestationModel) {\n this.attestationForm.addControl('title', this.fb.control('', Validators.required));\n\n const value = attestationModel.description.reduce(\n (accumulator, currentValue) => accumulator + '\\n' + currentValue\n );\n this.attestationForm.get('title').setValue(attestationModel.title);\n this.attestationForm.get('text').setValue(value);\n this.attestationForm.get('description').setValue(attestationModel.description);\n }\n\n this.onChangeValue();\n }\n\n onChangeValue() {\n this.attestationForm.get('text').valueChanges.subscribe(val => {\n if (val) {\n const value = val.split('\\n');\n this.attestationForm.get('description').setValue(value);\n }\n });\n this.formEmitter.emit(this.attestationForm);\n }\n}\n","export default \"<div class=\\\"attestation\\\" [formGroup]=\\\"attestationForm\\\">\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n <label for=\\\"material\\\" theme>Digite aqui o conteúdo do atestado</label>\\n <textarea rows=\\\"6\\\" nz-input formControlName=\\\"text\\\" theme></textarea>\\n</div>\\n\";","export default \".attestation .font {\\n font-size: 24px !important;\\n}\\n.attestation .content-input {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 20px;\\n}\\n.attestation .content-input .input-name {\\n font-size: 25px;\\n outline: inherit;\\n border-left: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: solid 1px #ebebeb;\\n}\\n.attestation .content-input .input-name::-moz-placeholder {\\n font-size: 15px !important;\\n}\\n.attestation .content-input .input-name::placeholder {\\n font-size: 15px !important;\\n}\\n.attestation .underlined {\\n text-decoration: underline;\\n}\\n.attestation .info-ipt {\\n text-align: center;\\n width: 135px;\\n border: 0;\\n border-bottom: solid 2px;\\n outline: none;\\n}\\n.attestation .ant-select {\\n width: 165px;\\n}\\n.attestation textarea {\\n line-height: 2;\\n}\";","export default \"<div class=\\\"exam row\\\" style=\\\"margin: 0\\\">\\n <form class=\\\"col-12\\\" [formGroup]=\\\"examForm\\\">\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n <div\\n *ngFor=\\\"let examList of examListForm['controls']; index as examListIndex\\\"\\n formArrayName=\\\"examList\\\"\\n >\\n <div class=\\\"form-area\\\" formGroupName=\\\"{{ examListIndex }}\\\">\\n <label for=\\\"material\\\" theme>Material</label>\\n <div class=\\\"col-md-11 col-12 input-area\\\">\\n <nz-select\\n id=\\\"specialties\\\"\\n [nzDropdownClassName]=\\\"'account-select'\\\"\\n [nzPlaceHolder]=\\\"'Selecione o material'\\\"\\n formControlName=\\\"material\\\"\\n nzAllowClear\\n nzShowSearch\\n theme\\n >\\n <nz-option\\n *ngFor=\\\"let material of materials\\\"\\n [nzLabel]=\\\"material\\\"\\n [nzValue]=\\\"material\\\"\\n theme\\n >\\n </nz-option>\\n </nz-select>\\n <a class=\\\"remove-icon\\\" (click)=\\\"removeMaterialAt(examListIndex)\\\"\\n ><i class=\\\"fa fa-trash-solid custom-trash-solid-icon\\\"></i\\n ></a>\\n </div>\\n\\n <div class=\\\"exam-type-area ml-5\\\" *ngIf=\\\"hasMaterial(examListIndex)\\\" formArrayName=\\\"exams\\\">\\n <label for=\\\"examName\\\" theme>Exame</label>\\n <div\\n class=\\\"exams-area col-md-11 col-12\\\"\\n *ngFor=\\\"let exam of examList['controls'].exams['controls']; index as examIndex\\\"\\n >\\n <div class=\\\"input-area\\\" formGroupName=\\\"{{ examIndex }}\\\">\\n <input\\n id=\\\"examName\\\"\\n formControlName=\\\"name\\\"\\n (input)=\\\"onChangeExamType($event.target.value, examListIndex)\\\"\\n [nzAutocomplete]=\\\"autoName\\\"\\n class=\\\"input-name\\\"\\n nz-input\\n placeholder=\\\"Tipo de exame\\\"\\n theme\\n />\\n\\n <nz-autocomplete #autoName nzBackfill>\\n <nz-auto-option\\n *ngFor=\\\"let option of examTypes\\\"\\n [nzLabel]=\\\"option.exam\\\"\\n [nzValue]=\\\"option.exam\\\"\\n class=\\\"mao\\\"\\n >\\n {{ option.exam }}\\n </nz-auto-option>\\n </nz-autocomplete>\\n\\n <a class=\\\"remove-icon\\\" (click)=\\\"removeExamAt(examListIndex, examIndex)\\\"\\n ><i class=\\\"fa fa-trash-solid\\\"></i\\n ></a>\\n </div>\\n </div>\\n\\n <button\\n nz-button\\n class=\\\"btn btn-icon btn-add-outiline text-capitalize btn-exam\\\"\\n type=\\\"button\\\"\\n (click)=\\\"addNewExam(examListIndex)\\\"\\n theme\\n [ngStyle]=\\\"\\n colorSetting && {\\n 'background-color': colorSetting?.secondary,\\n 'border-color': colorSetting?.secondary\\n }\\n \\\"\\n >\\n <i class=\\\"fas fa-plus\\\"></i>\\n </button>\\n </div>\\n </div>\\n </div>\\n <div class=\\\"add-button btn-material mb-2\\\">\\n <button\\n nz-button\\n class=\\\"btn btn-add-outiline text-capitalize\\\"\\n type=\\\"button\\\"\\n theme\\n (click)=\\\"addMaterial()\\\"\\n [ngStyle]=\\\"\\n colorSetting && {\\n 'background-color': colorSetting?.secondary,\\n 'border-color': colorSetting?.secondary\\n }\\n \\\"\\n >\\n <span>Adicionar Material</span>\\n </button>\\n <button\\n *ngIf=\\\"!showJustification\\\"\\n nz-button\\n class=\\\"btn btn-icon btn-add-outiline text-capitalize\\\"\\n type=\\\"button\\\"\\n (click)=\\\"addJustification()\\\"\\n theme\\n [ngStyle]=\\\"\\n colorSetting && {\\n 'background-color': colorSetting?.secondary,\\n 'border-color': colorSetting?.secondary\\n }\\n \\\"\\n >\\n <span>Inserir Justificativa</span>\\n </button>\\n <button\\n *ngIf=\\\"showJustification\\\"\\n nz-button\\n class=\\\"btn btn-icon btn-add-outiline text-capitalize\\\"\\n type=\\\"button\\\"\\n (click)=\\\"removeJustification()\\\"\\n theme\\n [ngStyle]=\\\"\\n colorSetting && {\\n 'background-color': colorSetting?.secondary,\\n 'border-color': colorSetting?.secondary\\n }\\n \\\"\\n >\\n <span>Remover Justificativa</span>\\n </button>\\n </div>\\n <div *ngIf=\\\"showJustification\\\" class=\\\"mt-2\\\">\\n <label for=\\\"material\\\" theme>Justificativa:</label>\\n <textarea\\n rows=\\\"6\\\"\\n nz-input\\n formControlName=\\\"text\\\"\\n (input)=\\\"onChangeJustification($event.target.value)\\\"\\n placeholder=\\\"Texto livre\\\"\\n theme\\n ></textarea>\\n </div>\\n </form>\\n</div>\\n\";","import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';\nimport { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { ExamService } from '@app/modules/document/services/exam.service';\nimport { ExamType } from '@app/shared/models';\nimport { ColorSetting } from '@app/shared/models/color-setting';\nimport { Exam, ExamItem, ExamList } from '@app/shared/models/exam';\nimport { AppToastService } from '@app/shared/services/app-toast.service';\n\n@Component({\n selector: 'app-exam',\n templateUrl: './exam.component.html',\n styleUrls: ['./exam.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class ExamComponent implements OnInit {\n @Input() colorSetting: ColorSetting;\n @Output() formEmitter: EventEmitter<FormGroup> = new EventEmitter<FormGroup>();\n\n adding: boolean;\n materialSelected: string;\n materials: string[];\n examTypes: ExamType[];\n hasForm = false;\n showJustification = false;\n\n examForm: FormGroup;\n\n constructor(\n private fb: FormBuilder,\n private examService: ExamService,\n private notification: AppToastService\n ) {}\n\n ngOnInit() {\n this.buildForm();\n this.examService.getMaterials().subscribe(materials => {\n this.materials = materials;\n });\n }\n\n private buildForm(exam?: Exam) {\n if (!this.examForm) {\n this.examForm = this.fb.group({\n examList: this.fb.array([], Validators.required),\n justification: this.fb.control([]),\n text: this.fb.control(''),\n title: this.fb.control('', Validators.required)\n });\n this.examListForm.push(this.formExamList());\n }\n\n if (exam && exam.document === 'exam') {\n if (exam.title) {\n this.examForm.addControl('title', this.fb.control('', Validators.required));\n this.examForm.get('title').setValue(exam.title);\n }\n\n this.examListForm.clear();\n exam.examList.forEach(ex => this.addMaterial(ex));\n this.examForm.get('justification').setValue(exam.justification);\n if (exam.justification) {\n const value = exam.justification.reduce((acc, val) => `${acc}\\n${val}`, '');\n this.examForm.get('text').setValue(value);\n this.showJustification = !!value;\n }\n }\n this.formEmitter.emit(this.examForm);\n }\n\n @Input()\n set exam(exam: Exam) {\n if (exam) {\n this.buildForm(exam);\n }\n }\n\n @Input()\n set examModel(examModel: Exam) {\n if (examModel) {\n this.buildForm(examModel);\n }\n }\n\n private formExamList(examList: ExamList = null) {\n const group = this.fb.group({\n material: this.fb.control('', Validators.required),\n exams: this.fb.array([])\n });\n\n const examsForm = <FormArray>group.get('exams');\n if (examList) {\n const materialForm = group.get('material');\n\n const { material, exams } = examList;\n materialForm.setValue(material);\n exams.forEach(exam => examsForm.push(this.formExamItem(exam)));\n } else {\n examsForm.push(this.formExamItem());\n }\n\n return group;\n }\n\n private formExamItem(exam: ExamItem = null) {\n return this.fb.group({\n name: this.fb.control(exam ? exam.name : '', Validators.required),\n tuss: this.fb.control(exam ? exam.tuss : '')\n });\n }\n\n get examListForm(): FormArray {\n return <FormArray>this.examForm.get('examList');\n }\n\n private getExam(examListIndex: number) {\n return this.examListForm.at(examListIndex);\n }\n\n onChangeExamType(examType: string, examListIndex: number) {\n this.adding = true;\n const examList: ExamList = this.getExam(examListIndex).value;\n\n this.examService.getExamTypes(examList.material, examType).subscribe(res => {\n this.examTypes = res;\n this.adding = false;\n });\n }\n\n onChangeJustification(text: string) {\n const value = text.split('\\n');\n this.examForm.get('justification').setValue(value);\n }\n\n selectExamType(exam: ExamType, index: number) {\n this.examListForm.value[index] = exam._id;\n }\n\n addNewExam(examListIndex: number): void {\n const exam: FormArray = <FormArray>this.getExam(examListIndex).get('exams');\n if (exam.valid) {\n exam.push(this.formExamItem());\n } else {\n this.notification.notify('warning', 'Aviso', 'Você precisa selecionar um exame.');\n }\n }\n\n addMaterial(examList: ExamList = null): void {\n const list = this.examListForm.value;\n if (list.length === 0 || list[list.length - 1].material) {\n this.examListForm.push(this.formExamList(examList));\n }\n }\n\n addJustification(): void {\n if (this.examListForm.value.length) {\n this.showJustification = true;\n }\n }\n\n removeJustification(): void {\n this.onChangeJustification('');\n this.showJustification = false;\n }\n\n removeMaterialAt(index: number): void {\n if (this.examListForm.length > 1) {\n this.examListForm.removeAt(index);\n } else if (this.examListForm.length === 1) {\n this.examListForm.at(index).reset();\n }\n }\n\n removeExamAt(examListIndex: number, examIndex: number): void {\n const exams: FormArray = <FormArray>this.examListForm.at(examListIndex).get('exams');\n if (exams.length > 1) {\n exams.removeAt(examIndex);\n } else if (exams.length === 1) {\n exams.at(examIndex).reset();\n }\n }\n\n hasMaterial(examListIndex: number) {\n return !!(<FormArray>this.examListForm.at(examListIndex).value.material);\n }\n}\n","export default \".exam {\\n justify-content: center;\\n}\\n.exam ::ng-deep .ng-star-inserted {\\n margin-bottom: 15px;\\n}\\n.exam .content-input {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 20px;\\n}\\n.exam .content-input .input-name {\\n font-size: 25px;\\n outline: inherit;\\n border-left: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: solid 1px #ebebeb;\\n}\\n.exam .content-input .input-name::-moz-placeholder {\\n font-size: 15px !important;\\n}\\n.exam .content-input .input-name::placeholder {\\n font-size: 15px !important;\\n}\\n.exam .form-area {\\n margin-bottom: 25px;\\n}\\n.exam .form-area .input-area {\\n display: flex;\\n}\\n.exam .form-area .input-area .remove-icon:hover {\\n color: red;\\n}\\n.exam .form-area .exam-type-area {\\n margin-left: 50px;\\n}\\n.exam .form-area .exam-type-area .exams-area {\\n width: 100%;\\n}\\n.exam .btn {\\n padding: 0px 20px;\\n}\\n.exam .add-button {\\n display: flex;\\n justify-content: center;\\n}\\n.btn-exam {\\n padding: 0px 20px;\\n float: right;\\n}\\n.btn-material {\\n margin-top: 70px;\\n}\\n.exam .form-area .exam-type-area {\\n margin-left: 0;\\n}\\n.custom-trash-solid-icon {\\n position: absolute;\\n top: 10px;\\n margin-left: 5px;\\n}\\n.btn-add-outiline {\\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 background-color: var(--bg-color-secondary);\\n color: var(--color-white);\\n}\\n.btn-add-outiline:focus {\\n background-color: var(--bg-color-secondary);\\n color: var(--color-white);\\n}\\n.btn-add-outiline:hover {\\n background-color: var(--bg-color-primary);\\n}\";","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Orientation, Patient } from '@app/shared/models';\nimport { ColorSetting } from '@app/shared/models/color-setting';\n\n@Component({\n selector: 'app-orientation',\n templateUrl: './orientation.component.html',\n styleUrls: ['./orientation.component.scss']\n})\nexport class OrientationComponent implements OnInit {\n @Input() colorSetting: ColorSetting;\n @Input() patient: Patient;\n @Input() orientation: Orientation;\n @Input() editMode = false;\n @Output() formEmitter = new EventEmitter<FormGroup>();\n\n orientationForm: FormGroup;\n orientations: string;\n\n constructor(private fb: FormBuilder) {\n this.orientationForm = this.fb.group({\n title: ['', Validators.required],\n titleOrientation: ['', Validators.required],\n text: ['', Validators.required],\n orientations: ['']\n });\n }\n\n ngOnInit() {\n if (this.orientation) {\n this.orientationForm.get('title').setValue(this.orientation.title);\n const value = this.orientation.orientations.reduce(\n (accumulator, currentValue) => accumulator + '\\n' + currentValue\n );\n this.orientationForm.get('text').setValue(value);\n this.orientationForm.get('orientations').setValue(this.orientation.orientations);\n }\n\n this.orientationForm.get('text').valueChanges.subscribe(val => {\n if (val) {\n const value = val.split('\\n');\n this.orientationForm.get('orientations').setValue(value);\n }\n });\n this.formEmitter.emit(this.orientationForm);\n }\n\n @Input()\n set orientationModel(orientationModel: any) {\n if (orientationModel) {\n const value = orientationModel.orientations.reduce((acc, val) => acc + '\\n' + val);\n this.orientationForm.get('text').setValue(value);\n this.orientationForm.get('title').setValue(orientationModel.title);\n this.orientationForm.get('titleOrientation').setValue(orientationModel.titleOrientation);\n this.orientationForm.get('orientations').setValue(orientationModel.orientations);\n }\n }\n\n get showCpfText() {\n return this.patient && !this.patient.cpf ? 'Mostrar CPF do Responsável' : 'Mostrar CPF do Paciente';\n }\n}\n","export default \"<div class=\\\"orientation\\\" [formGroup]=\\\"orientationForm\\\">\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n <label for=\\\"material\\\">TÃtulo Orientação</label>\\n <input\\n id=\\\"title\\\"\\n class=\\\"input-name\\\"\\n formControlName=\\\"titleOrientation\\\"\\n nz-input\\n placeholder=\\\"Digite o tÃtulo do documento\\\"\\n theme\\n />\\n <label for=\\\"material\\\">Escreva o conteúdo do documento:</label>\\n <textarea rows=\\\"4\\\" nz-input formControlName=\\\"text\\\" theme></textarea>\\n</div>\\n\";","export default \"textarea {\\n padding: 20px;\\n}\\n\\n.orientation .content-input {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 20px;\\n}\\n\\n.orientation .content-input .input-name {\\n font-size: 25px;\\n outline: inherit;\\n border-left: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: solid 1px #EBEBEB;\\n}\\n\\n.orientation .content-input .input-name::-moz-placeholder {\\n font-size: 15px !important;\\n}\\n\\n.orientation .content-input .input-name::placeholder {\\n font-size: 15px !important;\\n}\";","export default \"<div class=\\\"prescription\\\" [formGroup]=\\\"prescriptionForm\\\">\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n <ng-container formArrayName=\\\"medicaments\\\">\\n <ng-container\\n *ngFor=\\\"let medicamentFormGroup of prescriptionForm.get('medicaments')['controls']; let i = index\\\"\\n [formGroup]=\\\"medicamentFormGroup\\\"\\n >\\n <div class=\\\"medication-container mt-3\\\" *ngIf=\\\"medicamentFormGroup.value as medicament\\\">\\n <div class=\\\"add-prescription d-flex\\\" *ngIf=\\\"medicament.chooseMedicament\\\">\\n <ng-container>\\n <textarea\\n [ngStyle]=\\\"{ color: colorSetting?.primary }\\\"\\n [nzAutocomplete]=\\\"autoMedication\\\"\\n appFocus\\n focus=\\\"true\\\"\\n placeholder=\\\"Nome do medicamento ou princÃpio ativo\\\"\\n class=\\\"medicationNameInput\\\"\\n formControlName=\\\"medication\\\"\\n nz-input\\n ></textarea>\\n <button\\n class=\\\"btn btn-add-name\\\"\\n nz-button\\n (click)=\\\"addManual(medicamentFormGroup)\\\"\\n [ngStyle]=\\\"{\\n 'background-color': colorSetting?.secondary,\\n 'border-color': colorSetting?.secondary\\n }\\\"\\n >\\n <i class=\\\"fas fa-arrow-right\\\"></i>\\n </button>\\n <nz-autocomplete #autoMedication class=\\\"medicationAutoComplete\\\" nzBackfill>\\n <div *ngIf=\\\"search\\\">\\n <ng-container *ngFor=\\\"let option of medications$ | async\\\">\\n <nz-auto-option\\n (click)=\\\"selectMedicament(medicamentFormGroup, option)\\\"\\n [nzLabel]=\\\"option.nome\\\"\\n [nzValue]=\\\"option\\\"\\n >\\n <span>{{ option?.nome }}</span>\\n <span id=\\\"indexPresentation\\\">, {{ option.apresentacaoCustomizada }}</span>\\n <span *ngIf=\\\"option?.tipo\\\">, {{ option?.tipo }}</span>\\n </nz-auto-option>\\n </ng-container>\\n <nz-auto-option\\n (click)=\\\"addManual(medicamentFormGroup)\\\"\\n *ngIf=\\\"medicament.medication\\\"\\n [nzValue]=\\\"medicament.medication\\\"\\n class=\\\"text-center\\\"\\n >\\n <p\\n class=\\\"text-underline title-semi-bold mb-0 flex-grow-1\\\"\\n [ngStyle]=\\\"{ color: colorSetting?.secondary }\\\"\\n >\\n Adicionar texto livre\\n </p>\\n </nz-auto-option>\\n </div>\\n </nz-autocomplete>\\n </ng-container>\\n </div>\\n\\n <div *ngIf=\\\"medicament.addedMedication\\\">\\n <div *ngIf=\\\"medicament.medicamentId\\\">\\n <h4 class=\\\"title\\\" *ngIf=\\\"!medicament.chooseMedicament\\\">\\n {{ i + 1 }}. {{ medicament.name }}\\n </h4>\\n </div>\\n\\n <div\\n *ngIf=\\\"!medicament.medicamentId && !medicament.chooseMedicament\\\"\\n class=\\\"free-prescription\\\"\\n >\\n <h4 class=\\\"title\\\">{{ i + 1 }}. {{ medicament.name }}</h4>\\n </div>\\n <h2 class=\\\"activePrinciples\\\" *ngIf=\\\"medicament.principle || medicament.description\\\">\\n {{ medicament.principle }}\\n <span *ngIf=\\\"medicament.principle && medicament.description\\\">-</span\\n >{{ medicament.description }}\\n </h2>\\n\\n <nz-form-item>\\n <nz-form-label [nzFor]=\\\"'dosage_' + i\\\" class=\\\"sr-only\\\">Posologia</nz-form-label>\\n <nz-form-control>\\n <textarea\\n [focus]=\\\"!adding\\\"\\n [id]=\\\"'dosage_' + i\\\"\\n appAutoSize\\n appFocus\\n formControlName=\\\"dosage\\\"\\n nz-input\\n placeholder=\\\"Escreva aqui a posologia...\\\"\\n [disabled]=\\\"signed\\\"\\n ></textarea>\\n </nz-form-control>\\n </nz-form-item>\\n <app-auto-width-input-number\\n [id]=\\\"'quantidade' + i\\\"\\n formControlName=\\\"prescribedQuantity\\\"\\n [disabled]=\\\"signed\\\"\\n [colorSetting]=\\\"colorSetting\\\"\\n >\\n </app-auto-width-input-number>\\n\\n <div\\n class=\\\"buttons-edit-prescription\\\"\\n *ngIf=\\\"!signed && !medicament.chooseMedicament && !medicament.manipuled\\\"\\n >\\n <button\\n (click)=\\\"editMedicament(medicamentFormGroup)\\\"\\n title=\\\"Alterar medicamento\\\"\\n class=\\\"btn btn-icon btn-simple\\\"\\n type=\\\"button\\\"\\n >\\n <span class=\\\"btn-inner--icon\\\"><i class=\\\"fa fa-pencil-solid\\\"></i></span>\\n </button>\\n <button\\n (click)=\\\"deletePrescription(i)\\\"\\n title=\\\"Remover medicamento\\\"\\n class=\\\"btn btn-icon btn-simple\\\"\\n type=\\\"button\\\"\\n >\\n <span class=\\\"btn-inner--icon\\\"><i class=\\\"fa fa-trash-solid\\\"></i></span>\\n </button>\\n </div>\\n </div>\\n </div>\\n </ng-container>\\n </ng-container>\\n <div class=\\\"add-prescription\\\">\\n <button\\n (click)=\\\"addRow()\\\"\\n *ngIf=\\\"!adding\\\"\\n class=\\\"btn btn-icon btn-add-outiline text-capitalize\\\"\\n type=\\\"button\\\"\\n [ngStyle]=\\\"{\\n 'background-color': colorSetting?.secondary,\\n 'border-color': colorSetting?.secondary\\n }\\\"\\n >\\n <span class=\\\"btn-inner--text\\\">Adicionar Medicamento</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 </div>\\n</div>\\n\";","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\nimport { CrService } from '@app/modules/document/services/cr.service';\nimport { Patient } from '@app/shared/models';\nimport { ColorSetting } from '@app/shared/models/color-setting';\nimport { Observable, ReplaySubject, timer } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, filter, take, takeUntil } from 'rxjs/operators';\n\n@Component({\n selector: 'app-prescription',\n templateUrl: './prescription.component.html',\n styleUrls: ['./prescription.component.scss']\n})\nexport class PrescriptionComponent implements OnInit, OnDestroy {\n @Input() patient: Patient;\n @Input() editMode: boolean;\n @Input() colorSetting: ColorSetting;\n @Output() formEmitter: EventEmitter<FormGroup> = new EventEmitter<FormGroup>();\n\n public adding = true;\n public search = true;\n signed = false;\n public medications$: Observable<any[]>;\n private destroyed$: ReplaySubject<boolean> = new ReplaySubject<boolean>();\n\n prescriptionForm = this.fb.group({\n title: ['', Validators.required],\n code: [''],\n manipulatedprofile: [undefined],\n showPatientCpf: [false],\n showPrescriberCpf: [false],\n medication: [''],\n medicaments: this.fb.array([], Validators.required),\n local: ['']\n });\n\n constructor(private crService: CrService, private fb: FormBuilder) {}\n\n ngOnInit() {\n this.formEmitter.emit(this.prescriptionForm);\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next(true);\n this.destroyed$.complete();\n }\n\n @Input()\n set prescription(prescription: any) {\n if (prescription) {\n this.medicamentsFormCtrl.removeAt(0);\n this.signed = prescription.status === 'Assinada';\n this.prescriptionForm.patchValue({ ...prescription });\n prescription.medicaments.forEach(m => {\n this.addPrescription({\n ...m,\n nome: m.name,\n id: m.medicamentId,\n principio: m.principle,\n laboratorio: m.laboratory,\n ean: m.ean,\n apresentacaoCustomizada: m.description,\n quantity: m.prescribedQuantity,\n chooseMedicament: false,\n addedMedication: true,\n manipuled: m.manipuled,\n type: m.type\n });\n });\n\n timer(100)\n .pipe(take(1))\n .subscribe(() => (this.adding = false));\n }\n }\n\n @Input()\n set prescriptionModel(prescriptionModel: any) {\n if (prescriptionModel) {\n this.prescriptionForm.reset();\n this.prescriptionForm.addControl('title', this.fb.control('', Validators.required));\n this.signed = prescriptionModel.status === 'Assinada';\n this.prescriptionForm.patchValue({ ...prescriptionModel });\n prescriptionModel.medicaments.forEach(m => {\n this.addPrescription({\n ...m,\n nome: m.name,\n id: m.medicamentId,\n principio: m.principle,\n laboratorio: m.laboratory,\n ean: m.ean,\n apresentacaoCustomizada: m.description,\n quantity: m.prescribedQuantity,\n chooseMedicament: false,\n addedMedication: true,\n type: m.type\n });\n });\n\n timer(100)\n .pipe(take(1))\n .subscribe(() => (this.adding = false));\n } else {\n this.addRow();\n }\n }\n\n @Input()\n set manipulatedProfile(manipulatedProfile: any) {\n if (manipulatedProfile) {\n this.prescriptionForm.get('manipulatedprofile').setValue(manipulatedProfile._id);\n this.medicamentsFormCtrl.removeAt(0);\n manipulatedProfile.medicaments.forEach(m => {\n this.addPrescription({\n ...m,\n nome: m.name,\n chooseMedicament: false,\n addedMedication: true,\n manipuled: true\n });\n });\n timer(100)\n .pipe(take(1))\n .subscribe(() => (this.adding = false));\n }\n }\n\n get showCpfText() {\n return this.patient && !this.patient.cpf ? 'Mostrar CPF do Responsável' : 'Mostrar CPF do Paciente';\n }\n\n formMedicaments({\n name,\n medicamentId,\n principle,\n laboratory,\n ean,\n quantity,\n description,\n dosage,\n medication,\n chooseMedicament,\n addedMedication,\n manipuled,\n type\n }): FormGroup {\n const formGroup = new FormGroup({\n name: new FormControl(name),\n medicamentId: new FormControl(medicamentId),\n prescribedQuantity: new FormControl(quantity),\n dosage: new FormControl(dosage, Validators.required),\n description: new FormControl(description),\n principle: new FormControl(principle),\n laboratory: new FormControl(laboratory),\n ean: new FormControl(ean),\n medication: new FormControl(medication),\n quantity: new FormControl(quantity),\n chooseMedicament: new FormControl(chooseMedicament),\n addedMedication: new FormControl(addedMedication),\n manipuled: new FormControl(manipuled),\n type: new FormControl(type)\n });\n formGroup\n .get('medication')\n .valueChanges.pipe(\n filter(value => value && value.length >= 3 && this.search),\n debounceTime(300),\n distinctUntilChanged(),\n takeUntil(this.destroyed$)\n )\n .subscribe(text => {\n this.medications$ = this.crService.searchMedicament(text);\n });\n return formGroup;\n }\n\n editMedicament(medicament) {\n medicament.get('chooseMedicament').setValue(true);\n medicament.get('medication').setValue(medicament.get('name').value);\n this.search = true;\n }\n\n selectMedicament(medicament: FormGroup, selectedMedicament: any) {\n this.search = false;\n this.adding = false;\n medicament.get('name').setValue(selectedMedicament.nome);\n medicament.get('principle').setValue(selectedMedicament.principio);\n medicament.get('laboratory').setValue(selectedMedicament.laboratorio);\n medicament.get('ean').setValue(selectedMedicament.ean);\n medicament.get('description').setValue(selectedMedicament.apresentacaoCustomizada);\n medicament.get('prescribedQuantity').setValue(1);\n medicament.get('medication').setValue(null);\n medicament.get('chooseMedicament').setValue(false);\n medicament.get('addedMedication').setValue(true);\n medicament.get('medicamentId').setValue(selectedMedicament.id);\n medicament.addControl('type', new FormControl('industrialized'));\n this.medications$ = undefined;\n }\n\n get medicamentsFormCtrl(): FormArray {\n return <FormArray>this.prescriptionForm.get('medicaments');\n }\n\n public addRow() {\n this.addPrescription({\n nome: '',\n id: '',\n principio: '',\n laboratorio: '',\n ean: '',\n apresentacaoCustomizada: '',\n quantity: 0,\n medication: null,\n chooseMedicament: true,\n addedMedication: false,\n manipuled: false\n });\n this.search = true;\n }\n\n public toggleAdding() {\n this.adding = !this.adding;\n }\n\n private addPrescription({\n nome,\n id,\n principio,\n laboratorio,\n ean,\n apresentacaoCustomizada,\n dosage = '',\n quantity = 1,\n medication,\n chooseMedicament,\n addedMedication,\n manipuled,\n type = 'industrialized'\n }): void {\n this.medicamentsFormCtrl.push(\n this.formMedicaments({\n name: nome,\n medicamentId: id,\n principle: principio,\n laboratory: laboratorio,\n ean: ean,\n description: apresentacaoCustomizada,\n dosage,\n quantity,\n medication,\n chooseMedicament,\n addedMedication,\n manipuled,\n type\n })\n );\n this.medications$ = undefined;\n this.search = true;\n }\n\n public deletePrescription(index: number): void {\n this.medicamentsFormCtrl.removeAt(index);\n if (this.medicamentsFormCtrl.value.length) {\n this.adding = false;\n } else {\n this.addRow();\n }\n }\n\n public setSearch(search) {\n this.search = search;\n }\n\n public addManual(medicamentFormGroup: FormGroup) {\n const name = medicamentFormGroup.get('medication').value;\n medicamentFormGroup.get('chooseMedicament').setValue(false);\n medicamentFormGroup.get('addedMedication').setValue(true);\n medicamentFormGroup.get('prescribedQuantity').setValue(1);\n medicamentFormGroup.get('name').setValue(name);\n medicamentFormGroup.get('medication').setValue(null);\n medicamentFormGroup.get('description').setValue(undefined);\n medicamentFormGroup.get('principle').setValue(undefined);\n medicamentFormGroup.get('ean').setValue(undefined);\n medicamentFormGroup.get('medicamentId').setValue(undefined);\n this.search = false;\n this.adding = false;\n }\n}\n","export default \".prescription ::ng-deep .ant-drawer-left.ant-drawer-open .ant-drawer-content-wrapper {\\n box-shadow: 0 9px 18px rgba(0, 0, 0, 0.18);\\n}\\n.prescription ::ng-deep .medication {\\n height: 230px;\\n overflow-y: auto;\\n}\\n.prescription ::ng-deep .medication::-webkit-scrollbar {\\n width: 7px;\\n}\\n.prescription ::ng-deep .medication::-webkit-scrollbar-thumb {\\n background-color: #c7c7c7;\\n border-radius: 10px;\\n}\\n.prescription ::ng-deep .content-input {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 20px;\\n}\\n.prescription ::ng-deep .content-input .input-name {\\n font-size: 25px;\\n outline: inherit;\\n border-left: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: solid 1px #ebebeb;\\n}\\n.prescription ::ng-deep .content-input .input-name::-moz-placeholder {\\n font-size: 15px !important;\\n}\\n.prescription ::ng-deep .content-input .input-name::placeholder {\\n font-size: 15px !important;\\n}\\n.prescription ::ng-deep .ant-drawer.ant-drawer-open .ant-drawer-mask {\\n opacity: 0.11;\\n}\\n.prescription ::ng-deep .ant-drawer-body {\\n padding-top: 0;\\n height: 90vh;\\n overflow: auto;\\n}\\n.prescription ::ng-deep .ant-drawer-open {\\n top: 80px;\\n}\\n.prescription ::ng-deep .menu-drawer {\\n top: 80px;\\n background-color: #007260;\\n border: 1px solid #007260;\\n}\\n.prescription ::ng-deep .menu-drawer .ant-drawer-content {\\n background-color: transparent;\\n}\\n.prescription ::ng-deep .inner-menu {\\n display: flex;\\n flex-direction: column;\\n}\\n.prescription ::ng-deep .inner-menu .menu-icon {\\n align-self: flex-end;\\n margin: 20px 0;\\n}\\n.prescription ::ng-deep .inner-menu .menu-icon .fa {\\n font-size: 20px;\\n color: white;\\n}\\n.prescription ::ng-deep .inner-menu .menu li {\\n padding: 20px 0;\\n}\\n.prescription ::ng-deep .inner-menu .menu a {\\n color: white;\\n font-family: \\\"problack\\\";\\n font-size: 18px;\\n text-transform: uppercase;\\n}\\n.prescription ::ng-deep .inner-menu .menu a:focus {\\n text-decoration: none;\\n}\\n.prescription ::ng-deep .inner-menu .menu a .fa {\\n margin-right: 10px;\\n}\\n.prescription ::ng-deep .medicationAutoComplete {\\n margin-top: 17px;\\n}\\n.prescription .toolbar {\\n display: flex;\\n}\\n.prescription .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.prescription .toolbar .menu-toggler .fa:before {\\n font-size: 22px;\\n}\\n.prescription .toolbar .menu-toggler,\\n.prescription .toolbar .toolbar-options {\\n height: 80px;\\n}\\n.prescription .toolbar .toolbar-menu {\\n flex: 1;\\n}\\n.prescription .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.prescription .toolbar .toolbar-menu .toolbar-options .btn {\\n font-family: \\\"problack\\\", sans-serif;\\n}\\n.prescription .toolbar .toolbar-menu .toolbar-options .btn-green {\\n background-color: #87ebe1;\\n border-color: #87ebe1;\\n color: #1b403a;\\n}\\n.prescription .toolbar .toolbar-menu .toolbar-options .btn-default {\\n background-color: #afafaf;\\n border-color: #afafaf;\\n color: white;\\n}\\n.prescription .toolbar .toolbar-menu .toolbar-tags {\\n background-color: #ebebeb;\\n height: 40px;\\n border-radius: 0 0 10px 10px;\\n}\\n.prescription .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.prescription .add-prescription.adding-bg {\\n background-color: #f5f5f5;\\n border-top: 1px solid transparent;\\n}\\n.prescription .add-prescription .btn-add-name {\\n background-color: var(--bg-color-primary);\\n border: 1px solid var(--bg-color-primary);\\n color: var(--color-white);\\n padding: 0px 10px;\\n margin: 10px;\\n}\\n.prescription .add-prescription .btn-add {\\n display: flex;\\n padding: 0 0 0 1.25rem;\\n height: 40px;\\n align-items: center;\\n border-radius: 10px;\\n overflow: hidden;\\n border: 0;\\n font-family: \\\"probold\\\", sans-serif;\\n background-color: var(--bg-color-secondary);\\n}\\n.prescription .add-prescription .btn-add .btn-inner--icon {\\n background-color: var(--bg-color-primary);\\n color: var(--color-white);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 40px;\\n width: 50px;\\n}\\n.prescription .btn-add-name {\\n padding: 0px 10px;\\n margin: 10px;\\n}\\n.prescription .medicationNameInput {\\n background-color: transparent;\\n border-color: transparent;\\n height: 100%;\\n box-shadow: none;\\n}\\n.prescription .free-prescription {\\n display: flex;\\n}\\n.prescription .free-prescription .break-line {\\n margin-left: 7px;\\n white-space: pre-wrap;\\n}\\n.prescription textarea {\\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.prescription textarea:hover, .prescription textarea:focus {\\n border-color: transparent;\\n box-shadow: none;\\n}\\n.btn-add-outiline {\\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 background-color: var(--bg-color-secondary);\\n color: var(--color-white);\\n}\\n.btn-add-outiline .btn-inner--icon {\\n background-color: var(--bg-color-primary);\\n color: var(--color-white);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 40px;\\n width: 50px;\\n}\\n.mandatory {\\n color: red;\\n}\";","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Patient } from '@app/shared/models';\nimport { Attestation } from '@app/shared/models/attestation';\nimport { ColorSetting } from '@app/shared/models/color-setting';\nimport { AppToastService } from '@app/shared/services/app-toast.service';\n\n@Component({\n selector: 'app-favorite-attestation',\n templateUrl: './favorite-attestation.component.html'\n})\nexport class FavoriteAttestationComponent implements OnInit {\n @Input() attestation: Attestation;\n @Input() patient: Patient;\n @Input() colorSetting: ColorSetting;\n @Input() isVeterinarian = false;\n @Output() formEmitter: EventEmitter<FormGroup> = new EventEmitter<FormGroup>();\n\n showModelForm = false;\n showCardTextBox = false;\n showCardCid = false;\n\n form: FormGroup;\n\n constructor(private fb: FormBuilder, private notification: AppToastService) {\n this.form = this.fb.group({\n title: ['', Validators.required],\n description: ['', Validators.required],\n version: ['BETA']\n });\n }\n\n ngOnInit() {\n this.formEmitter.emit(this.form);\n }\n\n init() {\n if (this.attestation) {\n this.showCardTextBox =\n this.attestation.description && this.attestation.description.join('\\n').length > 0;\n if (!this.showCardTextBox) {\n this.form.get('description').clearValidators();\n this.form.get('description').updateValueAndValidity();\n }\n\n this.showModelForm = !!this.attestation.attestationDays && !!this.attestation.typeOfActivity;\n this.showCardCid = this.attestation.cid && this.attestation.cid.items.length > 0;\n }\n }\n\n @Input()\n set documentModel(documentoModel: any) {\n if (documentoModel) {\n this.form.addControl('title', this.fb.control('', Validators.required));\n this.attestation = documentoModel;\n this.init();\n this.form.get('title').setValue(documentoModel.title);\n }\n }\n\n handlerModelFormAttestation(value: boolean) {\n this.showModelForm = value;\n if (!this.showCardTextBox) {\n this.resetValidationsDescription();\n }\n this.formEmitter.emit(this.form);\n }\n\n handlerShowCardTextBox(value: boolean) {\n if (this.showCardTextBox && value) {\n this.notification.notify('warning', 'Componente já adicionado', '');\n return;\n }\n\n this.showCardTextBox = value;\n if (value) {\n this.form.get('description').setValidators([Validators.required]);\n } else {\n this.resetValidationsDescription();\n }\n this.formEmitter.emit(this.form);\n }\n\n handlerShowCardCid() {\n this.showCardCid = true;\n if (!this.showCardTextBox) {\n this.resetValidationsDescription();\n }\n }\n\n private resetValidationsDescription() {\n this.form.get('description').clearValidators();\n this.form.get('description').setErrors(null);\n this.form.get('description').updateValueAndValidity();\n }\n}\n","export default \"<form [formGroup]=\\\"form\\\">\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n <app-model-form-pre-preenchido\\n *ngIf=\\\"showModelForm\\\"\\n [form]=\\\"form\\\"\\n [attestationDays]=\\\"attestation?.attestationDays\\\"\\n [typeOfActivity]=\\\"attestation?.typeOfActivity\\\"\\n (formEmitter)=\\\"attestationForm = $event\\\"\\n (onClickRemove)=\\\"handlerModelFormAttestation(false)\\\"\\n ></app-model-form-pre-preenchido>\\n <app-text-box-form\\n *ngIf=\\\"showCardTextBox\\\"\\n [form]=\\\"form\\\"\\n [text]=\\\"attestation?.description?.join('\\\\n')\\\"\\n (formEmitter)=\\\"form = $event\\\"\\n (onChangeText)=\\\"form.get('description').setValue($event)\\\"\\n (onClickRemove)=\\\"handlerShowCardTextBox(false)\\\"\\n ></app-text-box-form>\\n\\n <app-cid-form\\n [form]=\\\"form\\\"\\n *ngIf=\\\"showCardCid\\\"\\n [authorizedByPatient]=\\\"attestation?.cid?.authorizedByPatient\\\"\\n [showDescription]=\\\"attestation?.cid?.showDescription\\\"\\n [items]=\\\"attestation?.cid?.items\\\"\\n (onClickRemoveCardCid)=\\\"showCardCid = false\\\"\\n ></app-cid-form>\\n</form>\\n\\n<app-add-type-options\\n [viewTextBox]=\\\"true\\\"\\n [viewFormAttestation]=\\\"!isVeterinarian\\\"\\n [viewShowCardCID]=\\\"!isVeterinarian\\\"\\n (onClickAddViewFormAttestation)=\\\"handlerModelFormAttestation(true)\\\"\\n (onClickAddTextBox)=\\\"handlerShowCardTextBox(true)\\\"\\n (onClickShowCardCID)=\\\"handlerShowCardCid()\\\"\\n typeDocument=\\\"attestation\\\"\\n></app-add-type-options>\\n\";","export default \"<form [formGroup]=\\\"form\\\">\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n\\n <app-data-exam-form\\n [form]=\\\"form\\\"\\n (onClickRemoveCardDataExam)=\\\"handlerShowCardDataExams(false)\\\"\\n *ngIf=\\\"showCardDataExams\\\"\\n [isVeterinarian]=\\\"isVeterinarian\\\"\\n ></app-data-exam-form>\\n\\n <app-text-box-form\\n *ngIf=\\\"showCardTextBox\\\"\\n [form]=\\\"form\\\"\\n [text]=\\\"exam?.justification.join('\\\\n')\\\"\\n (onChangeText)=\\\"form.get('justification').setValue($event)\\\"\\n (onClickRemove)=\\\"handlerShowCardTextBox(false)\\\"\\n ></app-text-box-form>\\n\\n <app-cid-form\\n [form]=\\\"form\\\"\\n *ngIf=\\\"showCardCid\\\"\\n [authorizedByPatient]=\\\"exam?.cid?.authorizedByPatient\\\"\\n [showDescription]=\\\"exam?.cid?.showDescription\\\"\\n [items]=\\\"exam?.cid?.items\\\"\\n (onClickRemoveCardCid)=\\\"showCardCid = false\\\"\\n ></app-cid-form>\\n</form>\\n\\n<app-add-type-options\\n [viewDataExams]=\\\"true\\\"\\n [viewTextBox]=\\\"true\\\"\\n [viewShowCardCID]=\\\"!isVeterinarian\\\"\\n (onClickShowCardCID)=\\\"handlerShowCardCid()\\\"\\n (onClickAddDataExams)=\\\"handlerShowCardDataExams(true)\\\"\\n (onClickAddTextBox)=\\\"handlerShowCardTextBox(true)\\\"\\n></app-add-type-options>\\n\";","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Exam } from '@app/shared/models/exam';\nimport { AppToastService } from '@app/shared/services/app-toast.service';\nimport _ from 'lodash';\n\n@Component({\n selector: 'app-favorite-exam',\n templateUrl: './favorite-exam.component.html'\n})\nexport class FavoriteExamComponent implements OnInit {\n @Input() form: FormGroup;\n @Input() isVeterinarian = false;\n\n @Output() formEmitter: EventEmitter<FormGroup> = new EventEmitter<FormGroup>();\n\n exam: Exam;\n showCardDataExams = false;\n showCardCid = false;\n showCardTextBox = false;\n constructor(private fb: FormBuilder, private notification: AppToastService) {\n this.buildForm();\n }\n\n ngOnInit(): void {\n this.formEmitter.emit(this.form);\n }\n\n init() {\n this.verifyShowCards();\n this.fillForm();\n this.formEmitter.emit(this.form);\n }\n\n @Input()\n set documentModel(data: Exam) {\n if (data) {\n this.showCardCid = false;\n this.showCardTextBox = false;\n this.exam = data;\n this.buildForm();\n this.init();\n }\n }\n\n buildForm() {\n this.form = this.fb.group({\n title: ['', Validators.required],\n version: ['BETA'],\n examList: this.fb.array([]),\n justification: this.fb.control([])\n });\n }\n\n fillForm() {\n if (this.exam) {\n this.form.patchValue({\n title: this.exam.title || '',\n justification: this.exam.justification || ''\n });\n this.exam.examList.forEach(examList => {\n const groupExam = this.fb.group({\n showTuss: [examList.showTuss],\n exams: this.fb.array(examList.exams, Validators.required)\n });\n (<FormArray>this.form.get('examList')).push(groupExam);\n });\n }\n }\n\n verifyShowCards() {\n if (this.exam) {\n if (this.exam.examList && this.exam.examList.length > 0) {\n this.showCardDataExams = true;\n this.form.get('examList').setValidators([Validators.required]);\n }\n if (this.exam.cid && this.exam.cid.items.length > 0) {\n this.showCardCid = true;\n }\n if (this.hasJustification()) {\n this.showCardTextBox = true;\n }\n }\n }\n\n hasJustification(): boolean {\n return (\n this.exam.justification &&\n this.exam.justification.length > 0 &&\n this.exam.justification.some(text => !_.isEmpty(text))\n );\n }\n\n handlerShowCardCid() {\n this.showCardCid = true;\n }\n\n handlerShowCardDataExams(value: boolean) {\n if (!value) {\n (<FormArray>this.form.get('examList')).reset();\n this.showCardDataExams = false;\n return;\n }\n\n const exists = (<FormArray>this.form.get('examList')).length === 1;\n if (exists) {\n this.notification.notify('warning', 'Componente já adicionado', '');\n return;\n }\n\n this.showCardDataExams = value;\n const groupExam = this.fb.group({\n showTuss: [false],\n exams: this.fb.array([], Validators.required)\n });\n\n (<FormArray>this.form.get('examList')).push(groupExam);\n this.formEmitter.emit(this.form);\n }\n\n handlerShowCardTextBox(value: boolean) {\n this.showCardTextBox = value;\n if (!value) {\n this.form.get('justification').setValue(null);\n this.form.get('examList').setValidators([Validators.required]);\n this.form.get('examList').updateValueAndValidity();\n } else {\n this.form.get('examList').setValidators(null);\n this.form.get('examList').clearValidators();\n this.form.get('examList').updateValueAndValidity();\n }\n }\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { Orientation, Patient } from '@app/shared/models';\nimport { CidItem } from '@app/shared/models/CidItem';\n\n@Component({\n selector: 'app-favorite-orientation',\n templateUrl: './favorite-orientation.component.html'\n})\nexport class FavoriteOrientationComponent implements OnInit {\n @Input() patient: Patient;\n @Input() orientation: Orientation;\n @Input() editMode = false;\n @Input() isVeterinarian = false;\n @Output() formEmitter = new EventEmitter<FormGroup>();\n\n orientations: string;\n showCardCid = false;\n form: FormGroup;\n\n constructor(private fb: FormBuilder) {\n this.form = this.fb.group({\n title: ['', Validators.required],\n titleOrientation: ['', Validators.required],\n text: ['', Validators.required],\n orientations: [''],\n version: ['BETA']\n });\n }\n\n ngOnInit() {\n if (this.orientation) {\n this.form.get('title').setValue(this.orientation.title);\n const value = this.orientation.orientations.reduce(\n (accumulator, currentValue) => accumulator + '\\n' + currentValue\n );\n this.form.get('text').setValue(value);\n this.form.get('orientations').setValue(this.orientation.orientations);\n\n if (this.hasCid(this.orientation.cid)) {\n this.showCardCid = true;\n }\n }\n\n this.form.get('text').valueChanges.subscribe((text: string) => {\n if (text && text.trim().length > 0) {\n const value = text.split('\\n');\n this.form.get('orientations').setValue(value);\n } else {\n if (this.form.get('text').value) {\n this.form.get('text').setValue(null);\n }\n }\n });\n this.formEmitter.emit(this.form);\n }\n\n @Input()\n set documentModel(orientationModel: any) {\n if (orientationModel) {\n this.form.patchValue(orientationModel);\n const value = orientationModel.orientations.reduce((acc, val) => acc + '\\n' + val);\n this.form.get('text').setValue(value);\n this.form.get('orientations').setValue(orientationModel.orientations);\n if (this.hasCid(orientationModel.cid)) {\n this.orientation = orientationModel;\n this.showCardCid = true;\n }\n }\n }\n\n handlerShowCardCid() {\n this.showCardCid = true;\n }\n\n hasCid(cid: CidItem) {\n return cid && cid.items && cid.items.length > 0;\n }\n}\n","export default \"<form [formGroup]=\\\"form\\\" theme>\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n <nz-form-label nzFor=\\\"titleOrientation\\\" style=\\\"display: flex;\\\">\\n TÃtulo Orientação<span class=\\\"mandatory\\\"> *</span>\\n </nz-form-label>\\n <input\\n id=\\\"titleOrientation\\\"\\n class=\\\"input-name\\\"\\n formControlName=\\\"titleOrientation\\\"\\n nz-input\\n placeholder=\\\"Digite o tÃtulo do documento\\\"\\n />\\n\\n <nz-form-label nzFor=\\\"material\\\" style=\\\"display: flex;\\\">\\n Escreva o conteúdo do documento<span class=\\\"mandatory\\\"> *</span>\\n </nz-form-label>\\n <textarea rows=\\\"4\\\" nz-input formControlName=\\\"text\\\" id=\\\"material\\\"></textarea>\\n\\n <app-cid-form\\n [form]=\\\"form\\\"\\n *ngIf=\\\"showCardCid\\\"\\n [authorizedByPatient]=\\\"orientation?.cid?.authorizedByPatient\\\"\\n [showDescription]=\\\"orientation?.cid?.showDescription\\\"\\n [items]=\\\"orientation?.cid?.items\\\"\\n (onClickRemoveCardCid)=\\\"showCardCid = false\\\"\\n ></app-cid-form>\\n</form>\\n\\n<app-add-type-options\\n *ngIf=\\\"!isVeterinarian\\\"\\n (onClickShowCardCID)=\\\"handlerShowCardCid()\\\"\\n></app-add-type-options>\\n\";","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\nimport { CidItem } from '@app/shared/models/CidItem';\nimport { AppToastService } from '@app/shared/services/app-toast.service';\nimport { TypeOfMedicament } from '@app/shared/types/types';\nimport _ from 'lodash';\n\ninterface PrescriptonModel {\n id: string;\n title: string;\n medicaments: any[];\n version: string;\n cid: CidItem;\n observation: string[];\n}\n\n@Component({\n selector: 'app-favorite-prescription',\n templateUrl: './favorite-prescription.component.html',\n styleUrls: ['./favorite-prescription.component.scss']\n})\nexport class FavoritePrescriptionComponent implements OnInit {\n @Output() formEmitter: EventEmitter<FormGroup> = new EventEmitter<FormGroup>();\n @Input() isVeterinarian = false;\n\n form: FormGroup;\n\n showCardObservation = false;\n showSearchMedicaments = false;\n showCardCid = false;\n\n prescriptionModel: PrescriptonModel;\n\n constructor(private fb: FormBuilder, private notification: AppToastService) {\n this.form = this.fb.group({\n title: ['', Validators.required],\n medicaments: this.fb.array([], Validators.required),\n version: ['BETA'],\n observation: ['']\n });\n }\n\n ngOnInit(): void {\n this.formEmitter.emit(this.form);\n }\n\n @Input()\n set documentModel(data: PrescriptonModel) {\n if (data) {\n this.prescriptionModel = data;\n if (this.hasCid()) {\n this.showCardCid = true;\n }\n if (this.hasObservation()) {\n this.showCardObservation = true;\n }\n this.form.patchValue(data);\n this.medicamentsFormArray.clear();\n data.medicaments.forEach(medicament => {\n const formGroup = this.formGroupMedicament(medicament.type);\n formGroup.patchValue(medicament);\n formGroup.get('search').setValue(false);\n this.medicamentsFormArray.push(formGroup);\n });\n }\n }\n\n hasCid() {\n return this.prescriptionModel.cid && this.prescriptionModel.cid.items.length > 0;\n }\n\n hasObservation() {\n return (\n this.prescriptionModel.observation &&\n this.prescriptionModel.observation.length > 0 &&\n this.prescriptionModel.observation.some(text => !_.isEmpty(text))\n );\n }\n\n get medicamentsFormArray(): FormArray {\n return this.form.get('medicaments') as FormArray;\n }\n\n handleSearchMedicament() {\n this.showSearchMedicaments = true;\n }\n\n addMedicament(type: TypeOfMedicament) {\n const formGroup = this.formGroupMedicament(type);\n this.medicamentsFormArray.push(formGroup);\n }\n\n selectMedicament(medicament: FormGroup, selectedMedicament: any) {\n medicament.get('name').setValue(selectedMedicament.nome);\n medicament.get('principle').setValue(selectedMedicament.principio);\n medicament.get('laboratory').setValue(selectedMedicament.laboratorio);\n medicament.get('ean').setValue(selectedMedicament.ean);\n medicament.get('description').setValue(selectedMedicament.apresentacaoCustomizada);\n medicament.get('prescribedQuantity').setValue(1);\n medicament.get('medicamentId').setValue(selectedMedicament.id);\n medicament.get('search').setValue(false);\n medicament.get('editing').setValue(false);\n medicament.get('unitOfMeasurement').setValue('PACKING');\n medicament.get('prescriptionTypeId').setValue(selectedMedicament.prescriptionTypeId);\n medicament.get('typeCr').setValue(selectedMedicament.typeCr);\n }\n\n handleAddMedicamentTextBox() {\n const formGroup = this.formGroupMedicament('free-text');\n this.medicamentsFormArray.push(formGroup);\n }\n\n deleteMedicament(index: number) {\n this.medicamentsFormArray.removeAt(index);\n }\n\n handleAddObservation() {\n if (this.showCardObservation) {\n this.notification.notify('warning', 'Componente já adicionado', '');\n return;\n }\n\n this.showCardObservation = true;\n this.form.addControl('observation', new FormControl('', Validators.required));\n }\n\n handleRemoveObservation() {\n this.showCardObservation = false;\n this.form.get('observation').setValue(null);\n }\n\n handlerShowCardCid() {\n this.showCardCid = true;\n }\n\n private formGroupMedicament(type: TypeOfMedicament) {\n return new FormGroup({\n name: new FormControl(),\n medicamentId: new FormControl(),\n dosage: new FormControl('', Validators.required),\n description: new FormControl(),\n principle: new FormControl(),\n laboratory: new FormControl(),\n ean: new FormControl(),\n prescribedQuantity: new FormControl(1),\n manipuled: new FormControl(type === 'free-text'),\n unitOfMeasurement: new FormControl('PACKING', Validators.required),\n type: new FormControl(type, Validators.required),\n search: new FormControl(type === 'industrialized'),\n editing: new FormControl(false),\n prescriptionTypeId: new FormControl(),\n typeCr: new FormControl()\n });\n }\n}\n","export default \"<form id=\\\"form-prescription\\\" [formGroup]=\\\"form\\\">\\n <app-input-title formControlName=\\\"title\\\"></app-input-title>\\n <ng-container formArrayName=\\\"medicaments\\\">\\n <ng-container\\n *ngFor=\\\"let medicamentFormGroup of medicamentsFormArray.controls; let i = index\\\"\\n [formGroup]=\\\"medicamentFormGroup\\\"\\n >\\n <div class=\\\"container-medicament \\\" *ngIf=\\\"medicamentFormGroup.value as medicament\\\">\\n <app-medicament-form\\n [form]=\\\"medicamentFormGroup\\\"\\n [signed]=\\\"signed\\\"\\n [index]=\\\"i\\\"\\n (onSelect)=\\\"selectMedicament(medicamentFormGroup, $event)\\\"\\n (onDelete)=\\\"deleteMedicament($event)\\\"\\n ></app-medicament-form>\\n </div>\\n </ng-container>\\n </ng-container>\\n\\n <app-text-box-form\\n *ngIf=\\\"showCardObservation\\\"\\n [form]=\\\"form\\\"\\n [text]=\\\"prescriptionModel?.observation?.join('\\\\n')\\\"\\n (onChangeText)=\\\"form.get('observation').setValue($event)\\\"\\n (onClickRemove)=\\\"handleRemoveObservation()\\\"\\n ></app-text-box-form>\\n\\n <app-cid-form\\n *ngIf=\\\"showCardCid\\\"\\n (formEmitter)=\\\"form = $event\\\"\\n (onClickRemoveCardCid)=\\\"showCardCid = !showCardCid\\\"\\n [authorizedByPatient]=\\\"prescriptionModel?.cid?.authorizedByPatient\\\"\\n [showDescription]=\\\"prescriptionModel?.cid?.showDescription\\\"\\n [items]=\\\"prescriptionModel?.cid?.items\\\"\\n [form]=\\\"form\\\"\\n ></app-cid-form>\\n</form>\\n\\n<app-add-type-options\\n (onClickAddIndustrialized)=\\\"addMedicament('industrialized')\\\"\\n (onClickAddMedicamentFreeText)=\\\"addMedicament('free-text')\\\"\\n (onClickAddTextBox)=\\\"handleAddObservation()\\\"\\n (onClickShowCardCID)=\\\"handlerShowCardCid()\\\"\\n [viewIndutrialized]=\\\"true\\\"\\n [viewMedicmanetFreeText]=\\\"true\\\"\\n [viewTextBox]=\\\"true\\\"\\n [viewShowCardCID]=\\\"!isVeterinarian\\\"\\n></app-add-type-options>\\n\";","export default \"#form-prescription .container-obtervation .header-card-observation {\\n display: flex;\\n align-items: center;\\n justify-content: flex-end;\\n}\\n#form-prescription .container-obtervation .textNameInput {\\n background-color: transparent;\\n border-color: transparent;\\n padding: 0;\\n color: #585858 !important;\\n}\\n#form-prescription .container-obtervation .textNameInput::-moz-placeholder {\\n color: #f6b4af;\\n}\\n#form-prescription .container-obtervation .textNameInput::placeholder, #form-prescription .container-obtervation .textNameInput {\\n color: #f6b4af;\\n}\\n#form-prescription .container-obtervation .textNameInput {\\n font-size: 15px;\\n font-weight: 600;\\n}\\n@media (max-width: 1025px) {\\n #form-prescription .container-obtervation .textNameInput {\\n font-size: 12px;\\n }\\n}\\n#form-prescription .container-obtervation textarea {\\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#form-prescription .container-obtervation textarea:hover, #form-prescription .container-obtervation textarea:focus {\\n border-color: transparent;\\n box-shadow: none;\\n}\\n#form-prescription .container-medicament .header-card-medicament {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n}\\n#form-prescription .container-medicament .header-card-medicament .header-card-title {\\n flex: 1;\\n font-size: 14px;\\n font-weight: 700;\\n color: var(--bg-color-primary);\\n}\\n#form-prescription .container-medicament .card-medicament-body .activePrinciples {\\n font-family: \\\"prolight\\\", sans-serif;\\n font-size: 13px;\\n color: #4d4d4d;\\n margin: 14px 0;\\n}\\n#form-prescription .container-medicament .card-medicament-body .posologyNameInput {\\n background-color: transparent;\\n padding: 0;\\n color: #585858 !important;\\n}\\n#form-prescription .container-medicament .card-medicament-body .posologyNameInput:focus {\\n border-color: transparent !important;\\n}\\n#form-prescription .container-medicament .card-medicament-body .posologyNameInput::-moz-placeholder {\\n color: #f6b4af;\\n}\\n#form-prescription .container-medicament .card-medicament-body .posologyNameInput::placeholder, #form-prescription .container-medicament .card-medicament-body .posologyNameInput {\\n color: #f6b4af;\\n}\\n#form-prescription .container-medicament .card-medicament-body .posologyNameInput {\\n font-size: 15px;\\n font-weight: 600;\\n}\\n#form-prescription .container-medicament .card-medicament-footer label {\\n margin-left: 10px;\\n margin-bottom: 0;\\n font-weight: 600;\\n font-size: 12px;\\n}\\n#form-prescription .container-medicament .card-medicament-footer span {\\n cursor: pointer;\\n}\\n#form-prescription .container-medicament .card-medicament-footer .minus,\\n#form-prescription .container-medicament .card-medicament-footer .plus {\\n width: 24px;\\n height: 24px;\\n background: #f2f2f2;\\n padding: 8px 5px 8px 5px;\\n display: inline-block;\\n vertical-align: middle;\\n text-align: center;\\n position: relative;\\n background-color: #0b6054;\\n color: white;\\n}\\n#form-prescription .container-medicament .card-medicament-footer .minus i,\\n#form-prescription .container-medicament .card-medicament-footer .plus i {\\n position: absolute;\\n top: 0;\\n left: 0;\\n}\\n#form-prescription .container-medicament .card-medicament-footer .minus {\\n border-radius: 4px 0 0 4px;\\n}\\n#form-prescription .container-medicament .card-medicament-footer .plus {\\n border-radius: 0 4px 4px 0;\\n}\\n#form-prescription .container-medicament .card-medicament-footer input {\\n height: 24px;\\n width: 35px;\\n text-align: center;\\n font-size: 18px;\\n border: 1px solid #ddd;\\n display: inline-block;\\n vertical-align: middle;\\n font-weight: 600;\\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}\\ntextarea:hover, textarea:focus {\\n border-color: transparent;\\n box-shadow: none;\\n}\";","import { Injectable } from '@angular/core';\nimport { typeOfDocuments, VERSION } from '@app/shared/types/types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FavoriteModelsStateService {\n private _documentType: typeOfDocuments = 'prescription';\n private _version: VERSION = 'PRODUCTION';\n\n constructor() {}\n\n set documentType(type: typeOfDocuments) {\n this._documentType = type;\n }\n\n get documentType() {\n return this._documentType;\n }\n\n set version(version: VERSION) {\n this._version = version;\n }\n\n get version() {\n return this._version;\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, HostListener, OnInit } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { AuthService } from '@app/core/services/auth.service';\nimport { CoreService } from '@app/core/services/core.service';\nimport { AttestationModelService } from '@app/modules/document/services/attestation-model.service';\nimport { ExamModelService } from '@app/modules/document/services/exam-model.service';\nimport { OrientationModelService } from '@app/modules/document/services/orientation-model.service';\nimport { PrescriptionModelService } from '@app/modules/document/services/prescription-model.service';\nimport { HealthProfessional } from '@app/shared/models';\nimport { User } from '@app/shared/models/decodedLoginToken';\nimport { AppToastService } from '@app/shared/services/app-toast.service';\nimport { markFormGroup } from '@app/utils/markFormGroup';\nimport { NzModalService } from 'ng-zorro-antd/modal';\nimport { VERSION, typeOfDocuments } from '../../../../shared/types/types';\nimport { FavoriteModelsStateService } from '../../shared/favorite-models-state.service';\nimport { nativeAsync } from '@app/shared/decorators/nativeAsync';\n\n@Component({\n selector: 'app-favorite-models',\n templateUrl: './favorite-models.component.html',\n styleUrls: ['./favorite-models.component.scss']\n})\nexport class FavoriteModelsComponent implements OnInit {\n readonly HTTP_STATUS_CONFLICT = 409;\n\n loading: boolean;\n modelId: string;\n newDocument = false;\n selectedDocumentModel: any;\n documentsFavorites: any[] = [];\n documentsFavoritesFilter: any[] = [];\n documentForm: FormGroup;\n descriptionTypeDocument = {\n prescription: 'Prescrição',\n exam: 'Exame',\n attestation: 'Atestado',\n orientation: 'Outros documentos'\n };\n prescriber: HealthProfessional;\n isMobile = false;\n\n constructor(\n public favoriteModelState: FavoriteModelsStateService,\n private router: Router,\n private activateRouter: ActivatedRoute,\n public authService: AuthService,\n private prescriptionModelService: PrescriptionModelService,\n private attestationModelService: AttestationModelService,\n private examModelService: ExamModelService,\n private orientationModelService: OrientationModelService,\n private modalService: NzModalService,\n private notification: AppToastService,\n private coreService: CoreService\n ) {\n this.onResize();\n }\n\n @HostListener('window:resize')\n onResize() {\n this.isMobile = this.coreService.isViewPortMobile();\n }\n\n ngOnInit() {\n if (this.isVeterinarian || this.authService.hasAccessNewModulePrescription) {\n this.favoriteModelState.version = 'BETA';\n }\n this.getListDocumentsTemplates();\n this.activateRouter.paramMap.subscribe(async params => {\n this.modelId = params.get('modelId');\n if (this.modelId) {\n this.loading = true;\n this.favoriteModelState.documentType = this.activateRouter.snapshot.params.documentType;\n this.selectedDocumentModel = await this.getDocumentModel();\n this.favoriteModelState.version = this.selectedDocumentModel.version;\n this.getListDocumentsTemplates();\n this.loading = false;\n }\n });\n }\n\n get user(): User {\n return this.authService.user();\n }\n\n get isVeterinarian(): boolean {\n return Boolean(this.activateRouter.snapshot.data['isVeterinarian']);\n }\n\n private getDocumentModel() {\n switch (this.favoriteModelState.documentType) {\n case 'prescription':\n return this.prescriptionModelService.getById(this.modelId);\n case 'exam':\n return this.examModelService.getById(this.modelId);\n case 'attestation':\n return this.attestationModelService.getById(this.modelId);\n case 'orientation':\n return this.orientationModelService.getById(this.modelId);\n }\n }\n\n @nativeAsync\n async getListDocumentsTemplates() {\n this.loading = true;\n switch (this.favoriteModelState.documentType) {\n case 'prescription':\n this.documentsFavorites = await this.prescriptionModelService.getListByPrescriberId(\n this.user._id\n );\n break;\n case 'exam':\n this.documentsFavorites = await this.examModelService.getListByPrescriberId(this.user._id);\n break;\n case 'attestation':\n this.documentsFavorites = await this.attestationModelService.getListByPrescriberId(\n this.user._id\n );\n break;\n case 'orientation':\n this.documentsFavorites = await this.orientationModelService.getListByPrescriberId(\n this.user._id\n );\n break;\n }\n this.documentsFavorites = this.documentsFavorites.filter(\n documentTemplate => documentTemplate.version === this.favoriteModelState.version\n );\n this.documentsFavoritesFilter = this.documentsFavorites;\n this.loading = false;\n }\n\n changeDocumentType(documentType: typeOfDocuments) {\n this.favoriteModelState.documentType = documentType;\n this.selectedDocumentModel = null;\n if (!this.modelId) {\n this.getListDocumentsTemplates();\n } else {\n this.router.navigate(['/favorites']);\n }\n }\n\n onChangeVersion(version: VERSION) {\n this.favoriteModelState.version = version;\n if (!this.modelId) {\n this.getListDocumentsTemplates();\n } else {\n this.router.navigate(['/favorites']);\n }\n }\n\n saveFavoriteModel() {\n markFormGroup(this.documentForm);\n if (this.documentForm.valid) {\n this.loading = true;\n const payload = this.documentForm.value;\n payload.prescriber = this.user._id;\n payload.cid = this.cid;\n switch (this.favoriteModelState.documentType) {\n case 'prescription':\n this.prescriptionModelService\n .create(payload, this.user._id)\n .then(() => this.onSuccessCreateFavorite())\n .catch(error => this.onFailureCreateFavorite(error));\n break;\n case 'exam':\n this.examModelService\n .create({\n ...payload\n })\n .then(() => this.onSuccessCreateFavorite())\n .catch(error => this.onFailureCreateFavorite(error));\n break;\n case 'attestation':\n this.attestationModelService\n .create(payload)\n .then(() => this.onSuccessCreateFavorite())\n .catch(error => this.onFailureCreateFavorite(error));\n break;\n case 'orientation':\n this.orientationModelService\n .create(payload)\n .then(() => this.onSuccessCreateFavorite())\n .catch(error => this.onFailureCreateFavorite(error));\n break;\n }\n } else {\n const msg = this.getFormError();\n this.notification.notify('warning', 'Aviso', msg);\n }\n }\n onSuccessCreateFavorite() {\n this.notification.notify('success', 'Sucesso', 'Modelo cadastrado com sucesso');\n this.documentForm = undefined;\n this.newDocument = false;\n this.loading = false;\n this.getListDocumentsTemplates();\n }\n onFailureCreateFavorite(error: HttpErrorResponse) {\n this.loading = false;\n if (error.status === this.HTTP_STATUS_CONFLICT) {\n this.notification.notify(\n 'warning',\n 'Atenção',\n 'Já existe um modelo com este tÃtulo. Digite outro tÃtulo'\n );\n } else {\n this.notification.notify('warning', 'Error', 'Ocorreu um error ao tentar cadastrado modelo.');\n }\n }\n newFavoriteModel() {\n this.newDocument = true;\n }\n\n editModel({ document, _id: id }) {\n this.router.navigate(['/favorites', document, id]);\n }\n\n cancelEdit() {\n this.newDocument = false;\n this.router.navigate(['/favorites']);\n }\n private getFormError(): string {\n switch (this.favoriteModelState.documentType) {\n case 'prescription':\n return 'Preencha o TÃtulo para concluir o cadastro do modelo';\n case 'exam':\n return 'Selecione um material e um exame para cada material e preencha todos os campos obrigatórios.';\n default:\n return 'Preencha os campos obrigatórios';\n }\n }\n\n @nativeAsync\n async updateDocumentModel(modelId: string) {\n markFormGroup(this.documentForm);\n if (this.documentForm.valid) {\n const model = this.documentForm.value;\n this.loading = true;\n const documentType = this.favoriteModelState.documentType;\n model.cid = this.cid;\n try {\n switch (documentType) {\n case 'orientation':\n await this.orientationModelService.update(model, modelId);\n break;\n case 'attestation':\n await this.attestationModelService.update(model, modelId);\n break;\n case 'exam':\n await this.examModelService.update(model, modelId);\n break;\n default:\n await this.prescriptionModelService.update(model, modelId);\n }\n this.loading = false;\n this.notification.notify('success', 'Sucesso', 'Modelo salvo com sucesso');\n this.router.navigate(['/favorites']);\n } catch (err) {\n console.error(err);\n this.notification.notify('error', 'Aviso', 'Erro ao atualizar modelo');\n }\n } else {\n this.notification.notify('warning', 'Aviso', 'Campo(s) obrigatório(s) não preenchidos');\n }\n }\n deleteEditModel(modelId: string) {\n this.modalService.confirm({\n nzTitle: 'Atenção',\n nzContent: `<p>Tem certeza que deseja excluir este modelo de ${\n this.descriptionTypeDocument[this.favoriteModelState.documentType]\n } da sua lista?</p>`,\n nzOnOk: async () => {\n try {\n this.loading = true;\n await this.deleteDocumentModel(modelId);\n this.notification.notify('success', 'Sucesso', 'Modelo excluÃdo com sucesso');\n this.router.navigate(['/favorites']);\n } catch (err) {\n this.notification.notify('warning', 'Aviso', 'Não foi possÃvel excluir este item');\n } finally {\n this.loading = false;\n }\n },\n nzOnCancel: () => {}\n });\n }\n\n @nativeAsync\n private async deleteDocumentModel(modelId: string) {\n switch (this.favoriteModelState.documentType) {\n case 'prescription':\n await this.prescriptionModelService.deleteById(modelId);\n break;\n case 'exam':\n await this.examModelService.deleteById(modelId);\n break;\n case 'attestation':\n await this.attestationModelService.deleteById(modelId);\n break;\n case 'orientation':\n await this.orientationModelService.deleteById(modelId);\n break;\n }\n }\n filterFavoriteModel(search: string) {\n this.documentsFavoritesFilter = this.documentsFavorites.filter(item =>\n new RegExp(search, 'i').test(item.title)\n );\n }\n\n get cid() {\n if (this.documentForm.get('cid') && this.documentForm.get('cid').value) {\n const cidValues = this.documentForm.get('cid').value;\n return {\n ...cidValues,\n items: cidValues.items.map(item => item.id)\n };\n }\n return null;\n }\n}\n","export default \"<app-alternative-navbar title=\\\"Meu Painel\\\" titleIcon=\\\"fa-view-compact\\\"> </app-alternative-navbar>\\n<app-sidebar-menu></app-sidebar-menu>\\n<div class=\\\"d-flex main-container\\\" theme [ngClass]=\\\"{ 'flex-column': isMobile }\\\">\\n <aside class=\\\"filters-menu patient\\\" *ngIf=\\\"!isMobile; else templateMobile\\\">\\n <div class=\\\"favorite-prescription-select\\\">\\n <div class=\\\"favorite-prescription-title\\\">\\n <h4>\\n Exibir\\n </h4>\\n <select\\n *ngIf=\\\"!isVeterinarian && !authService.hasAccessNewModulePrescription\\\"\\n style=\\\"margin-right: 5px; margin-top: -5px;\\\"\\n [(ngModel)]=\\\"favoriteModelState.version\\\"\\n (change)=\\\"onChangeVersion($event.target.value)\\\"\\n >\\n <option value=\\\"PRODUCTION\\\">Estável</option>\\n <option value=\\\"BETA\\\">Beta</option>\\n </select>\\n </div>\\n <div>\\n <div class=\\\"form-check d-flex flex-row\\\">\\n <input\\n class=\\\"form-check-input favorite-radio-input\\\"\\n type=\\\"radio\\\"\\n [checked]=\\\"favoriteModelState?.documentType === 'prescription'\\\"\\n (click)=\\\"changeDocumentType('prescription')\\\"\\n name=\\\"filter\\\"\\n id=\\\"Receita\\\"\\n />\\n <label class=\\\"form-check-label favorite-radio-label\\\" for=\\\"Receita\\\">\\n Receita\\n </label>\\n </div>\\n <div class=\\\"form-check d-flex flex-row\\\">\\n <input\\n class=\\\"form-check-input favorite-radio-input\\\"\\n type=\\\"radio\\\"\\n name=\\\"filter\\\"\\n [checked]=\\\"favoriteModelState?.documentType === 'exam'\\\"\\n (click)=\\\"changeDocumentType('exam')\\\"\\n id=\\\"Exames\\\"\\n />\\n <label class=\\\"form-check-label favorite-radio-label\\\" for=\\\"Exames\\\">\\n Exames\\n </label>\\n </div>\\n <div class=\\\"form-check d-flex flex-row\\\">\\n <input\\n class=\\\"form-check-input favorite-radio-input\\\"\\n type=\\\"radio\\\"\\n name=\\\"filter\\\"\\n [checked]=\\\"favoriteModelState?.documentType === 'attestation'\\\"\\n (click)=\\\"changeDocumentType('attestation')\\\"\\n id=\\\"Atestados\\\"\\n />\\n <label class=\\\"form-check-label favorite-radio-label\\\" for=\\\"Atestados\\\">\\n Atestados\\n </label>\\n </div>\\n <div class=\\\"form-check d-flex flex-row\\\">\\n <input\\n class=\\\"form-check-input favorite-radio-input\\\"\\n type=\\\"radio\\\"\\n name=\\\"filter\\\"\\n [checked]=\\\"favoriteModelState?.documentType === 'orientation'\\\"\\n (click)=\\\"changeDocumentType('orientation')\\\"\\n id=\\\"Outros\\\"\\n />\\n <label class=\\\"form-check-label favorite-radio-label\\\" for=\\\"Outros\\\">\\n Outros Documentos\\n </label>\\n </div>\\n </div>\\n </div>\\n <div class=\\\"list-documents\\\">\\n <div class=\\\"content-input\\\">\\n <i class=\\\"fas fa-search\\\"></i>\\n <input\\n class=\\\"input-name\\\"\\n maxlength=\\\"128\\\"\\n nz-input\\n (input)=\\\"filterFavoriteModel($event.target.value)\\\"\\n placeholder=\\\"Pesquisar\\\"\\n />\\n </div>\\n <ol\\n style=\\\" height: calc(100vh - 370px);\\n overflow: auto;\\\"\\n >\\n <li\\n *ngFor=\\\"let docTemplate of documentsFavoritesFilter\\\"\\n (click)=\\\"editModel(docTemplate)\\\"\\n class=\\\"content-list\\\"\\n [ngClass]=\\\"{ 'active-editing': docTemplate._id === modelId }\\\"\\n >\\n <div class=\\\"icon-list\\\"></div>\\n {{ docTemplate.title }}\\n </li>\\n </ol>\\n </div>\\n </aside>\\n <ng-template #templateMobile>\\n <nz-tabset>\\n <nz-tab (nzClick)=\\\"changeDocumentType('prescription')\\\" nzTitle=\\\"Receitas\\\"></nz-tab>\\n <nz-tab (nzClick)=\\\"changeDocumentType('exam')\\\" nzTitle=\\\"Exames\\\"></nz-tab>\\n <nz-tab (nzClick)=\\\"changeDocumentType('attestation')\\\" nzTitle=\\\"Atestados\\\"></nz-tab>\\n <nz-tab (nzClick)=\\\"changeDocumentType('orientation')\\\" nzTitle=\\\"Outros documentos\\\"></nz-tab>\\n </nz-tabset>\\n\\n <div class=\\\"select-type-container-mobile\\\" *ngIf=\\\"!isVeterinarian\\\">\\n <nz-button-group>\\n <button\\n (click)=\\\"onChangeVersion('PRODUCTION')\\\"\\n nz-button\\n [nzType]=\\\"favoriteModelState.version === 'PRODUCTION' ? 'primary' : 'default'\\\"\\n >\\n Estável\\n </button>\\n <button\\n (click)=\\\"onChangeVersion('BETA')\\\"\\n nz-button\\n [nzType]=\\\"favoriteModelState.version === 'BETA' ? 'primary' : 'default'\\\"\\n >\\n Beta\\n </button>\\n </nz-button-group>\\n </div>\\n <div class=\\\"card mt-2 mb-2 ml-3 mr-3\\\">\\n <div class=\\\"content-input\\\">\\n <input\\n class=\\\"input-name\\\"\\n maxlength=\\\"128\\\"\\n nz-input\\n (input)=\\\"filterFavoriteModel($event.target.value)\\\"\\n placeholder=\\\"Pesquisar\\\"\\n />\\n </div>\\n <ol style=\\\"max-height: 100px;overflow: auto;padding-left: 16px;\\\">\\n <li\\n *ngFor=\\\"let docTemplate of documentsFavoritesFilter\\\"\\n (click)=\\\"editModel(docTemplate)\\\"\\n class=\\\"content-list\\\"\\n [ngClass]=\\\"{ 'active-editing': docTemplate._id === modelId }\\\"\\n style=\\\"display: flex; align-items: center;\\\"\\n >\\n <div class=\\\"icon-list\\\"></div>\\n {{ docTemplate.title }}\\n </li>\\n </ol>\\n </div>\\n </ng-template>\\n\\n <section class=\\\"p-3\\\" *ngIf=\\\"!loading\\\">\\n <div class=\\\"empty-container\\\" *ngIf=\\\"!modelId && !newDocument; else templateForm\\\">\\n <button\\n class=\\\"btn btn-icon btn-new-model text-capitalize\\\"\\n (click)=\\\"newFavoriteModel()\\\"\\n type=\\\"button\\\"\\n >\\n <span class=\\\"btn-inner--text\\\">Novo Modelo</span>\\n <span class=\\\"btn-new-model-icon\\\"><i class=\\\"fa fa-plus\\\"></i></span>\\n </button>\\n <div class=\\\"container-mensage\\\">\\n <h4 class=\\\"model-text\\\">\\n Clique nos seus modelos para exibir, ou cadastre um novo modelo para começar!\\n </h4>\\n </div>\\n </div>\\n </section>\\n <ng-template #templateForm>\\n <div *ngIf=\\\"!loading\\\">\\n <h5>{{ descriptionTypeDocument[favoriteModelState?.documentType] }}</h5>\\n <div\\n class=\\\"bottom-item\\\"\\n *ngIf=\\\"favoriteModelState && favoriteModelState?.version === 'PRODUCTION'; else templateBeta\\\"\\n >\\n <app-prescription\\n *ngIf=\\\"favoriteModelState?.documentType === 'prescription'\\\"\\n [editMode]=\\\"!!modelId\\\"\\n [prescriptionModel]=\\\"selectedDocumentModel\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n ></app-prescription>\\n\\n <app-exam\\n *ngIf=\\\"favoriteModelState?.documentType === 'exam'\\\"\\n [examModel]=\\\"selectedDocumentModel\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n ></app-exam>\\n\\n <app-attestation\\n *ngIf=\\\"favoriteModelState?.documentType === 'attestation'\\\"\\n [attestationModel]=\\\"selectedDocumentModel\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n ></app-attestation>\\n\\n <app-orientation\\n *ngIf=\\\"favoriteModelState?.documentType === 'orientation'\\\"\\n [orientationModel]=\\\"selectedDocumentModel\\\"\\n [editMode]=\\\"!!modelId\\\"\\n [patient]=\\\"patient\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n ></app-orientation>\\n </div>\\n <ng-template #templateBeta>\\n <app-favorite-prescription\\n *ngIf=\\\"favoriteModelState?.documentType === 'prescription'\\\"\\n [documentModel]=\\\"selectedDocumentModel\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n [isVeterinarian]=\\\"isVeterinarian\\\"\\n ></app-favorite-prescription>\\n <app-favorite-exam\\n *ngIf=\\\"favoriteModelState?.documentType === 'exam'\\\"\\n [documentModel]=\\\"selectedDocumentModel\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n [isVeterinarian]=\\\"isVeterinarian\\\"\\n ></app-favorite-exam>\\n <app-favorite-attestation\\n *ngIf=\\\"favoriteModelState?.documentType === 'attestation'\\\"\\n [documentModel]=\\\"selectedDocumentModel\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n [isVeterinarian]=\\\"isVeterinarian\\\"\\n ></app-favorite-attestation>\\n <app-favorite-orientation\\n *ngIf=\\\"favoriteModelState?.documentType === 'orientation'\\\"\\n [documentModel]=\\\"selectedDocumentModel\\\"\\n (formEmitter)=\\\"documentForm = $event\\\"\\n [isVeterinarian]=\\\"isVeterinarian\\\"\\n ></app-favorite-orientation>\\n </ng-template>\\n <div class=\\\"favorite-models-actions\\\">\\n <div class=\\\"container\\\">\\n <app-rd-buttom-group-icon\\n *ngIf=\\\"modelId || newDocument\\\"\\n label=\\\"Salvar\\\"\\n icon=\\\"far fa-check\\\"\\n (onClick)=\\\"!modelId ? saveFavoriteModel() : updateDocumentModel(modelId)\\\"\\n ></app-rd-buttom-group-icon>\\n\\n <app-rd-buttom-group-icon\\n *ngIf=\\\"modelId || newDocument\\\"\\n label=\\\"Cancelar\\\"\\n icon=\\\"far fa-times\\\"\\n (onClick)=\\\"cancelEdit()\\\"\\n ></app-rd-buttom-group-icon>\\n\\n <app-rd-buttom-group-icon\\n *ngIf=\\\"modelId\\\"\\n label=\\\"Excluir Modelo\\\"\\n icon=\\\"far fa-trash\\\"\\n (onClick)=\\\"deleteEditModel(modelId)\\\"\\n ></app-rd-buttom-group-icon>\\n </div>\\n </div>\\n </div>\\n </ng-template>\\n</div>\\n<div class=\\\"footer d-flex fixed-bottom flex-fill justify-content-end\\\">\\n <a class=\\\"mr-3 helpContainer\\\" href=\\\"https://ajuda.receitadigital.com\\\"\\n ><i class=\\\"fa fa-comments mr-1\\\"></i>Fale Conosco.</a\\n >\\n</div>\\n\\n<ngx-loading\\n [show]=\\\"loading || !favoriteModelState\\\"\\n [config]=\\\"{ backdropBorderRadius: '3px' }\\\"\\n></ngx-loading>\\n\";","export default \".filters-menu {\\n height: calc(100vh - 130px);\\n}\\n\\n.content-input {\\n display: flex;\\n flex-direction: row;\\n justify-content: center;\\n align-items: center;\\n margin-top: 5px;\\n margin-bottom: 20px;\\n}\\n\\n.content-input .input-name {\\n width: calc(100% - 50px);\\n text-align: center;\\n background-color: transparent;\\n border-color: transparent;\\n font-family: sans-serif;\\n color: #4d4d4d !important;\\n opacity: 0.3;\\n font-size: 18px;\\n height: auto;\\n border-radius: 0;\\n border-bottom: 1px solid #000;\\n}\\n\\n.content-input .input-name::-moz-placeholder {\\n color: #707070;\\n}\\n\\n.content-input .input-name::placeholder, .content-input .input-name {\\n color: #707070;\\n}\\n\\n.content-input .input-name:hover {\\n border-bottom: 1px dashed #4d4d4d;\\n}\\n\\n.content-input .input-name:focus {\\n border-bottom: 1px dashed #4d4d4d;\\n box-shadow: none;\\n}\\n\\n.content-input .fa-search {\\n position: absolute;\\n margin-right: 130px;\\n margin-bottom: 3px;\\n}\\n\\n.btn-add {\\n display: flex;\\n padding: 0 0 0 1.25rem;\\n margin: 50;\\n height: 40px;\\n align-items: center;\\n border-radius: 10px;\\n overflow: hidden;\\n border: 0;\\n font-family: \\\"probold\\\", sans-serif;\\n background-color: var(--bg-color-secondary);\\n}\\n\\n.btn-add .btn-inner--icon {\\n background-color: var(--bg-color-primary);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 40px;\\n width: 50px;\\n}\\n\\n.form-check {\\n margin-left: 20px;\\n margin-top: 1px;\\n margin-bottom: 1px;\\n align-items: center;\\n justify-content: left;\\n}\\n\\n.favorite-prescription-title {\\n margin-left: 15px;\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n}\\n\\n.favorite-radio-label {\\n font-size: 17px;\\n font-family: sans-serif;\\n color: #919b99;\\n}\\n\\n.favorite-prescription-select {\\n background-color: #ebebeb;\\n padding-bottom: 20px;\\n}\\n\\nsection {\\n width: 100%;\\n height: calc(100vh - 130px);\\n overflow: auto;\\n}\\n\\naside {\\n flex: 0 0 210px;\\n width: 210px;\\n position: inherit;\\n background-color: #fafafa;\\n}\\n\\n@media (max-width: 700px) {\\n aside {\\n display: none;\\n }\\n}\\n\\n@media (max-width: 430px) {\\n aside {\\n flex: 0 0 160px;\\n width: 160px;\\n }\\n}\\n\\naside .list-doc-template {\\n top: 20px;\\n overflow: scroll;\\n}\\n\\naside ol {\\n margin: 20px 0 0 0;\\n padding: 0 0 0 20px;\\n list-style-type: none;\\n overflow-y: auto;\\n height: 340px;\\n}\\n\\naside ol li {\\n display: flex;\\n flex-direction: row;\\n align-items: center;\\n margin-bottom: 10px;\\n color: #4d4d4d !important;\\n opacity: 0.9;\\n cursor: pointer;\\n}\\n\\naside ol li:hover {\\n background-color: #efeded;\\n}\\n\\naside ol li div {\\n width: 19px !important;\\n height: 14px !important;\\n background: #4d4d4d 0% 0% no-repeat padding-box;\\n opacity: 0.8;\\n border-radius: 0px 10px 10px 0px;\\n}\\n\\naside ol li span {\\n margin-left: 15px;\\n}\\n\\naside ol::-webkit-scrollbar {\\n width: 7px;\\n}\\n\\naside ol::-webkit-scrollbar-thumb {\\n background-color: #c7c7c7;\\n border-radius: 10px;\\n}\\n\\n.icon-list {\\n margin-right: 7px;\\n top: 336px;\\n left: 23px;\\n border-radius: 15px 30px 30px 15px;\\n width: 19px;\\n height: 14px;\\n background: var(--unnamed-color-4d4d4d) 0% 0% no-repeat padding-box;\\n background: #4d4d4d 0% 0% no-repeat padding-box;\\n opacity: 0.8;\\n}\\n\\n.container-form-document {\\n width: 100%;\\n max-width: calc(100% - 50px);\\n margin: 0 auto;\\n}\\n\\n.empty-container {\\n display: flex;\\n flex-direction: column;\\n align-items: flex-start;\\n}\\n\\n.empty-container .btn-new-model {\\n display: flex;\\n padding: 0 0 0 8px;\\n height: 40px;\\n justify-content: space-between;\\n align-items: center;\\n border-radius: 10px;\\n overflow: hidden;\\n border: 0;\\n font-family: \\\"probold\\\", sans-serif;\\n background-color: var(--bg-color-secondary);\\n color: var(--color-white);\\n}\\n\\n.empty-container .btn-new-model .btn-new-model-icon {\\n background-color: var(--bg-color-primary);\\n color: var(--color-white);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n height: 40px;\\n width: 50px;\\n font-size: 20px;\\n}\\n\\n.empty-container .container-mensage {\\n width: 100%;\\n height: calc(100vh - 202px);\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.active-editing {\\n background-color: #efeded;\\n}\\n\\n.favorite-models-actions {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n padding: 15px;\\n}\\n\\n.favorite-models-actions .container {\\n display: flex;\\n justify-content: space-evenly;\\n width: 100%;\\n max-width: 500px;\\n}\\n\\n.select-type-container-mobile {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n margin-bottom: 12px;\\n}\";","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { FavoriteModelsComponent } from './pages/favorite-models/favorite-models.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: FavoriteModelsComponent,\n data: {\n documentType: 'prescription'\n }\n },\n {\n path: ':documentType/:modelId',\n component: FavoriteModelsComponent,\n data: {\n documentType: 'prescription'\n }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class FavoriteModelsRoutingModule {}\n","import { Component, forwardRef, Input, Provider } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nconst INPUT_FIELD_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputTitleComponent),\n multi: true\n};\n\n@Component({\n selector: 'app-input-title',\n templateUrl: './input-title.component.html',\n styleUrls: ['./input-title.component.scss'],\n providers: [INPUT_FIELD_VALUE_ACCESSOR]\n})\nexport class InputTitleComponent implements ControlValueAccessor {\n @Input() id: String;\n @Input() label: String;\n\n private innerValue: any;\n\n get value() {\n return this.innerValue;\n }\n\n set value(v: any) {\n if (v !== this.innerValue) {\n this.innerValue = v;\n this.onChangeCb(v);\n }\n }\n\n onChangeCb: (_: any) => void = () => {};\n onTouchedCb: (_: any) => void = () => {};\n\n writeValue(v: any): void {\n this.value = v;\n }\n registerOnChange(fn: any): void {\n this.onChangeCb = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouchedCb = fn;\n }\n}\n","export default \"<div class=\\\"content-input\\\">\\n <nz-form-label nzFor=\\\"title\\\" style=\\\"display: flex;\\\">\\n TÃtulo<span class=\\\"mandatory\\\"> *</span>\\n </nz-form-label>\\n <input\\n id=\\\"title\\\"\\n class=\\\"input-name\\\"\\n focus=\\\"true\\\"\\n maxlength=\\\"128\\\"\\n placeholder=\\\"Digite um nome ou número\\\"\\n [(ngModel)]=\\\"value\\\"\\n />\\n</div>\\n\";","export default \".content-input {\\n display: flex;\\n flex-direction: column;\\n margin-bottom: 20px;\\n}\\n.content-input .input-name {\\n font-size: 25px;\\n outline: inherit;\\n border-left: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: solid 1px #ebebeb;\\n}\\n.content-input .input-name::-moz-placeholder {\\n font-size: 15px !important;\\n}\\n.content-input .input-name::placeholder {\\n font-size: 15px !important;\\n}\";","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SharedModule } from '@app/shared';\nimport { NzTabsModule } from 'ng-zorro-antd';\nimport { ModalModule } from 'ngx-bootstrap/modal';\nimport { NgxLoadingModule } from 'ngx-loading';\nimport { AttestationComponent } from './components/v1/attestation/attestation.component';\nimport { ExamComponent } from './components/v1/exam/exam.component';\nimport { OrientationComponent } from './components/v1/orientation/orientation.component';\nimport { PrescriptionComponent } from './components/v1/prescription/prescription.component';\nimport { FavoriteAttestationComponent } from './components/v2/favorite-attestation/favorite-attestation.component';\nimport { FavoriteExamComponent } from './components/v2/favorite-exam/favorite-exam.component';\nimport { FavoriteOrientationComponent } from './components/v2/favorite-orientation/favorite-orientation.component';\nimport { FavoritePrescriptionComponent } from './components/v2/favorite-prescription/favorite-prescription.component';\nimport { FavoriteModelsRoutingModule } from './favorite-models-routing.module';\nimport { FavoriteModelsComponent } from './pages/favorite-models/favorite-models.component';\nimport { InputTitleComponent } from './components/shared/input-title/input-title.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FavoriteModelsRoutingModule,\n SharedModule,\n NgxLoadingModule.forRoot({}),\n ModalModule.forRoot(),\n NzTabsModule\n ],\n declarations: [\n PrescriptionComponent,\n OrientationComponent,\n ExamComponent,\n AttestationComponent,\n\n FavoriteModelsComponent,\n FavoritePrescriptionComponent,\n FavoriteExamComponent,\n FavoriteAttestationComponent,\n FavoriteOrientationComponent,\n InputTitleComponent\n ]\n})\nexport class FavoriteModelsModule {}\n"]}