This article is an example of using macros in a mode to fix PACS archive related issues.  


Case Study

A facility finds that their Philips iSite PACS server is updating the exam date and time for a study in PACS to match the most recent series date/time of the image(s) created by DocScanFx and sent to PACS.  If DocScanFx images are sent to PACS at a date much later than when the exam was originally performed, the date/time reflected in PACS can be confusing to end users.  To fix this we need to ensure that DocScanFx uses the study's exam date/time DICOM tags for its own Series date/time tags.  In addition, in order to capture a date/time for when the scanned documents were created, we'll populate two new DICOM tags for Acquisition date/time and enter the current date/time values there. 


The Fix
Create a section in your INI file which will contain the DICOM tags to modify for each created image.  Like this:

[DICOM-KeepOriginalDTS]
Series Date=(0008,0021)|{{DF Exam Date}}
Series Time=(0008,0031)|{{DF Exam Time}}
Acquisition Date=(0008,0022)|{{NowYear}}{{NowMonth}}{{NowDay}}
Acquisition Time=(0008,0032)|{{NowHour}}{{NowMinute}}{{NowSecond}}


The first two entries will overwrite the Series Date and Series Time using two macros which contain the original exam's date and time.


The second two entries set the Acquisition Date and Time tags and use macros which are replaced with the current date and time values in an order which formats them correctly for DICOM.


Finally, in the specific mode in your INI file where you want these DICOM tags modified, add these two lines.  The first one tells DocScanFx to use this new section for creating custom tags.  The second one is needed to ensure the date/time sent from iSite isn't overwritten with the current date/time.

AdditionalDicomTags=DICOM-KeepOriginalDTS
SetCurrentDateTime=False


That's it!  The new images DocScanFx created will have the same series date/time as the exam images already stored in PACS.


Note that you must have v3.1.0.2 or higher to utilize the {{DF Exam xxxx}} macros