0.6.1 • Published 4 days ago

@claudebernard/prescription-scanner-element v0.6.1

Weekly downloads
-
License
-
Repository
-
Last release
4 days ago

\ element

An element providing a medical prescription scanner and analyzer.

Installation

npm install --save @claudebernard/prescription-scanner-element

Usage

Script

Import as ES modules:

import '@claudebernard/prescription-scanner-element';

With a script tag:

<script type="module"
        src="node_modules/@claudebernard/prescription-scanner-element/dist/prescription-scanner.js"></script>

HTML

<bcb-prescription-scanner apiurl="https://api.claudebernard.fr"></bcb-prescription-scanner>

Attributes

NameTypeDefaultDescription
apiurlURLhttps://pim.cegedim-sante.comAPI base URL to call to scan prescriptions
apikeyUUIDnoneAPI key authentication. Preferred method is to set up a proxy on your side that will add this API key header : in this case, don't provide any value here.
langStringfr-FRUI display locale. Available: - French (France): fr-FR - English: en
modelStringPROTOTYPEAI model to use. Available: -Prototype for experimentation: PROTOTYPE -Phealing model: PHEALING
fileUploadIdStringnoneId of a pre uploaded file through the Upload API. e.g: 'f7cece89-da44-4cd5-8eb7-48be56dd0c8a'
selection-disabledBooleanfalseDisable selection of prescription items. Also hides checkboxes
analysis-fixing-disabledBooleanfalseDisable the prescription item menu action of fixing the analysis of medication
dosage-edition-disabledBooleanfalseDisable the prescription item menu action of editing the detected dosages
prescription-item-deletion-disabledBooleanfalseDisable the prescription item menu action of deleting a prescription item
findMedicationFindMedicationFunctionBCB search medication functionFunction to call to find a medication. See FindMedicationFunction
formatMedicationLabelFormatMedicationLabelFunctionFormatting medication label functionFunction to format the medication label. See FormatMedicationLabelFunction

FindMedicationFunction

Example of a findMedication function to call to find a medication:

async function findMedication(term) {
    const response = await fetch("https://my-medication-api.com/search?term=" + term);
    const fhirMedications = response.json();
    return fhirMedications;
} 

FormatMedicationLabelFunction

Example of a formatMedicationLabel function to format the medication label:

function formatMedicationLabel(medication: Medication): string | undefined {
    const cip13Label = medication.code?.coding?.find(coding => coding.system === SystemURL.CIP13_CODE.toString());
    let someOtherLabel;
    let someUnit;
    // some actions ...
    const medicationLabel = `${cip13Label} (${someOtherLabel}) : ${someUnit}`;
    return medicationLabel ?? "";
}

enum SystemURL {
    CIP13_CODE = "http://terminology.hl7.org/CodeSystem/cip13-code",
    // ...some other coding systems...
}

Events

NameTypeFormatDescription
new-bundleBundleEvent{ bundle: Bundle }A new bundle has been collected. See 'Bundle' FHIR resource
bundles-filteredBundlesEvent{ bundles: Bundle[] }A bundle has been filtered (check or uncheck prescription items). See 'Bundle' FHIR resource
bundles-updatedBundlesEvent{ bundles: Bundle[] }A bundle has been updated by a user action. See 'Bundle' FHIR resource

Browser support

Browsers without native custom element support require a polyfill.

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge

Custom element checklist

  • Public documentation (docs portal)
  • Functional on Angular, React, Vue
  • Unit tested
  • Code quality
  • Changelog with semantic release
  • Available in offline mode
  • Best practices compliant
  • Validated by QA
  • Publicly available
  • Based on FHIR
  • Example on storybook
  • Available demo
  • i18n
  • Browser support section
  • EOL section

License

Copyright of Cegedim. See LICENSE for details.

0.6.1

4 days ago

0.6.0

8 days ago

0.5.2

24 days ago

0.5.1

1 month ago

0.5.0

2 months ago

0.4.0

3 months ago

0.3.0

4 months ago

0.3.0-rc.0

4 months ago

0.3.0-rc.1

4 months ago

0.2.2-ft-315.13

4 months ago

0.2.2-ft-315.12

4 months ago

0.2.2-ft-315.11

4 months ago

0.2.2-ft-315.10

4 months ago

0.2.2-ft-315.16

4 months ago

0.2.2-ft-315.15

4 months ago

0.2.2-ft-315.14

4 months ago

0.2.2-ft-315.9

4 months ago

0.2.2-ft-315.3

4 months ago

0.2.2-ft-315.4

4 months ago

0.2.2-ft-315.8

4 months ago

0.2.2-ft-315.5

4 months ago

0.2.2-ft-315.6

4 months ago

0.2.2-ft.315

4 months ago

0.2.2-ft-315.1

4 months ago

0.2.2-ft-315.2

4 months ago

0.2.2-ft-315.0

4 months ago

0.2.1

4 months ago

0.0.32

4 months ago

0.2.0

4 months ago

0.1.0-rc.2

4 months ago

0.1.0

4 months ago

0.1.0-rc.0

5 months ago

0.0.31

5 months ago

0.0.30

6 months ago

0.0.29

6 months ago

0.0.28

6 months ago

0.0.27

6 months ago

0.0.26

6 months ago

0.0.25

6 months ago

0.0.24

7 months ago

0.0.23

7 months ago

0.0.22

7 months ago

0.0.21

7 months ago

0.0.20

7 months ago

0.0.19

7 months ago

0.0.18

7 months ago

0.0.17

7 months ago

0.0.16

7 months ago

0.0.15

7 months ago

0.0.14

7 months ago

0.0.13

7 months ago

0.0.12

7 months ago

0.0.11

7 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago