024967 Changes to existing webservices

1.               Overview

 

KCSL have enhanced PDO’s prescription webservices.

 

2.     Specification

Requirement from the development item:

Changes to existing webservices to allow:

 

-              Creation of prescription and prescription lines

-              Update of prescription and or prescription lines

-              Removal of prescription and prescription lines

-              Removal of prescription lines only

 

-              Allow for the following fields to be updated Header

o             Prescription Note (If update then append, don’t replace)

-              Allow for the following fields to be updated Detail

o             Label_Dosage

o             Label_Important_Infomation

 

 

Requirements to sign off

-              Detail on new Webservice calls including Revised XML examples for calls and responses.

-              Outline As Is and To Be state for prescription.

-              Outline what automation happens on what fields and the logic / trigger

-              Outline checks which are made on Invoice Priority change.

 

Changes that KCSL will be making:

New webservice call to update an existing prescription. The call will provide Company code and prescirption code.

For prescription lines, system will provide prescription item ID (PITEM_ID).

KCSL will change the prescription export to export these item IDs.

If a line has a blank item ID, the system will import it as a new prescription line.

 

Modification to the existing prescription import. If no prescription code provided, do the existing behaviour of creating a new prescription. If code is provided, prescription must exist and will be edited

.

Remove of prescriptions. New webservice call to remove prescription lines and/or entire prescription. System will provide the company code, prescription code, then either a list of lines (PITEM_IDs) to remove, or a flag to say entire prescription is removed. Error if neither option is set, error if code/IDs not found.

 

KCSL will make sure edits trigger behaviour same as before the change, which should be the case when making the edits using the objects, which is the existing import behaviour.

 

3.               Configuration

An update will be applied as part of this development. Further configuration steps are as follows.

 

3.1 ExportPrescriptions Webservice Call.

This function has been amended to include additional information.

Prescription Level.

<PRESCRIPTION_NOTE>

<APPROVED_USER_ID>

<DATE_UPLOADED>

<UPLOAD_USER_ID>

<SCRIPT_HELD>

Prescription Item Level.

<PITEM_ID>

<LABEL_DOSAGE>

<LABEL_IMPORTANT_INFO>

 

3.2 ImportPrescriptions Webservice Call.

This function has been amended with additional calls.

 

Prescription Levels.

<PRESCRIPTION_NOTE>?</PRESCRIPTION_NOTE>

<APPROVED_USER_ID>?</APPROVED_USER_ID>

<DATE_UPLOADED>?</DATE_UPLOADED>

< UPLOAD_USER_ID >?</UPLOAD_USER_ID>

<SCRIPT_HELD>?</SCRIPT_HELD>

Field Name.

Description.

Example.

PRESCRIPTION_NOTE

Note text for the prescription.

Prescription Note

APPROVED_USER_ID

ID of the Khaos Control user who approved the prescription.

5

DATE_UPLOADED

Date the prescription was uploaded.

2024-11-07

UPLOAD_USER_ID

ID of the Khaos Control user who uploaded the prescription.

5

SCRIPT_HELD

Should the prescription be marked as ‘Script Held’

0 or -1

 

Prescription Item Levels.

<PITEM_ID>?</PITEM_ID>

<LABEL_DOSAGE>?</LABEL_DOSAGE>

<LABEL_IMPORTANT_INFO>?</LABEL_IMPORTANT_INFO>

Field Name.

Description.

Example.

PITEM_ID

Prescription item to be updated.

100

LABEL_DOSAGE

Prescription item label dosage.

1

LABEL_IMPORTANT_INFO

Prescription item note.

Label Note

 

3.3 RemovePrescriptionItems Webservice Call.

This is an entirely new function.

An example of the fields are:

       <CompanyCode xsi:type="xsd:string">?</CompanyCode>

        <PrescriptionCode xsi:type="xsd:string">?</PrescriptionCode>

         <ItemIDs xsi:type="xsd:string">?</ItemIDs>

         <RemoveEntirePrescription xsi:type="xsd:boolean">?</RemoveEntirePrescription>

 

Field Name.

Description.

Example.

CompanyCode

Code of the company to have prescriptions or prescription items removed from.

AH

PrescriptionCode

Code for the Prescription to be removed/amended.

195

ItemIDs

IDs for the prescription item(s) to be removed.

242,243

RemoveEntirePrescription

Should the entire prescription be removed. (Will only do so if the prescription has not already been used against a sales order).

0 or -1

  

4.     Usage

After applying the above Configuration, typical steps for usage would include the following.

 

4.1 The ExportPrescriptions webservice call can be used to provide the new information fields, including the Prescription Item IDs.

 

4.2 The ImportPrescriptions webservice call can be used to create/update prescriptions including the new information fields.

In addition, the Prescription Item ID (from the ExportPrescriptions call)  can be used to update specific prescription items.

 

4.3 The RemovePrescriptionItems webservice calls can be used to remove prescription items or entire prescriptions. As long, as the prescription items are not already linked to existing Sales Orders with Khaos Control.

 

 

 

 



Did you find this article helpful?