Framework Question
Submitted by Ben_Charlton on Tue, 10/03/2015 - 12:51
There was an old PDF floating wround which outlined the Framework for OpenVPMS it used to be on the website but it has since vanished?
Second question
Is it possible for a clinical eventitem to link 2 patients?
Or is it possible to create a field on a clinical event that links in the patients? and avoiding adding 2 to the primary link.
Re: Framework Question
Don't recall such a document, but it would be very much out of date.
You could link another patient by creating a new participation, which is essentially the same as participation.patient, but with a different archetype short name.
Re: Framework Question
Yep so by that you mean the Act would have 2 nodes detailing a participation.patient.
Because a participation can only link 1 entity according to the framework.
What I ideally was trying to do was have a node that could hold a Participation set. IE add an unlimited number of patients then return them for parsing in a document.
Its possible but not without changing framework, which I want to avoid for the purposes of this patch.
Re: Framework Question
What are you trying to achieve?
You should be able to have multiple patients, simply by specifying the maxCardinality of the node. I suspect it won't result in what you want however:
When editing acts for a particular patient, typically you want it to be automatically populated with the current patient, and this should be hidden from the user.
You would then use a different participation for the second patient.
Re: Framework Question
Thanks yeah the issue for me is that an export act may have anything from 1 to ∞ patients in theory (most often 1-3)
Thus the issue is that using single participations where the participation has only 1 entity linked per node falls apart or becomes unweildy early.
Its the nature of the framework design here that fails me - it was designed so that patients have participations not the other way round.
What am I trying to achieve. A large part of the practice I design for is export work. This involves sending consignments of animals overseas
a consignment becomes the act.patientexport
the owner in this case is the exporter, the act may also have a string field to detail out the origin address which may be the real owner and a destination address which may be the real owner.
I made the election early that adding real owners as entities was unwieldy as they are single instances and are deactivated after 1 visit and dont usually have any financial records.
by your example above I would simply adjust the participation.otherpatient to have minCard=0 and maxCard=* as per a Entityrelationship.patient*
I think the Layout will need a lot of work to make this work Ill give it a go.
Re: Framework Question
You can model using consignments acts and participations. I would suggest creating a new workspace for managing consignments however, as patient history acts are only designed to have a single patient.
For the exporter and importer you can model these using parties. This way, you get the contact information for free. For the exporter, just use party.customerperson - presumably they are already in the system.
For the importer, create a new party.importer, which you can loosely base on party.customerperson. You'll need a new workspace to query these.
Your act is then something like:
Re: Framework Question
Is it possible to return a list object using the list functions like so? As far as I can determine it should work, returning null if the key is outside the list bounds.
I am wondering if its possible to perform a return and process a list of objects (in my case patients) and produce a table style result through formating in OpenOffice.
export:getpatients(.) in theory returns an object list
ie
Ben
Re: Framework Question
You should be able to use a predicate on the returned collection to access each patient:
The patient names would then be accessed using:
Re: Framework Question
Thanks,
I assume that will work on a Set<Party>
and you could use party rules
such as
party:getMicrochips(export:getpatients(.)[1])
Cheers
Ben
Re: Framework Question
Not sure about sets - try it. If it doesn't work, convert it to a list first.
Note that unless you are a SortedSet, so you might get different results each time you invoke [1] and [2].
You could order them first using:
Re: Framework Question
In that case I will just ensure its sorted on patient.id before its returned.
Re: Framework Question
Following up this project - I have a semi working system but have a few issues
Issue 1
I created the party.importer archetype but I the browser is a bit basic...IE only create NEW cant Edit or Delete/Inactivate... I thought I could just pilfer an existing browser leveraging the entitybrowser but seems that wont work. So I plan on building my own based on the customerbrowser
Issue 2
act.customerExports can have items linked in the form of forms letter and attachments
which have act.exportDocumentForm etc etc attached via a actRelationship
I have build rules and functions to return the data in these documents from the underlying act.
However I have quickly found out the system doesnt process my documents through the JXPATH processors during generation. In effect by OpenOffice Docs never get processed by the Reporter.
I must have missed a linkage somewhere
Breifly
I have created a Customer Export Workspace
which queries exports linked to that customer and then opens them in a window which is done by an extension of actCRUDWindow
The documents are automatically populated by the creation of tabs, at this stage 1 for patients and 1 for records. Records can be forms/letters/attachments at this stage, but I may extend it later to add notes.
The records(docs) are displayed in a table and clicking on a record displays its detail
However the a the doc templates are not being processed by JXPATH on load...
any tips?
Re: Framework Question
Re: Framework Question
Yep re issue 1 I figured as much....
with regard to issue 2
I assumed I could just declare in the ReporterFactory.properties.
but there is more too it than that -- the documents generate fine but they arent parsed for expressions at all
the output
Re: Framework Question
Sounds like its downloading the template rather than the document.
DocumentActDownloader is responsible for downloading document acts, and can download the document, generating it if there is only a template present. It can also be used to download the template associated with a document act.