0.1.19 • Published 3 months ago

hola-test-dinesh v0.1.19

Weekly downloads
-
License
SEE LICENSE IN Re...
Repository
-
Last release
3 months ago

Hola Rx widget is for commercial use and you need a commercial license. Please contact hello@hola.health for more details.

Introduction 🛫

Hola Rx is an electronic prescribing widget and easy to send referrals that can be easily added to any Telehealth, PMS and Web system. Hola Rx is designed and built as per the Electronic Prescribing Conformance stipulated by the Digital Health agency.

Licenses

You need a commercial license to use the Hola Rx widget. Please write to hello@hola.health for more details.

How to use

#1. Installation

Hola Rx is hosted as a package in a private NPM.

npm i @packapilldev/hola-rx

#2. Methods

Method NameDescription
initInitializes the widgets and handshakes with the server
openNewRxOpens up the new Rx widget
openEditRxOpens up the Rx widget for editing script
openReferralOpens up the Referral widget
downloadRxDownloads the Paper prescription as PDF
downloadReferralDownloads the Referral as PDF

#3. Initialize

You need to initialize the widget using the init method with the provided ClientId, ClientSecret and sandbox (boolean) before invoking the widgets.

//import the package to the appmodule
import { HolaRxModule } from '@packapilldev/hola-rx';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,HolaRxModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
//app.component.ts - import the package in your component page

import { Component, OnInit, ViewChild } from '@angular/core';
import { HolaRx } from '@packapilldev/hola-rx';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  @ViewChild("rxwidget", { static: true }) widget!: HolaRx;
  
  this.widget.init(ClientID, ClientSecret, sandbox).subscribe((res:any)=>{
      console.log(res);
  });
}

#4. Open Rx Widget to issue a new script

Invoking an Rx widget for a new script for the first time, needs the practice, the practitioner and the patient details. 

#4.1. openNewRx - Opens up a new Rx widget popup.
npm.io

#4.1.1. Input Parameters - Common
Property NameFriendly NameTypeMandatoryDescription
consultationidConsultation IdvarcharYesVendor's unique identifier for the consultation
practiceidPractice IdvarcharConditionalVendor's unique identifier for the practice/pharmacy
practitioneridPractitioner IdvarcharConditionalVendor's unique identifier for the practitioner/pharmacist
patientidPatient IdvarcharConditionalVendor's unique identifier for the patient
practicePracticeentityConditionalRefer Practice Entity
practitionerPractitionerentityConditionalRefer Practitioner Entity
patientPatiententityConditionalRefer Patient Entity
rxidRx IdintConditionalHola Rx supplied identifier of the script
referralidReferral IdintConditionalHola Rx supplied identifier of the referrals
#4.1.2. Input Parameters - Practice Entity
Property NameFriendly NameTypeMandatoryDescription
idIdvarcharYesVendor's unique identifier for practice
nameNamevarcharYesPractice name
emailEmailvarcharYesPractice email address
phonePhoneentityYesPractice contact phone number
timezoneTimezonevarcharYesTimezone of practice. Acceptable values are “Australia/Perth”, “Australia/Eucla”, “Australia/Darwin”, “Australia/Brisbane” , “Australia/Adelaide” , “Australia/Sydney” , “Australia/Lord Howe Island”
addressAddressentityYesRefer Address Entity
hpioHPI-Oint (16 digits)ConditionalHealth Professional Identifier-Organization identifier of the practice. This is mandatory for sending eScripts.
consentConsentboolYesPractice consent to create/update the practice. Accepts “true” or “false”
#4.1.3. Input Parameters - Practitioner Entity
Property NameFriendly NameTypeMandatoryDescription
idIdvarcharYesVendor's unique identifier for practitioner
firstnameFirst NamevarcharYesPractitioner's first name
lastnameLast NamevarcharYesPractitioner's last name
genderGendervarcharYesBirth gender of the practitioner. Accepts “M”, “F” and “NA”.
dobDate of Birthdate (yyyy-mm-dd)YesDate of the birth of the practitioner
emailEmailvarcharYesPractitioner email address
mobile_phoneMobile NumbervarcharYesPractitioner contact mobile number. Format is 0412345678
timezoneTimezonevarcharYesTimezone of practice. Acceptable values are “Australia/Perth”, “Australia/Eucla”, “Australia/Darwin”, “Australia/Brisbane” , “Australia/Adelaide” , “Australia/Sydney” , “Australia/Lord Howe Island”
addressAddressentityYesRefer Address Entity
registrationnumberRegistration NumbervarcharYesAHPRA registration of the practitioner
prescribernumberPrescriber NumberintYesPrescriber number of the practitioner
providernumberProvider NumbervarcharYesProvider number of the practitioner
hpiiHPI-Iint (16 digits)ConditionalHealth Professional Identifier-Individual. This is mandatory for sending eScripts.
signature_imageSignature Imagebase64ConditionalDigital Signature of the practitioner. This is mandatory for sending pathology referrals. This can be added to the paper script as well.
entity_ideRx Entity IDvarcharYesPhysician eRx entity ID
consentPractice ConsentboolYesPractitioner consent to create/update the practitioner. Accepts “true” or “false”
#4.1.4. Input Parameters - Patient Entity
Property NameFriendly NameTypeMandatoryDescription
idIdvarcharYesVendor's unique identifier of patient
firstnameFirst NamevarcharYesPatient's first name
lastnameLast NamevarcharYesPatient's last name
genderGendervarcharYesBirth gender of the patient. Accepts “M”, “F” and “NA”.
dobDate of Birthdate (yyyy-mm-dd)YesDate of the birth of the patient
emailEmailvarcharYesPatient email address
mobile_phoneMobile NumbervarcharYesPatient contact mobile number. Format is 0412345678
timezoneTimezonevarcharYesTimezone of practice. Acceptable values are “Australia/Perth”, “Australia/Eucla”, “Australia/Darwin”, “Australia/Brisbane” , “Australia/Adelaide” , “Australia/Sydney” , “Australia/Lord Howe Island”
addressAddressentityYesRefer Address Entity.
medicareMedicareentityConditionalEither Medicare or IHI or Address is mandatory to send eScripts. Refer Medicare Entity.
ihiIHIint (16 digits)ConditionalIndividual Health Identifier of the patient. Either Medicare or IHI or Address is mandatory to send eScripts.
escript_consentEScript ConsentboolYesPatient's consent to send eScripts. Accepts “true” or “false”
#4.1.5. Input Parameters - Address Entity
Property NameFriendly NameTypeMandatoryDescription
addressline1Address Line 1varcharYesAddress Line 1
addressline2Address Line 2varcharNoAddress Line 2
suburbSuburbvarcharYesSuburb
postcodePost CodeintYesValid Australian post code
stateState Short CodevarcharYesAustralian state short codes. Accepts “SA”, “TAS”, "VIC", "WA", "NT", "ACT", "NSW", "QLD"
#4.1.6. Input Parameters - Medicare Entity
Property NameFriendly NameTypeMandatoryDescription
numberNumberintYesMedicare number
referenceReferenceintYesMedicare individual reference number
expiryExpirydate (mm/yyyy)YesMedicare expiry
#4.1.7. Output Parameters - Rx response
Property NameFriendly NameTypeDescription
consultationidConsultation IdvarcharVendor's unique identifier for the consultation
practiceidPractice IdvarcharVendor's unique identifier for the practice/pharmacy
practitioneridPractitioner IdvarcharVendor's unique identifier for the practitioner/pharmacist
patientidPatient IdvarcharVendor's unique identifier of patient
rxRxentityRefer Rx entity
statusStatusvarcharResponse status. Return values are “success” or “error”
errorErrorentityRefer Error entity (may contain multiple values)
responseResponseentityRefer Response entity
#4.1.8. Output Parameters - Rx Entity
Property NameFriendly NameTypeDescription
idIdintHola Rx supplied identifier of the script
nameNamevarcharDrug name
generic_nameGeneric NamevarcharDrug's generic name
instructionsInstructionsvarcharMedication Instructions
quantityQuantityintDrug quantity
repeatsRepeatsintDrug repeats if there is any.
scidSCIDvarchareRx script/token identifier
typeTypevarcharType of script. it returns "paper" for paper prescription or “escript” for eScripts
stateStatevarcharReturns the state of the Rx. Possible values are “draft”, “prescribed”, “ceased” and “cancelled”
#4.1.9. Output Parameters - Error Entity
Property NameFriendly NameTypeDescription
error_codeError CodevarcharIdentifier of the error
error_messageError MessagevarcharHigh level overview of the error
#4.1.10. Output Parameters - Response Entity
Property NameFriendly NameTypeDescription
response_codeResponse CodevarcharIdentifier of the response (reserved for future)
response_messageResponse MessagevarcharHigh level overview of the response

Code Snippets

details = {
    consultationid: "1",
    practiceid: "",
    practitionerid: "",
    patientid: "",
    referralid: "",
    rxid: "",
    practice: {
      id: "225",
      name: "MedAdvisor1",
      email: "noreply@hola.health",
      phone: "0412345678",
      timezone: "Australia/Perth",
      address: {
        addressline1: "79 St Georges Terrace",
        addressline2: "",
        suburb: "Perth",
        postcode: "6000",
        state: "WA"
      },
      hpio: "8003627500000328",
      consent: true
    },
    practitioner: {
      id: "225",
      firstname: "Jane",
      lastname: "Blogs",
      gender: "M",
      dob: "1970-01-01",
      email: "noreply@hola.health",
      mobile_phone: "0412345678",
      timezone: "Australia/Perth",
      address: {
        addressline1: "79 St Georges Terrace",
        addressline2: "",
        suburb: "Perth",
        postcode: "6000",
        state: "WA"
      },
      registrationnumber: "",
      prescribernumber: "1278451",
      providernumber: "",
      hpii: "8003610833334093",
      signature_image: "",
      entity_id:"AB123",
      consent: true
    },
    patient: {
      id: "225",
      firstname: "James",
      lastname: "Jayaraj",
      gender: "M",
      dob: "1970-01-01",
      email: "noreply@hola.health",
      mobile_phone: "0412345678",
      timezone: "Australia/Perth",
      address: {
        addressline1: "23 Narrow Lane",
        addressline2: "",
        suburb: "Mannum",
        postcode: "5238",
        state: "SA"
      },
      medicare: {
        number: "2950249921",
        reference: "1",
        expiry: "01/2022"
      },
      ihi: "8003608500012216",
      escript_consent: true
    }
}

this.widget.openNewRx(this.details).subscribe((res:any)=>{
    console.log(res);
});

#5 Open Rx Widget to edit a script

Invoking an Rx widget for editing a script only needs the patient ID, practice ID, practitioner ID and rx ID. However, it does accept full parameters as mentioned in #4 above to update any of the details.

#5.1. openEditRx - Opens up a Rx widget popup in Edit mode.

npm.io

Code Snippets

details = {
    consultationid: "1",
    practiceid: "",
    practitionerid: "",
    patientid: "",
    referralid: "",
    rxid: ""
}

this.widget.openEditRx(this.details).subscribe((res:any)=>{
    console.log(res);
});

#6 Open Referral Widget to send pathology referrals

Invoking the Referral widget for sending referrals to the patient for the first time, needs the practice, the practitioner and the patient details. If the details are initialized earlier, you can send only the patient ID, practice ID and practitioner ID.

#6.1. openReferral - Opens up the referral widget popup.

npm.io

#6.1.1. Output Parameters - Referral response
Property NameFriendly NameTypeDescription
consultationidConsultation IdvarcharVendor's unique identifier for the consultation
practiceidPractice IdvarcharVendor's unique identifier for the practice/pharmacy
practitioneridPractitioner IdvarcharVendor's unique identifier for the practitioner/pharmacist
patientidPatient IdvarcharVendor's unique identifier of patient
referralReferralentityRefer Referral entity
statusStatusvarcharResponse status. Return values are “success” or “error”
errorErrorentityRefer Error entity (may contain multiple values)
responseResponseentityRefer Response entity
#6.1.2. Output Parameters - Referral Entity
Property NameFriendly NameTypeDescription
idIdintHola Rx supplied identifier of the referral
testTestvarcharTest to be conducted
clinical_notesClinical NotesvarcharClinical notes for the referral request
#6.1.3. Output Parameters - Error Entity
Property NameFriendly NameTypeDescription
error_codeError CodevarcharIdentifier of the error
error_messageError MessagevarcharHigh level overview of the error
#6.1.4. Output Parameters - Response Entity
Property NameFriendly NameTypeDescription
response_codeResponse CodevarcharIdentifier of the response (reserved for future)
response_messageResponse MessagevarcharHigh level overview of the error

Code Snippets

details = {
    consultationid: "1",
    practiceid: "",
    practitionerid: "",
    patientid: ""
}

this.widget.openReferral(this.details).subscribe((res:any)=>{
    console.log(res);
});

#7 Downloads

#7.1. downloadRx - Downloads the paper prescription by rxid in PDF format. It can be used to link the prescription from the front-end.

#7.1.1. Output Parameters - Download Rx response
Property NameFriendly NameTypeDescription
statusStatusvarcharResponse status. Return values are “success” or “error”
errorErrorentityRefer Error entity (may contain multiple values)
responseResponseentityRefer Response entity
#7.1.2. Output Parameters - Error Entity
Property NameFriendly NameTypeDescription
error_codeError CodevarcharIdentifier of the error
error_messageError MessagevarcharHigh level overview of the error
#7.1.3. Output Parameters - Response Entity
Property NameFriendly NameTypeDescription
response_codeResponse CodevarcharIdentifier of the response (reserved for future)
response_messageResponse MessagevarcharHigh level overview of the response

Code Snippets

this.widget.downloadRx(this.rxId).subscribe((res:any)=>{
    console.log(res);
});

#7.2. downloadReferral - Downloads the pathology referral form by referralID in PDF format.

Same as #7.1.1, #7.1.2, and #7.1.3 output parameters.

Code Snippets

this.widget.downloadReferral(this.referralId).subscribe((res:any)=>{
    console.log(res);
});

© 2024 Hola Health, a brand of Packapill Pty Ltd | v 0.1.16 |

0.1.16

3 months ago

0.1.18

3 months ago

0.1.19

3 months ago

0.1.15

6 months ago

0.1.14

6 months ago

0.1.13

6 months ago

0.1.12

6 months ago