@icure/cardinal-prescription-be-react
Version:
This is a Belgian-specific React application for healthcare professionals to manage electronic prescriptions with SAM. Created by iCure.
1 lines • 366 kB
Source Map (JSON)
{"version":3,"sources":["../src/services/i18n/translations/components/home.translations.ts","../src/services/i18n/translations/components/prescription.translations.ts","../src/services/i18n/translations/components/medication.translations.ts","../src/services/i18n/translations/components/practitioner.translations.ts","../src/services/i18n/translations/utils/visibility-helpers.translations.ts","../src/services/i18n/translations/utils/reimbursement-helpers.translations.ts","../src/services/i18n/translations/utils/prescription-duration-helpers.translations.ts","../src/services/i18n/translations/utils/delivery-helpers.translations.ts","../src/services/i18n/translations/index.ts","../src/services/constants.ts","../src/services/i18n/index.tsx","../src/services/cardinal-sam/index.ts","../src/services/indexed-db/index.ts","../src/services/certificate/index.ts","../src/services/fhc/index.ts","../src/utils/date-helpers.ts","../src/components/common/Alert/styles.ts","../src/styles/reset.ts","../src/styles/variables.ts","../src/styles/elements.ts","../src/styles/responsive-media-queries.ts","../src/components/common/Icons/index.tsx","../src/components/common/Alert/index.tsx","../src/components/certificate-elements/CertificateUploadForm/index.tsx","../src/utils/file-helpers.ts","../src/components/form-elements/Button/styles.ts","../src/components/form-elements/Button/index.tsx","../src/components/form-elements/TextInput/index.tsx","../src/components/form-elements/TextInput/styles.ts","../src/components/certificate-elements/CertificateUploadForm/styles.ts","../src/components/certificate-elements/PractitionerCertificate/styles.ts","../src/components/certificate-elements/PractitionerCertificate/index.tsx","../src/components/medication-elements/MedicationSearch/index.tsx","../src/components/medication-elements/MedicationCard/index.tsx","../src/components/common/Tooltip/index.tsx","../src/components/common/Tooltip/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/RmaProfessionalLinkContent/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/RmaProfessionalLinkContent/index.tsx","../src/components/medication-elements/MedicationCard/infographic-elements/SupplyProblemsContent/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/SupplyProblemsContent/index.tsx","../src/components/medication-elements/MedicationCard/infographic-elements/EndOfCommercialisationContent/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/EndOfCommercialisationContent/index.tsx","../src/components/medication-elements/MedicationCard/infographic-elements/StartOfCommercialisationContent/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/StartOfCommercialisationContent/index.tsx","../src/utils/reimbursement-helpers.ts","../src/components/medication-elements/MedicationCard/infographic-elements/ReimbursementsContent/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/ReimbursementsContent/index.tsx","../src/components/medication-elements/MedicationCard/infographic-elements/DeliveryConditionsContent/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/DeliveryConditionsContent/index.tsx","../src/components/medication-elements/MedicationCard/infographic-elements/PrescriptionConditionsContent/styles.ts","../src/components/medication-elements/MedicationCard/infographic-elements/PrescriptionConditionsContent/index.tsx","../src/components/medication-elements/MedicationCard/medication-card-elements/Header/index.tsx","../src/components/medication-elements/MedicationCard/medication-card-elements/Header/styles.ts","../src/components/medication-elements/MedicationCard/medication-card-elements/Extension/styles.ts","../src/components/medication-elements/MedicationCard/medication-card-elements/Extension/index.tsx","../src/components/medication-elements/MedicationCard/styles.ts","../src/components/common/InfiniteScroll/index.tsx","../src/utils/loader-helpers.ts","../src/services/medication-mapper/index.ts","../src/utils/string-helpers.ts","../src/components/medication-elements/MedicationSearch/styles.ts","../src/components/prescription-elements/PrescriptionModal/index.tsx","../src/utils/dosage-helpers.ts","../src/utils/prescription-duration-helpers.ts","../src/utils/visibility-helpers.ts","../src/components/form-elements/SelectInput/index.tsx","../src/components/form-elements/SelectInput/styles.ts","../src/components/form-elements/RadioInput/index.tsx","../src/components/form-elements/RadioInput/styles.ts","../src/components/form-elements/ToggleSwitch/index.tsx","../src/components/form-elements/ToggleSwitch/styles.ts","../src/components/form-elements/TextareaInput/index.tsx","../src/components/form-elements/TextareaInput/styles.ts","../src/components/prescription-elements/PrescriptionModal/styles.ts","../src/components/prescription-elements/PrescriptionList/index.tsx","../src/components/prescription-elements/PrescriptionCard/styles.ts","../src/components/prescription-elements/PrescriptionCard/index.tsx","../src/components/prescription-elements/PrescriptionList/styles.ts","../src/components/prescription-elements/PrescriptionDocumentToPrint/index.tsx","../src/components/prescription-elements/PrescriptionDocumentToPrint/styles.ts","../src/components/prescription-elements/PrescriptionPrintModal/styles.ts","../src/components/prescription-elements/PrescriptionPrintModal/index.tsx"],"sourcesContent":["/* eslint-disable max-len */\nexport const homeTranslations = {\n fr: {\n samVersionLabel: 'Version Sam :',\n },\n en: {\n samVersionLabel: 'Sam version:',\n },\n nl: {\n samVersionLabel: 'Sam-versie:',\n },\n de: {\n samVersionLabel: 'Sam-version:',\n },\n}\n","/* eslint-disable max-len */\nexport const prescriptionTranslations = {\n fr: {\n createTitle: 'Créer la prescription',\n modifyTitle: 'Modifier la prescription',\n pdf: {\n title: 'PREUVE DE PRESCRIPTION ELECTRONIQUE',\n instructions: 'Veuillez présenter ce document à votre pharmacien pour scanner le code-barres et vous délivrer les médicaments prescrits.',\n options: {\n title: 'De quelles options disposez-vous pour vous rendre à la pharmacie si vous avez perdu ce document ?',\n option1: 'Via Masanté.be - MyHealthViewer - App MesMédicaments ou toute autre App, vous pouvez montrer votre prescription au pharmacien, qui lira le code-barres.',\n option2:\n 'Vous pouvez également aller chercher les produits prescrits avec votre eID (ou votre numéro de registre national si votre eID a été lue par le pharmacien qui vous délivre les produits dans les 15 mois précédents).',\n },\n prescriber: 'Prescripteur',\n patient: 'Bénéficiaire',\n electronicContent: 'Contenu de la prescription électronique:',\n product: 'Produit:',\n dosage: 'Posologie:',\n date: 'Date:',\n validUntil: \"Date de fin pour l'exécution:\",\n },\n list: {\n sentTitle: 'Ordonnances envoyées:',\n pendingTitle: 'Ordonnances en attente:',\n print: 'Imprimer',\n send: 'Envoyer',\n sendAndPrint: 'Envoyer et imprimer',\n },\n form: {\n medicationTitle: 'Nom du groupe DCI',\n dosage: 'Posologie',\n duration: 'Durée (nombre d’unités)',\n durationTimeUnit: 'Unité de temps',\n treatmentStartDate: 'Date début du traitement',\n executableUntil: 'Exécutable jusqu`au',\n prescriptionsNumber: 'Nombre de prescriptions',\n periodicityTimeUnit: 'Périodicité',\n periodicityDaysNumber: 'Nombre de jours',\n substitutionAllowed: 'Substitution autorisée',\n substitutionYes: 'Oui',\n substitutionNo: 'Non',\n toggleExtraFields: 'Afficher plus',\n patientInstructions: 'Instructions pour le patient',\n reimbursementInstructions: 'Instructions remboursement',\n prescriberVisibility: 'Visibilité prescripteur',\n pharmacistVisibility: 'Visibilité officine',\n cancel: 'Annuler',\n submit: 'Soumettre',\n fieldRequired: 'Ce champ est requis',\n fieldInvalid: 'Champ invalide',\n instructionLabelNone: 'Aucun',\n },\n },\n en: {\n createTitle: 'Create prescription',\n modifyTitle: 'Modify prescription',\n pdf: {\n title: 'PROOF OF ELECTRONIC PRESCRIPTION',\n instructions: 'Please present this document to your pharmacist to scan the barcode and dispense the prescribed medication.',\n options: {\n title: 'What are your options if you lost this document?',\n option1: 'Via Masanté.be - MyHealthViewer - MyMeds App or any other app, you can show your prescription to the pharmacist who will scan the barcode.',\n option2:\n 'You can also collect the prescribed products with your eID (or your national register number if your eID was read by the pharmacist who dispenses the products within the last 15 months).',\n },\n prescriber: 'Prescriber',\n patient: 'Beneficiary',\n electronicContent: 'Electronic prescription content:',\n product: 'Product:',\n dosage: 'Dosage:',\n date: 'Date:',\n validUntil: 'Valid until:',\n },\n list: {\n sentTitle: 'Sent prescriptions:',\n pendingTitle: 'Pending prescriptions:',\n print: 'Print',\n send: 'Send',\n sendAndPrint: 'Send and print',\n },\n form: {\n medicationTitle: 'DCI group name',\n dosage: 'Dosage',\n duration: 'Duration (number of units)',\n durationTimeUnit: 'Time unit',\n treatmentStartDate: 'Start date of treatment',\n executableUntil: 'Executable until',\n prescriptionsNumber: 'Number of prescriptions',\n periodicityTimeUnit: 'Periodicity',\n periodicityDaysNumber: 'Number of days',\n substitutionAllowed: 'Substitution allowed',\n substitutionYes: 'Yes',\n substitutionNo: 'No',\n toggleExtraFields: 'Show more',\n patientInstructions: 'Instructions for the patient',\n reimbursementInstructions: 'Reimbursement instructions',\n prescriberVisibility: 'Prescriber visibility',\n pharmacistVisibility: 'Pharmacist visibility',\n cancel: 'Cancel',\n submit: 'Submit',\n fieldRequired: 'This field is required',\n fieldInvalid: 'Invalid field',\n instructionLabelNone: 'None',\n },\n },\n nl: {\n createTitle: 'Voorschrift aanmaken',\n modifyTitle: 'Voorschrift bewerken',\n pdf: {\n title: 'BEWIJS VAN ELEKTRONISCH VOORSCHRIFT',\n instructions: 'Gelieve dit document aan uw apotheker te tonen zodat hij/zij de barcode kan scannen en de voorgeschreven geneesmiddelen kan afleveren.',\n options: {\n title: 'Welke opties hebt u om naar de apotheek te gaan als u dit document bent verloren?',\n option1: 'Via Masanté.be - MyHealthViewer - MijnGeneesmiddelen-app of een andere app, kunt u uw voorschrift tonen aan de apotheker, die de barcode zal scannen.',\n option2:\n 'U kunt de voorgeschreven producten ook afhalen met uw eID (of uw rijksregisternummer als uw eID werd uitgelezen door de apotheker die de producten aflevert binnen de laatste 15 maanden).',\n },\n prescriber: 'Voorschrijver',\n patient: 'Begunstigde',\n electronicContent: 'Inhoud van het elektronisch voorschrift:',\n product: 'Product:',\n dosage: 'Dosering:',\n date: 'Datum:',\n validUntil: 'Uitvoerbaar tot:',\n },\n list: {\n sentTitle: 'Verzonden voorschriften:',\n pendingTitle: 'Voorschriften in afwachting:',\n print: 'Afdrukken',\n send: 'Verzenden',\n sendAndPrint: 'Verzenden en afdrukken',\n },\n form: {\n medicationTitle: 'Naam van DCI-groep',\n dosage: 'Dosering',\n duration: 'Duur (aantal eenheden)',\n durationTimeUnit: 'Tijdseenheid',\n treatmentStartDate: 'Startdatum van behandeling',\n executableUntil: 'Uitvoerbaar tot',\n prescriptionsNumber: 'Aantal voorschriften',\n periodicityTimeUnit: 'Periodiciteit',\n periodicityDaysNumber: 'Aantal dagen',\n substitutionAllowed: 'Vervanging toegestaan',\n substitutionYes: 'Ja',\n substitutionNo: 'Nee',\n toggleExtraFields: 'Meer weergeven',\n patientInstructions: 'Instructies voor de patiënt',\n reimbursementInstructions: 'Instructies voor terugbetaling',\n prescriberVisibility: 'Zichtbaarheid voor de voorschrijver',\n pharmacistVisibility: 'Zichtbaarheid voor de apotheker',\n cancel: 'Annuleren',\n submit: 'Indienen',\n fieldRequired: 'Dit veld is verplicht',\n fieldInvalid: 'Ongeldig veld',\n instructionLabelNone: 'Geen',\n },\n },\n de: {\n createTitle: 'Rezept erstellen',\n modifyTitle: 'Rezept bearbeiten',\n pdf: {\n title: 'NACHWEIS DES ELEKTRONISCHEN REZEPTS',\n instructions: 'Bitte legen Sie dieses Dokument Ihrem Apotheker vor, damit er den Barcode scannen und die verschriebenen Medikamente abgeben kann.',\n options: {\n title: 'Welche Möglichkeiten haben Sie, wenn Sie dieses Dokument verloren haben?',\n option1: 'Über Masanté.be – MyHealthViewer – MeineMedikamente-App oder eine andere App können Sie Ihr Rezept dem Apotheker zeigen, der den Barcode scannt.',\n option2:\n 'Sie können die verschriebenen Produkte auch mit Ihrem eID (oder Ihrer nationalen Registernummer, falls Ihre eID vom Apotheker, der Ihnen in den letzten 15 Monaten Produkte ausgehändigt hat, gelesen wurde) abholen.',\n },\n prescriber: 'Verschreiber',\n patient: 'Empfänger',\n electronicContent: 'Inhalt des elektronischen Rezepts:',\n product: 'Produkt:',\n dosage: 'Dosierung:',\n date: 'Datum:',\n validUntil: 'Gültig bis:',\n },\n list: {\n sentTitle: 'Versendete Rezepte:',\n pendingTitle: 'Ausstehende Rezepte:',\n print: 'Drucken',\n send: 'Senden',\n sendAndPrint: 'Senden und drucken',\n },\n form: {\n medicationTitle: 'Name der DCI-Gruppe',\n dosage: 'Dosierung',\n duration: 'Dauer (Anzahl der Einheiten)',\n durationTimeUnit: 'Zeiteinheit',\n treatmentStartDate: 'Behandlungsbeginn',\n executableUntil: 'Ausführbar bis',\n prescriptionsNumber: 'Anzahl der Rezepte',\n periodicityTimeUnit: 'Periodizität',\n periodicityDaysNumber: 'Anzahl der Tage',\n substitutionAllowed: 'Substitution erlaubt',\n substitutionYes: 'Ja',\n substitutionNo: 'Nein',\n toggleExtraFields: 'Mehr anzeigen',\n patientInstructions: 'Anweisungen für den Patienten',\n reimbursementInstructions: 'Anweisungen zur Erstattung',\n prescriberVisibility: 'Sichtbarkeit für den Verschreiber',\n pharmacistVisibility: 'Sichtbarkeit für den Apotheker',\n cancel: 'Abbrechen',\n submit: 'Absenden',\n fieldRequired: 'Dieses Feld ist erforderlich',\n fieldInvalid: 'Ungültiges Feld',\n instructionLabelNone: 'Keine',\n },\n },\n}\n","/* eslint-disable max-len */\nexport const medicationTranslations = {\n fr: {\n drugType: {\n medication: 'Médicament',\n molecule: 'Molécule',\n homologation: 'Homologation',\n },\n drugInfographic: {\n blackTriangle: 'Pharmacovigilance renforcée (Triangle noir)',\n rma: 'Activités additionnelles de minimisation des risques ou additional RMA (Risk Minimisation Activities) (Source: AFMPS)',\n genericPrescriptionRequired: 'Ordonnance générique requise',\n },\n drugSpecialRegulation: {\n noNarcoticRegulation: 'Aucun stupéfiant, médicament soumis à réglementation particulière',\n narcoticRegulation: 'Stupéfiant, médicament soumis à réglementation particulière',\n noSpecialRegulation: 'Aucune réglementation particulière',\n },\n supply: {\n issueTitle: \"Problème d'approvisionnement temporaire :\",\n startDate: 'Disponibilité limitée depuis :',\n expectedEndDate: 'Date de fin présumée :',\n reason: 'Raison :',\n impact: 'Impact :',\n prescriberNote: 'Déclaration du prescripteur :',\n downloadPdf: 'Télécharger le document en .pdf',\n extraInfo: 'Informations complémentaires :',\n },\n commercialization: {\n end: 'Fin de commercialisation :',\n limitedAvailabilityFrom: 'Disponibilité limitée à partir de :',\n unavailableFrom: 'Indisponible à partir de :',\n endReason: 'Raison :',\n endImpact: 'Impact :',\n endAdditionalInformation: 'Informations complémentaires :',\n start: 'Début de commercialisation :',\n startAvailableFrom: 'Disponible depuis :',\n },\n reimbursement: {\n title: 'Remboursement :',\n category: 'Catégorie de remboursement :',\n categoryLabel: 'Spécification de la catégorie de remboursement :',\n copay: 'Ticket modérateur type',\n copayPreferential: ' Préférentiel :',\n copayActive: ' Actif :',\n temporary: 'Remboursement temporaire (art. 111) :',\n chapter: 'Chapitre :',\n noneTitle: 'Conditions de prescription',\n notApplicable: 'Non applicable',\n non: 'Non',\n },\n delivery: {\n title: 'Conditions de livraison :',\n code: 'Code de livraison :',\n modus: 'Mode de livraison :',\n specification: 'Spécification de livraison :',\n notApplicable: 'Non applicable',\n },\n prescription: {\n title: 'Conditions de prescription :',\n code: 'Code de prescription :',\n specification: 'Spécification de prescription :',\n free: 'Libre de prescription',\n },\n vmp: {\n label: 'VMP :',\n groupLabel: 'Groupe VMP :',\n },\n links: {\n cbip: 'Répertoire commenté des médicaments (CBIP)',\n leaflet: 'Notice pour le patient',\n rma: 'Activités de réduction des risques (RMA)',\n spc: 'Résumé des caractéristiques du produit (RCP)',\n dhpc: 'Communication directe aux professionnels de santé (DHPC)',\n },\n ui: {\n price: 'Prix :',\n },\n search: {\n label: 'Trouver un médicament',\n errorMessage: ' Entrez au moins 3 lettres du nom du médicament',\n },\n },\n en: {\n drugType: {\n medication: 'Medication',\n molecule: 'Molecule',\n homologation: 'Homologation',\n },\n drugInfographic: {\n blackTriangle: 'Enhanced pharmacovigilance (Black triangle)',\n rma: 'Additional risk minimisation activities or additional RMA (Risk Minimisation Activities) (Source: FAMHP)',\n genericPrescriptionRequired: 'Generic prescription required',\n },\n drugSpecialRegulation: {\n noNarcoticRegulation: 'No narcotic, specially regulated drug',\n narcoticRegulation: 'Narcotic, specially regulated drug',\n noSpecialRegulation: 'No special regulation',\n },\n supply: {\n issueTitle: 'Temporary supply problem:',\n startDate: 'Limited availability since:',\n expectedEndDate: 'Presumed end date:',\n reason: 'Reason:',\n impact: 'Impact:',\n prescriberNote: 'Prescriber declaration:',\n downloadPdf: 'Download the document (.pdf)',\n extraInfo: 'Additional information:',\n },\n commercialization: {\n end: 'End of commercialisation:',\n limitedAvailabilityFrom: 'Limited availability from:',\n unavailableFrom: 'Unavailable from:',\n endReason: 'Reason:',\n endImpact: 'Impact:',\n endAdditionalInformation: 'Additional information:',\n start: 'Start of commercialisation:',\n startAvailableFrom: 'Available from:',\n },\n reimbursement: {\n title: 'Reimbursement:',\n category: 'Reimbursement category:',\n categoryLabel: 'Reimbursement category specification:',\n copay: 'Co-payment type',\n copayPreferential: 'Preferential:',\n copayActive: 'Active:',\n temporary: 'Temporary reimbursement (art. 111):',\n chapter: 'Chapter:',\n noneTitle: 'Prescription conditions',\n notApplicable: 'Not applicable',\n non: 'No',\n },\n delivery: {\n title: 'Delivery conditions:',\n code: 'Delivery code:',\n modus: 'Delivery method:',\n specification: 'Delivery specification:',\n notApplicable: 'Not applicable',\n },\n prescription: {\n title: 'Prescription conditions:',\n code: 'Prescription code:',\n specification: 'Prescription specification:',\n free: 'Free of prescription',\n },\n vmp: {\n label: 'VMP:',\n groupLabel: 'VMP-group:',\n },\n links: {\n cbip: 'Commented Medicines Directory (CBIP)',\n leaflet: 'Patient information leaflet',\n rma: 'Risk Minimisation Activities (RMA)',\n spc: 'Summary of Product Characteristics (SPC)',\n dhpc: 'Direct Healthcare Professional Communication (DHPC)',\n },\n ui: {\n price: 'Price:',\n },\n search: {\n label: 'Find a medication',\n errorMessage: 'Enter at least 3 letters of the medication name',\n },\n },\n nl: {\n drugType: {\n medication: 'Geneesmiddel',\n molecule: 'Molecule',\n homologation: 'Homologatie',\n },\n drugInfographic: {\n blackTriangle: 'Verhoogde waakzaamheid (Zwarte driehoek)',\n rma: 'Aanvullende risicobeperkende maatregelen (RMA) (Bron: FAGG)',\n genericPrescriptionRequired: 'Generiek voorschrift vereist',\n },\n drugSpecialRegulation: {\n noNarcoticRegulation: 'Geen verdovend middel, geneesmiddel onderworpen aan specifieke regelgeving',\n narcoticRegulation: 'Verdovend middel, geneesmiddel onderworpen aan specifieke regelgeving',\n noSpecialRegulation: 'Geen specifieke regelgeving',\n },\n supply: {\n issueTitle: 'Tijdelijk bevoorradingsprobleem:',\n startDate: 'Beperkte beschikbaarheid sinds:',\n expectedEndDate: 'Verwachte einddatum:',\n reason: 'Reden:',\n impact: 'Impact:',\n prescriberNote: 'Verklaring van de voorschrijver:',\n downloadPdf: 'Download het document (.pdf)',\n extraInfo: 'Aanvullende informatie:',\n },\n commercialization: {\n end: 'Einde van commercialisering:',\n limitedAvailabilityFrom: 'Beperkte beschikbaarheid vanaf:',\n unavailableFrom: 'Niet beschikbaar vanaf:',\n endReason: 'Reden:',\n endImpact: 'Impact:',\n endAdditionalInformation: 'Aanvullende informatie:',\n start: 'Start van commercialisering:',\n startAvailableFrom: 'Beschikbaar sinds:',\n },\n reimbursement: {\n title: 'Terugbetaling:',\n category: 'Terugbetalingscategorie:',\n categoryLabel: 'Specificatie van de terugbetalingscategorie:',\n copay: 'Soort remgeld',\n copayPreferential: 'Voorkeurtarief:',\n copayActive: 'Actief:',\n temporary: 'Tijdelijke terugbetaling (art. 111):',\n chapter: 'Hoofdstuk:',\n noneTitle: 'Voorschrijfvoorwaarden',\n notApplicable: 'Niet van toepassing',\n non: 'Nee',\n },\n delivery: {\n title: 'Aflevervoorwaarden:',\n code: 'Aflevercode:',\n modus: 'Afleverwijze:',\n specification: 'Specificatie van aflevering:',\n notApplicable: 'Niet van toepassing',\n },\n prescription: {\n title: 'Voorschrijfvoorwaarden:',\n code: 'Voorschrijfcode:',\n specification: 'Specificatie van voorschrift:',\n free: 'Vrij voorschrijfbaar',\n },\n vmp: {\n label: 'VMP:',\n groupLabel: 'VMP-groep:',\n },\n links: {\n cbip: 'Gecommentarieerde geneesmiddelenrepertorium (CBIP)',\n leaflet: 'Bijsluiter voor de patiënt',\n rma: 'Maatregelen voor risicobeperking (RMA)',\n spc: 'Samenvatting van de productkenmerken (SKP)',\n dhpc: 'Rechtstreekse communicatie naar zorgverleners (DHPC)',\n },\n ui: {\n price: 'Prijs:',\n },\n search: {\n label: 'Zoek een geneesmiddel',\n errorMessage: 'Voer minstens 3 letters van de naam in',\n },\n },\n de: {\n drugType: {\n medication: 'Arzneimittel',\n molecule: 'Molekül',\n homologation: 'Zulassung',\n },\n drugInfographic: {\n blackTriangle: 'Verstärkte Pharmakovigilanz (Schwarzes Dreieck)',\n rma: 'Zusätzliche Maßnahmen zur Risikominimierung (RMA) (Quelle: BfArM)',\n genericPrescriptionRequired: 'Generisches Rezept erforderlich',\n },\n drugSpecialRegulation: {\n noNarcoticRegulation: 'Kein Betäubungsmittel, Arzneimittel mit besonderer Regelung',\n narcoticRegulation: 'Betäubungsmittel, Arzneimittel mit besonderer Regelung',\n noSpecialRegulation: 'Keine besondere Regelung',\n },\n supply: {\n issueTitle: 'Vorübergehendes Lieferproblem :',\n startDate: 'Eingeschränkte Verfügbarkeit seit :',\n expectedEndDate: 'Voraussichtliches Enddatum :',\n reason: 'Grund :',\n impact: 'Auswirkung :',\n prescriberNote: 'Erklärung des Verschreibers :',\n downloadPdf: 'Dokument als .pdf herunterladen',\n extraInfo: 'Zusätzliche Informationen :',\n },\n commercialization: {\n end: 'Ende der Vermarktung :',\n limitedAvailabilityFrom: 'Eingeschränkte Verfügbarkeit ab :',\n unavailableFrom: 'Nicht verfügbar ab :',\n endReason: 'Grund :',\n endImpact: 'Auswirkung :',\n endAdditionalInformation: 'Zusätzliche Informationen :',\n start: 'Beginn der Vermarktung :',\n startAvailableFrom: 'Verfügbar seit :',\n },\n reimbursement: {\n title: 'Erstattung :',\n category: 'Erstattungskategorie :',\n categoryLabel: 'Spezifikation der Erstattungskategorie :',\n copay: 'Zuzahlungstyp',\n copayPreferential: ' Bevorzugt :',\n copayActive: ' Aktiv :',\n temporary: 'Vorübergehende Erstattung (Art. 111) :',\n chapter: 'Kapitel :',\n noneTitle: 'Verordnungsbedingungen',\n notApplicable: 'Nicht zutreffend',\n non: 'Nein',\n },\n delivery: {\n title: 'Lieferbedingungen :',\n code: 'Liefercode :',\n modus: 'Liefermethode :',\n specification: 'Lieferdetails :',\n notApplicable: 'Nicht zutreffend',\n },\n prescription: {\n title: 'Verordnungsbedingungen :',\n code: 'Verordnungscode :',\n specification: 'Verordnungsdetails :',\n free: 'Frei verschreibbar',\n },\n vmp: {\n label: 'VMP :',\n groupLabel: 'VMP-Gruppe :',\n },\n links: {\n cbip: 'Kommentiertes Arzneimittelverzeichnis (CBIP)',\n leaflet: 'Packungsbeilage für Patienten',\n rma: 'Maßnahmen zur Risikominimierung (RMA)',\n spc: 'Fachinformation (SPC)',\n dhpc: 'Direkte Kommunikation an medizinisches Fachpersonal (DHPC)',\n },\n ui: {\n price: 'Preis :',\n },\n search: {\n label: 'Arzneimittel suchen',\n errorMessage: 'Geben Sie mindestens 3 Buchstaben des Arzneimittelnamens ein',\n },\n },\n}\n","/* eslint-disable max-len */\nexport const practitionerTranslations = {\n fr: {\n certificateUpload: {\n titleUpload: 'Télécharger le certificat',\n titlePassword: 'Entrez le mot de passe du certificat',\n fileLabel: 'Certificat du praticien',\n passwordLabel: 'Mot de passe du certificat',\n submitButtonUpload: 'Crypter et télécharger',\n submitButtonPassword: 'Soumettre',\n resetButton: 'Télécharger un autre certificat',\n errorRequired: 'Ce champ est requis',\n errorInvalid: 'Champ invalide',\n passwordMissingTitle: 'Mot de passe manquant',\n passwordMissingDescription:\n 'Veuillez saisir le mot de passe associé au certificat afin de pouvoir le déchiffrer. Ce mot de passe est requis pour poursuivre la vérification.',\n },\n certificateFeedback: {\n successTitle: 'Téléchargement du certificat réussi',\n successDescription:\n 'Le certificat du praticien a été téléchargé avec succès et le mot de passe a été enregistré en toute sécurité. Vous pouvez maintenant poursuivre les prochaines étapes.',\n failureTitle: 'Échec du téléchargement du certificat',\n failureDescription:\n 'Une erreur est survenue lors du téléchargement du certificat du praticien. Veuillez vérifier que votre certificat est valide et que vous avez saisi le bon mot de passe. Réessayez, et si le problème persiste, contactez le support.',\n verificationErrorTitle: 'Erreur de vérification du certificat',\n },\n printModal: {\n title: 'Imprimer la prescription',\n close: 'Fermer',\n print: 'Imprimer',\n },\n },\n en: {\n certificateUpload: {\n titleUpload: 'Upload certificate',\n titlePassword: 'Enter certificate password',\n fileLabel: 'Practitioner certificate',\n passwordLabel: 'Certificate password',\n submitButtonUpload: 'Encrypt and upload',\n submitButtonPassword: 'Submit',\n resetButton: 'Upload another certificate',\n errorRequired: 'This field is required',\n errorInvalid: 'Invalid field',\n passwordMissingTitle: 'Missing password',\n passwordMissingDescription: 'Please enter the password associated with the certificate to decrypt it. This password is required to continue verification.',\n },\n certificateFeedback: {\n successTitle: 'Certificate upload successful',\n successDescription: 'The certificate’s certificate was uploaded successfully. You may proceed with the next steps.',\n failureTitle: 'Certificate upload failed',\n failureDescription:\n 'An error occurred while uploading the certificate. Please check that your certificate is valid and that you’ve entered the correct password. Try again, and if the issue continues, contact support.',\n verificationErrorTitle: 'Certificate verification error',\n },\n printModal: {\n title: 'Print prescription',\n close: 'Close',\n print: 'Print',\n },\n },\n nl: {\n certificateUpload: {\n titleUpload: 'Certificaat uploaden',\n titlePassword: 'Voer het certificaatwachtwoord in',\n fileLabel: 'Certificaat van de zorgverlener',\n passwordLabel: 'Wachtwoord van het certificaat',\n submitButtonUpload: 'Versleutelen en uploaden',\n submitButtonPassword: 'Verzenden',\n resetButton: 'Ander certificaat uploaden',\n errorRequired: 'Dit veld is verplicht',\n errorInvalid: 'Ongeldig veld',\n passwordMissingTitle: 'Wachtwoord ontbreekt',\n passwordMissingDescription:\n 'Voer het wachtwoord in dat aan het certificaat is gekoppeld om het te ontsleutelen. Dit wachtwoord is vereist om de verificatie voort te zetten.',\n },\n certificateFeedback: {\n successTitle: 'Certificaat succesvol geüpload',\n successDescription: 'Het certificaat van de zorgverlener is succesvol geüpload en het wachtwoord is veilig opgeslagen. U kunt nu doorgaan met de volgende stappen.',\n failureTitle: 'Uploaden van certificaat mislukt',\n failureDescription:\n 'Er is een fout opgetreden bij het uploaden van het certificaat van het wachtwoord. Controleer of uw certificaat geldig is en of u het juiste wachtwoord hebt ingevoerd. Probeer het opnieuw. Neem contact op met de ondersteuning als het probleem aanhoudt.',\n verificationErrorTitle: 'Fout bij verificatie van certificaat',\n },\n printModal: {\n title: 'Voorschrift afdrukken',\n close: 'Sluiten',\n print: 'Afdrukken',\n },\n },\n de: {\n certificateUpload: {\n titleUpload: 'Zertifikat hochladen',\n titlePassword: 'Zertifikat-Passwort eingeben',\n fileLabel: 'Zertifikat des Arztes',\n passwordLabel: 'Passwort des Zertifikats',\n submitButtonUpload: 'Verschlüsseln und hochladen',\n submitButtonPassword: 'Absenden',\n resetButton: 'Anderes Zertifikat hochladen',\n errorRequired: 'Dieses Feld ist erforderlich',\n errorInvalid: 'Ungültiges Feld',\n passwordMissingTitle: 'Passwort fehlt',\n passwordMissingDescription:\n 'Bitte geben Sie das Passwort ein, das mit dem Zertifikat verknüpft ist, um es zu entschlüsseln. Dieses Passwort ist für die weitere Überprüfung erforderlich.',\n },\n certificateFeedback: {\n successTitle: 'Zertifikat erfolgreich hochgeladen',\n successDescription:\n 'Das Zertifikat des Arztes wurde erfolgreich hochgeladen und das Passwort wurde sicher gespeichert. Sie können nun mit den nächsten Schritten fortfahren.',\n failureTitle: 'Zertifikat-Upload fehlgeschlagen',\n failureDescription:\n 'Beim Hochladen des Zertifikats ist ein Fehler aufgetreten. Bitte überprüfen Sie, ob Ihr Zertifikat gültig ist und ob Sie das richtige Passwort eingegeben haben. Versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich an den Support.',\n verificationErrorTitle: 'Fehler bei der Zertifikatsprüfung',\n },\n printModal: {\n title: 'Rezept drucken',\n close: 'Schließen',\n print: 'Drucken',\n },\n },\n}\n","export const prescriptionVisibilityTranslations = {\n fr: {\n practitionerVisibility: {\n open: 'Visible pour tous les prescripteurs',\n locked: 'Visible uniquement pour moi-même',\n gmd_prescriber: 'Visible uniquement pour le titulaire du DMG',\n },\n pharmacistVisibility: {\n null: 'Le médicament est visible par tous les pharmaciens',\n locked: 'Le médicament n`est pas visible par tous les pharmaciens',\n },\n },\n en: {\n practitionerVisibility: {\n open: 'Visible to all prescribers',\n locked: 'Visible only to myself',\n gmd_prescriber: 'Visible only to the GMD holder',\n },\n pharmacistVisibility: {\n null: 'The medication is visible to all pharmacists',\n locked: 'The medication is not visible to all pharmacists',\n },\n },\n nl: {\n practitionerVisibility: {\n open: 'Zichtbaar voor alle voorschrijvers',\n locked: 'Alleen zichtbaar voor mezelf',\n gmd_prescriber: 'Alleen zichtbaar voor de GMD-houder',\n },\n pharmacistVisibility: {\n null: 'Het geneesmiddel is zichtbaar voor alle apothekers',\n locked: 'Het geneesmiddel is niet zichtbaar voor alle apothekers',\n },\n },\n de: {\n practitionerVisibility: {\n open: 'Sichtbar für alle verschreiber',\n locked: 'Nur für mich sichtbar',\n gmd_prescriber: 'Nur für den GMD-inhaber sichtbar',\n },\n pharmacistVisibility: {\n null: 'Das medikament ist für alle apotheker sichtbar',\n locked: 'Das medikament ist nicht für alle apotheker sichtbar',\n },\n },\n};\n","export const reimbursementTranslations = {\n fr: {\n practitionerSelectionOptions: {\n none: 'Aucun',\n PAYINGTHIRDPARTY: 'Tiers Payant',\n FIRSTDOSE: 'Première Dose',\n SECONDDOSE: 'Deuxième Dose',\n THIRDDOSE: 'Troisième Dose',\n CHRONICKINDEYDISEASE: 'Maladie Rénale Chronique',\n DIABETESTREATMENT: 'Traitement du Diabète',\n DIABETESCONVENTION: 'Convention Diabète',\n NOTREIMBURSABLE: 'Non Remboursable',\n EXPLAINMEDICATION: 'Explication du Médicament',\n DIABETESSTARTPATH: 'Parcours Initial Diabète',\n },\n categoryOptions: {\n A: 'Médicaments vitaux',\n B: 'Médicaments thérapeutiquement importants',\n C: 'Médicaments pour traitement symptomatique',\n Cs: 'Ex. vaccins, médicaments antiallergiques',\n Cx: 'Ex. contraceptifs',\n Fa: 'Médicaments vitaux remboursés sur une base fixe',\n Fb: 'Médicaments thérapeutiquement importants remboursés sur une base fixe',\n },\n },\n en: {\n practitionerSelectionOptions: {\n none: 'None',\n PAYINGTHIRDPARTY: 'Third-party payment',\n FIRSTDOSE: 'First dose',\n SECONDDOSE: 'Second dose',\n THIRDDOSE: 'Third dose',\n CHRONICKINDEYDISEASE: 'Chronic kidney disease',\n DIABETESTREATMENT: 'Diabetes treatment',\n DIABETESCONVENTION: 'Diabetes convention',\n NOTREIMBURSABLE: 'Not reimbursable',\n EXPLAINMEDICATION: 'Medication explanation',\n DIABETESSTARTPATH: 'Diabetes initial care path',\n },\n categoryOptions: {\n A: 'Life-saving medicines',\n B: 'Therapeutically important medicines',\n C: 'Medicines for symptomatic treatment',\n Cs: 'e.g. vaccines, allergy medicines',\n Cx: 'e.g. contraceptives',\n Fa: 'Life-saving medicines with reimbursement based on a fixed amount',\n Fb: 'Therapeutically important medicines with reimbursement based on a fixed amount',\n },\n },\n nl: {\n practitionerSelectionOptions: {\n none: 'Geen',\n PAYINGTHIRDPARTY: 'Derdebetaler',\n FIRSTDOSE: 'Eerste Dosis',\n SECONDDOSE: 'Tweede Dosis',\n THIRDDOSE: 'Derde Dosis',\n CHRONICKINDEYDISEASE: 'Chronische Nierziekte',\n DIABETESTREATMENT: 'Diabetesbehandeling',\n DIABETESCONVENTION: 'Diabetesconventie',\n NOTREIMBURSABLE: 'Niet Terugbetaalbaar',\n EXPLAINMEDICATION: 'Uitleg over het Geneesmiddel',\n DIABETESSTARTPATH: 'Opstarttraject Diabetes',\n },\n categoryOptions: {\n A: 'Levensreddende geneesmiddelen',\n B: 'Therapeutisch belangrijke geneesmiddelen',\n C: 'Geneesmiddelen voor symptomatische behandeling',\n Cs: 'bv. vaccins, allergiemedicatie',\n Cx: 'bv. anticonceptiva',\n Fa: 'Levensreddende geneesmiddelen met terugbetaling op basis van een vast bedrag',\n Fb: 'Therapeutisch belangrijke geneesmiddelen met terugbetaling op basis van een vast bedrag',\n },\n },\n de: {\n practitionerSelectionOptions: {\n none: 'Keine',\n PAYINGTHIRDPARTY: 'Drittzahlerregelung',\n FIRSTDOSE: 'Erste Dosis',\n SECONDDOSE: 'Zweite Dosis',\n THIRDDOSE: 'Dritte Dosis',\n CHRONICKINDEYDISEASE: 'Chronische Nierenerkrankung',\n DIABETESTREATMENT: 'Diabetesbehandlung',\n DIABETESCONVENTION: 'Diabetesvereinbarung',\n NOTREIMBURSABLE: 'Nicht Erstattungsfähig',\n EXPLAINMEDICATION: 'Erläuterung zum Medikament',\n DIABETESSTARTPATH: 'Einstiegspfad Diabetes',\n },\n categoryOptions: {\n A: 'Lebensrettende Medikamente',\n B: 'Therapeutisch wichtige Medikamente',\n C: 'Medikamente zur symptomatischen Behandlung',\n Cs: 'z. B. Impfstoffe, Allergiemedikamente',\n Cx: 'z. B. Verhütungsmittel',\n Fa: 'Lebensrettende Medikamente mit Erstattung auf Basis eines Festbetrags',\n Fb: 'Therapeutisch wichtige Medikamente mit Erstattung auf Basis eines Festbetrags',\n },\n },\n};\n","export const prescriptionDurationTranslations = {\n fr: {\n durationUnits: {\n day: 'jour',\n week: 'semaine',\n },\n periodicityUnits: {\n none: 'aucune',\n week: 'semaine',\n twoWeeks: '2 semaines',\n threeWeeks: '3 semaines',\n numberOfDays: 'x nombre de jours',\n },\n },\n en: {\n durationUnits: {\n day: 'day',\n week: 'week',\n },\n periodicityUnits: {\n none: 'none',\n week: 'week',\n twoWeeks: '2 weeks',\n threeWeeks: '3 weeks',\n numberOfDays: 'x number of days',\n },\n },\n nl: {\n durationUnits: {\n day: 'dag',\n week: 'week',\n },\n periodicityUnits: {\n none: 'geen',\n week: 'week',\n twoWeeks: '2 weken',\n threeWeeks: '3 weken',\n numberOfDays: 'x aantal dagen',\n },\n },\n de: {\n durationUnits: {\n day: 'tag',\n week: 'woche',\n },\n periodicityUnits: {\n none: 'keine',\n week: 'woche',\n twoWeeks: '2 wochen',\n threeWeeks: '3 wochen',\n numberOfDays: 'x anzahl der tage',\n },\n },\n};\n","export const deliveryModusTranslations = {\n fr: {\n specifications: {\n Sp: 'Prescription par un médecin-spécialiste',\n Sp1: 'Première prescription par un médecin-spécialiste, prescription de suivi par un médecin généraliste',\n 'Sp/S': 'Prescription par un médecin-spécialiste',\n 'Sp1/S':\n 'Première prescription par un médecin-spécialiste, prescription de suivi par un médecin généraliste',\n 'IMP/Sp': 'Prescription par un médecin-spécialiste',\n 'IMP/Sp1':\n 'Première prescription par un médecin-spécialiste, prescription de suivi par un médecin généraliste',\n },\n },\n en: {\n specifications: {\n Sp: 'Prescription by specialist',\n Sp1: 'First prescription by specialist, follow-up prescription by general certificate',\n 'Sp/S': 'Prescription by specialist',\n 'Sp1/S':\n 'First prescription by specialist, follow-up prescription by general certificate',\n 'IMP/Sp': 'Prescription by specialist',\n 'IMP/Sp1':\n 'First prescription by specialist, follow-up prescription by general certificate',\n },\n },\n nl: {\n specifications: {\n Sp: 'Voorschrift door een geneesheer-specialist',\n Sp1: 'Eerste voorschrift door een geneesheer-specialist, vervolgoorschrift door huisarts',\n 'Sp/S': 'Voorschrift door een geneesheer-specialist',\n 'Sp1/S':\n 'Eerste voorschrift door een geneesheer-specialist, vervolgoorschrift door huisarts',\n 'IMP/Sp': 'Voorschrift door een geneesheer-specialist',\n 'IMP/Sp1':\n 'Eerste voorschrift door een geneesheer-specialist, vervolgoorschrift door huisarts',\n },\n },\n de: {\n specifications: {\n Sp: 'Verschreibung von einem Facharzt',\n Sp1: 'Erste Verschreibung von einem Facharzt, Folgeverordnung vom Hausarzt',\n 'Sp/S': 'Verschreibung von einem Facharzt',\n 'Sp1/S':\n 'Erste Verschreibung von einem Facharzt, Folgeverordnung vom Hausarzt',\n 'IMP/Sp': 'Verschreibung von einem Facharzt',\n 'IMP/Sp1':\n 'Erste Verschreibung von einem Facharzt, Folgeverordnung vom Hausarzt',\n },\n },\n};\n","import { homeTranslations } from './components/home.translations'\nimport { prescriptionTranslations } from './components/prescription.translations'\nimport { medicationTranslations } from './components/medication.translations'\nimport { practitionerTranslations } from './components/practitioner.translations'\nimport { prescriptionVisibilityTranslations } from './utils/visibility-helpers.translations'\nimport { reimbursementTranslations } from './utils/reimbursement-helpers.translations'\nimport { prescriptionDurationTranslations } from './utils/prescription-duration-helpers.translations'\nimport { deliveryModusTranslations } from './utils/delivery-helpers.translations'\n\nexport const appTranslations = {\n fr: {\n home: homeTranslations.fr,\n prescription: prescriptionTranslations.fr,\n medication: medicationTranslations.fr,\n practitioner: practitionerTranslations.fr,\n prescriptionVisibilityHelper: prescriptionVisibilityTranslations.fr,\n reimbursementHelper: reimbursementTranslations.fr,\n prescriptionDurationHelper: prescriptionDurationTranslations.fr,\n deliveryModusHelper: deliveryModusTranslations.fr,\n },\n en: {\n home: homeTranslations.en,\n prescription: prescriptionTranslations.en,\n medication: medicationTranslations.en,\n practitioner: practitionerTranslations.en,\n prescriptionVisibilityHelper: prescriptionVisibilityTranslations.en,\n reimbursementHelper: reimbursementTranslations.en,\n prescriptionDurationHelper: prescriptionDurationTranslations.en,\n deliveryModusHelper: deliveryModusTranslations.en,\n },\n nl: {\n home: homeTranslations.nl,\n prescription: prescriptionTranslations.nl,\n medication: medicationTranslations.nl,\n practitioner: practitionerTranslations.nl,\n prescriptionVisibilityHelper: prescriptionVisibilityTranslations.nl,\n reimbursementHelper: reimbursementTranslations.nl,\n prescriptionDurationHelper: prescriptionDurationTranslations.nl,\n deliveryModusHelper: deliveryModusTranslations.nl,\n },\n de: {\n home: homeTranslations.de,\n prescription: prescriptionTranslations.de,\n medication: medicationTranslations.de,\n practitioner: practitionerTranslations.de,\n prescriptionVisibilityHelper: prescriptionVisibilityTranslations.de,\n reimbursementHelper: reimbursementTranslations.de,\n prescriptionDurationHelper: prescriptionDurationTranslations.de,\n deliveryModusHelper: deliveryModusTranslations.de,\n },\n}\n","export const DEFAULT_APP_LANGULAGE = 'fr'\nexport const CERTIFICATE_IDB_CONFIG = {\n DB_NAME: 'certificate-store',\n STORE_NAME: 'certificates',\n KEY_PATH: 'id',\n}\n\nexport const TOKEN_IDB_CONFIG = {\n DB_NAME: 'token-store',\n STORE_NAME: 'tokens',\n KEY_PATH: 'id',\n}\n","import { appTranslations } from './translations'\nimport { DEFAULT_APP_LANGULAGE } from '../constants'\nimport { SamText } from '@icure/api'\n\ntype SamLanguage = keyof SamText\n\nclass CardinalLanguage {\n private language: SamLanguage = DEFAULT_APP_LANGULAGE\n\n public setLanguage(language: SamLanguage): void {\n this.language = language\n }\n\n public getLanguage(): SamLanguage {\n return this.language\n }\n}\n\nexport const cardinalLanguage = new CardinalLanguage()\n\nexport const t = (key: string): string => {\n const getKeyValue = (collection: Record<string, any>, complexKey: string): string | undefined => {\n const keys = complexKey.split('.')\n let value: any = collection\n\n for (const k of keys) {\n if (value && typeof value === 'object' && k in value) {\n value = value[k]\n } else {\n return undefined\n }\n }\n\n return typeof value === 'string' ? value : undefined\n }\n\n return getKeyValue(appTranslations[cardinalLanguage.getLanguage()], key) ?? key\n}\n\nexport const getSamTextTranslation = (samText?: SamText): string | undefined => {\n if (!samText) {\n return undefined\n }\n const lang = cardinalLanguage.getLanguage() as SamLanguage\n const fallback = DEFAULT_APP_LANGULAGE as SamLanguage\n return samText[lang] ?? samText[fallback]\n}\n","import { cardinalLanguage } from '../i18n'\nimport { Amp, IccBesamv2Api, Nmp, PaginatedListAmp, PaginatedListNmp, PaginatedListVmpGroup, SamVersion, VmpGroup } from '@icure/api'\n\n/**\n * Search for medications matching the given query and language.\n * @param sdk Instance of the SamV2Api sdk\n * @param query Medication search query string\n * @returns Paginated lists of AMP, VMPGroup, and NMP matches\n */\n\nconst language = cardinalLanguage.getLanguage()\n\ninterface PaginatedList<K, T> {\n pageSize?: number\n totalSize?: number\n rows?: Array<T>\n nextKeyPair?: {\n startKey?: K\n startKeyDocId?: string\n }\n}\n\nexport class PaginatedListIterator<K, T> {\n private loader: (limit: number, startKey?: K, startDocumentId?: string) => Promise<PaginatedList<K, T>>\n private limit: number\n private hasNextPage: boolean | null\n private currentList: PaginatedList<K, T> | null\n\n constructor(loader: (limit: number, startKey?: K, startDocumentId?: string) => Promise<PaginatedList<K, T>>) {\n this.loader = loader\n this.limit = 20 // Default limit, can be adjusted\n this.hasNextPage = true\n this.currentList = null\n }\n\n async hasNext(): Promise<boolean> {\n if (this.hasNextPage === null) {\n this.currentList = await this.loader(this.limit)\n this.hasNextPage = this.currentList.rows && this.currentList.rows.length > 0\n }\n return this.hasNextPage\n }\n\n async next(limit: number): Promise<Array<T>> {\n if (this.hasNextPage === null || !this.hasNextPage) {\n throw new Error('No more pages available')\n }\n\n if (!this.currentList) {\n this.currentList = await this.loader(limit)\n }\n\n const rows = this.currentList.rows || []\n this.hasNextPage = !!this.currentList.nextKeyPair && rows.length === limit\n\n // Prepare for the next call\n if (this.hasNextPage) {\n const nextKey = this.currentList.nextKeyPair?.startKey\n const nextDocumentId = this.currentList.nextKeyPair?.startKeyDocId\n this.currentList = await this.loader(limit, nextKey, nextDocumentId)\n } else {\n this.currentList = null\n }\n\n return rows\n }\n}\n\nexport const findMedicationsByLabel = async (\n sdk: IccBesamv2Api,\n query: string,\n): Promise<[PaginatedListIterator<string, Amp>, PaginatedListIterator<string, VmpGroup>, PaginatedListIterator<string, Nmp>]> => {\n try {\n return await Promise.all([\n new PaginatedListIterator<string, Amp>((limit: number, startKey: string, startDocumentId: string) => {\n return sdk.findPaginatedAmpsByLabel(language, query, startKey ? JSON.stringify(startKey) : undefined, startDocumentId, limit)\n }),\n new PaginatedListIterator<string, Amp>((limit: number, startKey: string, startDocumentId: string) => {\n return sdk.findPaginatedVmpGroupsByLabel(language, query, startKey ? JSON.stringify(startKey) : undefined, startDocumentId, limit)\n }),\n new PaginatedListIterator<string, Amp>((limit: number, startKey: string, startDocumentId: string) => {\n return sdk.findPaginatedNmpsByLabel(language, query, startKey ? JSON.stringify(startKey) : undefined, startDocumentId, limit)\n }),\n ])\n } catch (error) {\n console.error('Error in findMedicationsByLabel:', error)\n throw error\n }\n}\n\n/**\n * Fetch the current version information for the SAM database.\n */\nexport const fetchSamVersion = async (sdk: IccBesamv2Api): Promise<SamVersion | undefined> => {\n try {\n return await sdk.getSamVersion()\n } catch (error) {\n console.error('Error in fetchSamVersion:', error)\n return undefined\n }\n}\n","export class IndexedDbServiceStore<T> {\n private readonly db: Promise<IDBDatabase>\n private readonly config: {\n DB_NAME: string\n STORE_NAME: string\n KEY_PATH: string\n }\n\n constructor(config: { DB_NAME: string; STORE_NAME: string; KEY_PATH: string }) {\n this.config = config\n this.db = new Promise((resolve, reject) => {\n const request = indexedDB.open(this.config.DB_NAME, 1)\n\n request.onupgradene