cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure Unity scripts for Bar code Processing

Panchanathan_Th
Champ on-the-rise
Champ on-the-rise

Hi All,

I have tried to add the Bar Code values to keywords by Unity scripts(Data Capture server) and its behaving differently.For example My batch have 3 documents(3 patient records) and each document have multiple pages(Document 1 have 5 pages, document 2 and 3 have 4 pages) as well. I am using "Patch Code" for Document separation.

Document 1 : Have 3 bar codes from different pages (page 1,3 and 4)

Document 2: Have  2 bar codes from different pages 

Document 3 : Have  1 bar code on the first page

All these above mentioned bar codes are placed on the same position of each pages (Top-Right corner of each pages)

When i tried to Add the keyword "Patient MRN" from the Bar code value through the unity scripts(IScanQueueBarcodeProcessingUnity)  as given below, The Patient MRN Keywords got added but the main problems are described below

1. 3 Patient MRN keywords got added for document 1 (It is expected as the Document 1 have 3 bar codes from 3 different pages)

2. 5 patient MRN Keywords got added for document 2 (It supposed be 2 Patient MRN keywords because Document 2 have only 2 bar codes but the keyword values from Document 1 also added )

3. 6 Patient MRN keywords added for document 3 ( which is all from the document 1 and 2)

Unity Script: (OnItemExecute Method)

BarcodeDocumentUpdates updateKeyword = args.Results.BarcodeDocumentUpdates;
KeywordType keywordType_MRN= app.Core.KeywordTypes.Find("Patient MRN");
Keyword keyword_MRN = keywordType_MRN.CreateKeyword(args.Barcode.Value);
updateKeyword.AddKeyword(keyword_MRN);

 


Please let me know whether my above script coding is not correct in order to achieve my requirement. if so then can you please give me the sample code to do this. 

2 REPLIES 2

Jacob_Dahlke6
Star Contributor
Star Contributor

Would you need a keyword modifier for this? Also, I'm looking for how you actually implement this type of script. Through the data capture configuration? Can this be part of a capture process?

Tom_Lewis
Star Collaborator
Star Collaborator

Panchanathan - You may have to verify that you do not have Keep Keyword options that are adding the values from the previous documents.

Jacob - A keyword modifier is used to add the keywords to the document. Bar code scripts are assigned as part of the bar code field configuration.

 

Tom