UNPKG

@icure/cardinal-prescription-be-angular

Version:

This is a Belgian-specific Angular application for healthcare professionals to manage electronic prescriptions with SAM. Created by iCure.

73 lines (72 loc) 3.51 kB
import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef, SimpleChanges, OnChanges } from '@angular/core'; import { NonNullableFormBuilder, FormGroup } from '@angular/forms'; import { SamText } from '@icure/cardinal-be-sam-sdk'; import { PharmacistVisibilityType, PractitionerVisibilityType } from '../../../internal/types'; import { durationTimeUnitsEnum, periodicityTimeUnitsEnum } from '../../../internal/utils/prescription-duration-helpers'; import { CreatePrescriptionService } from '../../../internal/services/prescription/create-prescription.service'; import { ReimbursementType } from '../../../internal/types/reimbursement'; import { TranslationService } from '../../services/translation/translation.service'; import { MedicationType, PrescribedMedicationType } from '../../types'; import * as i0 from "@angular/core"; export declare class PrescriptionModalComponent implements OnInit, OnChanges, OnDestroy { private fb; private createPrescriptionService; private translationService; private cdr; modalTitle: string; medicationToPrescribe?: MedicationType; prescriptionToModify?: PrescribedMedicationType; handleSubmit: EventEmitter<PrescribedMedicationType[]>; handleCancel: EventEmitter<void>; constructor(fb: NonNullableFormBuilder, createPrescriptionService: CreatePrescriptionService, translationService: TranslationService, cdr: ChangeDetectorRef); readonly t: (key: string) => string; language: keyof SamText; prescriptionForm: FormGroup; private subscriptions; practitionerVisibilityOptions: { value: PractitionerVisibilityType; label: string; }[]; pharmacistVisibilityOptions: { value: PharmacistVisibilityType; label: string; }[]; reimbursementOptions: { value: ReimbursementType; label: string; }[]; durationTimeUnits: { value: durationTimeUnitsEnum; label: string; }[]; periodicityTimeUnits: { value: periodicityTimeUnitsEnum; label: string; }[]; recipeInstructionForPatientLabel?: string; selectedReimbursementLabel?: string; selectedPractitionerVisibilityLabel?: string; selectedPharmacistVisibilityLabel?: string; focusedDosageIndex: number; dosageSuggestions: string[]; disableHover: boolean; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private getInitialFormValues; private initForm; private getLabel; getControl(name: string): import("@angular/forms").AbstractControl<any, any> | null; getErrorMessage(fieldName: string): string | undefined; onSubmit(): void; onCancel(): void; private subscribeToValidationChanges; private updatePeriodicityValidators; private subscribeToLabelChanges; private setupDosageSuggestionLogic; private findCommonSequence; validateSuggestion(index: number): void; onKeyDownDosageSuggestions(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration<PrescriptionModalComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<PrescriptionModalComponent, "cardinal-prescription-modal", never, { "modalTitle": { "alias": "modalTitle"; "required": true; }; "medicationToPrescribe": { "alias": "medicationToPrescribe"; "required": false; }; "prescriptionToModify": { "alias": "prescriptionToModify"; "required": false; }; }, { "handleSubmit": "handleSubmit"; "handleCancel": "handleCancel"; }, never, never, true, never>; }