I have a siruation that I am unsure of the best approach to solving.
I have to create a record (Template) for assigning contract terms based on line item detail / Relationships.
To start I have a form with line multiple fields and related line items. In some cases the the related line items per form may exceed several hundred records.
After a template and associated line itmes are created, there will be a number of templates a user can choose from to assign to an account.
So when the user finds the template they want , I want to add the template fields and associated line items to 2 different tables.
These 2 additional tables will store the contract information for the account by assigning the account number and other config info. The user can then edit any additional information after the records are transferred to the new tables that are related to the account.
I was not sure the most effiecient way to transfer template records to the records to the 2 new tables. Since there may be a large amout of line items
A) I considered maybe just importing the records then looping or replacing related account ID’s and configuration codes
B) Looping through the records and assigning them config info during the transfer
C)Creating duplicate sets and looping through the records or using a replace function to assign config info.
I was just looking at what might be the best approach. This is an operation that will not be on a daily basis, more of an occasional basis.
Thanks,
Erich
Erich,
One option would be to keep the template and the assigned “account” forms in the same tables. Templates could be marked with a check field (integer 1 or 0, default 1 for template). By doing it this way, you can just duplicate the template and related items, set the “template” field to 0 and set an “account_id” field to relate the template to the account. To duplicate the template and related items see this post by Johan:
http://forum.servoy.com/viewtopic.php?p=15696#15696
The issue I have is that every account has a unique Contract configuration record and line items. The reason for the template is to be able to import a scheme then add / modifily / delete line items after the transfer.
Basically, I have about 3000 accounts (will triple). Due to the completexity of various contract formats, and Purchasing Groups (hospital groups/Accounts are assigned to). Each account within a group could be a part of the same contract but have completely differnt contract terms. Each account can have different contract terms per Service Classification (Dept). Percentage / itemized with exceptions / flat rate / volume based/ etc..
Above and beyond that, Group member can be assigned to a new or different existing group under a different structure. Also contract terms for the group could change. This is why the template concept seems to be a appealing concept and easier to manage.
So when service codes are entered, depending on the account contract terms, the correct pricing and discounts are applied. Eccesntially this can only be accomplished by having the ability to create a complete or partial price list per account per Service Class (Dept).
This may sound a bit confusing and it’s a nightmare to report on for the hospital Groups and well as manage through a cenralized pricing table.
You should see the commision structue, there are 20 different variables from 14 tables, fun stuff!
This is why Filemaker could not keep up, Servoy has givin me the capability to accomplish anything. I will never say “it can’t be done”, now and can add features that will probably result in half the departments needing less people (not sure if thats a good thing).
So it seems that assigning the template a global accout number (which I am already doing) and duplicating the records sounds like the most efficeint way to go.
Thanks