Create Sale
Register Sales (Visits)
Last updated
Was this helpful?
Register Sales (Visits)
Last updated
Was this helpful?
When you create a Sale object, behind the scenes you also create, modify or link it to an existing Patient.
You can link the Sale to an existing Patient in which case you omit any other data for the patient. It is done by patient ID (primary key in the database) as following:
It is not allowed to link a Sale to an existing anonymous Patient! See for more details.
The most common way to deal with Patients is to invoke Sale creation with all the data for the Patient and leave iLab to care about creation or modification.
Example Patient object in the Sale:
Referring Doctor is the one, who sends the Patient to the laboratory. Some Sale Schemas requires pointing the doctor, whereas other - not. Usually, there is a special doctor (with a family name 'Unknown') which is used when Sale Schema requires a doctor, but it is unknown.
Just like the Patient, when you create Sale and desired Sale Schema requires Dcotor, you create, modify or link a Doctor object.
There are many settings of the system instance that set default values of different fields. So you can omit them to simplify your invocations and leave the fields to their defaults.
Here is the simplest example which exploits many default values and registers a Sale. The Patient is anonymous, Sale Schema is by default, and if Doctor is required - it is also the one by default.
Here is an example with an anonymous Patient and full data for referring Doctor.
TODO
In the example above, iLab will lookup for a Patient with 4 (ЕМБГ) and PID 1403978412131. If such a Patient exists, iLab will compare non-calculated fields (in this case only names) and if there are some differences, it will update the existing Patient. If no differences are found, iLab will just link the Sale with the existing Patient. If no such Patient is found, it will be created. Calculated fields (date of birth and gender in the given case) will be ignored.