Supplier JXPATH

Hey all

Struggling with a bit of JXpath

So currently almost all the Investigation forms I have seen require a practice to edite the form and manually put in the clinic account id for that supplier (lab)

I was looking for a good way to insert it dynamically

supplier:accountId(openvpms:get(openvpms:get(openvpms:get(.,'documentTemplate'),'investigation'), 'supplier.entity), $OpenVPMS.location)

The problem is that the dynamic form you get is linked to a service usually which doesn't have a supplier.   The supplier is found linked to the parent investigation.  

The above doesnt work ...I know that just wondering aside from using the supplier Id which will vary practice to practice anyone got a good way?

 

Sincerely 

Ben

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Supplier JXPATH

Does the following work?

supplier:accountId(openvpms:get(., 'investigationType.entity.supplier.target'), $OpenVPMS.location)

This bit gets the supplier from the investigation, assuming there is one:

     openvpms:get(., 'investigationType.entity.supplier.target')
Syndicate content