• Index
  • » Users
  • » dzungdev
  • » Profile

Posts

Posts

Oct-28-13 05:31:35
Category: Saddle Forum
Forum: User

Dear all,

I am using Saddle nightly build version: 1013-08-21 but each time I deploy or run project, it always have error because:

Code:


C:saddle_wpphishl7nbprojectbuild-impl.xml:430: Unable to delete file C:saddle_wpphishl7buildmapping.jar
BUILD FAILED (total time: 0 seconds)

After I tried to re-deploy few times, then suddenly it can run well. But it should work well each time we redeploy and run project.

Please check the my attachment to see more detail.

Best Regards,
Dzung
/images/agorapro/attachments/1195/mini_difficult-to-deploy.png

Aug-22-13 01:32:59
Category: Saddle Forum
Forum: User

Dear Ortwin,

Thank you very much for your effort. I will use new version and inform you the result asap.

Thanks and best regards,
Dzung

Aug-21-13 01:19:50
Category: Saddle Forum
Forum: User

Dear Ortwin,

I would like to say thanks for your reply.

I don't call any validate() method, I think when Icreate one instance of MessageToMixedStringTransformer, I put "true" value in constructor of object. Please see my below code:

Code:


MessageToMixedStringTransformer mtmst=new MessageToMixedStringTransformer(true);

            try {

                String errACK=new String(mtmst.transformToByteArray(getACK()));

                System.out.println("==> " + (new Date()).toString() + " error errACK send out: " + errACK);

Thanks and best regards,
Dzung

Aug-20-13 16:09:54
Category: Saddle Forum
Forum: User

Dear Ortwin,

Please find information of log file in attachment file.

In order to answer your question for Segment_Name, error detail, please see below:

Code:

====> error field path: /ACK/MSA/Segment_Name===> error fieldName : Segment_Name, error detail: The current number of field instances (0) is below the lower boundary of 1 instances that has been defined for this field

I think the Segment_Name here has error because that time I haven't wrirten the code for MSA segment:

Code:


getACK().getField("./MSA/Segment_Name").setValue("MSA");

I will check my code one more time to see whether the bug is there or not.

Thank you very much.
Best regards,
Dzung
1377007726_mule.log

Aug-20-13 15:51:23
Category: Saddle Forum
Forum: User

Dear Ortwin,

Thank you very much for your effort. I will try it asap and inform you the result.

Thanks and best regards,
Dzung

Aug-20-13 15:50:34
Category: Saddle Forum
Forum: User

Dear Ortwin,

I would like to say thanks for your effort. Below is my code to transform message and send out:

Code:


getACK().getField("/ACK/MSH").setChildValue("Segment_Name", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Segment_Name"));
        getACK().getField("/ACK/MSH").setChildValue("Field_Separator", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Field_Separator"));
        getACK().getField("/ACK/MSH").setChildValue("Encoding_Characters", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Encoding_Characters"));
        getACK().getField("/ACK/MSH/Sending_Application").setChildValue("Namespace_ID", "PhISCPS");
        getACK().getField("/ACK/MSH/Sending_Facility").setChildValue("Namespace_ID", "91-10030214KP");
        getACK().getField("/ACK/MSH/Receiving_Application").setChildValue("Namespace_ID", "SPP");
        getACK().getField("/ACK/MSH/Receiving_Facility").setChildValue("Namespace_ID", "91-10030214KP");
        String msgDateTime=DateUtil.yyyyMMddhhmmssDf.format(new Date());
        getACK().getField("/ACK/MSH").setChildValue("Date_Time_of_Message", msgDateTime);
        getACK().getField("/ACK/MSH").setChildValue("Security", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Security"));
        getACK().getField("/ACK/MSH/Message_Type/Message_Code").setValue("ORP");
        getACK().getField("/ACK/MSH/Message_Type/Trigger_Event").setValue("O10");
        getACK().getField("/ACK/MSH/Message_Type/Message_Structure").setValue("ORP_O10");
        getACK().getField("/ACK/MSH").setChildValue("Message_Control_ID", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Message_Control_ID"));
        getACK().getField("/ACK/MSH").getChild("Processing_ID").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Processing_ID"), true);
        getACK().getField("/ACK/MSH").getChild("Version_ID").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Version_ID"), true);
        getACK().getField("/ACK/MSH").setChildValue("Sequence_Number", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Sequence_Number"));
        getACK().getField("/ACK/MSH").setChildValue("Continuation_Pointer", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Continuation_Pointer"));
        getACK().getField("/ACK/MSH").setChildValue("Accept_Acknowledgment_Type", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Accept_Acknowledgment_Type"));
        getACK().getField("/ACK/MSH").setChildValue("Application_Acknowledgment_Type", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Application_Acknowledgment_Type"));
        getACK().getField("/ACK/MSH").setChildValue("Country_Code", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Country_Code"));
        getACK().getField("/ACK/MSH").setChildValue("Character_Set", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Character_Set"));
        getACK().getField("/ACK/MSH").getChild("Principal_Language_Of_Message").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Principal_Language_Of_Message"), true);
        getACK().getField("/ACK/MSH").setChildValue("Alternate_Character_Set_Handling_Scheme", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Alternate_Character_Set_Handling_Scheme"));
        getACK().getField("/ACK/MSH").getChild("Sending_Responsible_Organization").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Sending_Responsible_Organization"), true);
        getACK().getField("/ACK/MSH").getChild("Receiving_Responsible_Organization").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Receiving_Responsible_Organization"), true);
        getACK().getField("/ACK/MSH").getChild("Sending_Network_Address").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Sending_Network_Address"), true);
        getACK().getField("/ACK/MSH").getChild("Receiving_Network_Address").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Receiving_Network_Address"), true);
       
        getACK().getField("./MSA/Segment_Name").setValue("MSA");
        getACK().getField("/ACK/MSA/Acknowledgment_Code").setValue("AE");
        getACK().getField("/ACK/MSA/Message_Control_ID").setValue(getOMP_O09_VM().getField("/OMP_O09/MSH/Message_Control_ID").getValue());
       
       
        Field err=getACK().getField("/ACK/ERR");
        err.setChildValue("Segment_Name", "ERR");
        err.getField("./Error_Location").setChildValue("Segment_ID","1");
        err.getField("./Error_Location").setChildValue("Segment_Sequence","1");
        err.getField("./HL7_Error_Code").setChildValue("Identifier","101");
        err.getField("./HL7_Error_Code").setChildValue("Text","Location Setup not found");
        err.getField("./Severity").setValue("F");
       
         try {
             MessageToMixedStringTransformer mtmst=new MessageToMixedStringTransformer(true);
            try {
                String errACK=new String(mtmst.transformToByteArray(getACK()));
                System.out.println("==> " + (new Date()).toString() + " error errACK send out: " + errACK);
            } catch (SaddleValidationException ex) {
                Map errorMap=ex.getErrors();
                System.out.println("=======> comming error errACK: ");
                for (Field field : errorMap.keySet()) {
                    System.out.println("====> error field path: " + field.getPath());
                    for (String error : errorMap.get(field)) {
                        System.out.println("===> error fieldName : "
                                + field.getName() + ", error detail: " + error);
                    }
                }
                return;
            }
             
            addProperty(getACK(), PropertyScope.OUTBOUND, "hl7OutHost", HL7Constant.SPP_TEMPORARY_IP);
            addProperty(getACK(), PropertyScope.OUTBOUND, "hl7OutPort", HL7Constant.SPP_TEMPORARY_PORT);
            dispatchMessage(err);
        } catch (Exception e) {
            e.printStackTrace();
        }

Thanks and best regards,
Dzung

Aug-20-13 05:27:40
Category: Saddle Forum
Forum: User

Dear Ortwin,

Good day.

My purpose is sending back ACK. As you told me last time, the maximum length of one field is 0, it means that the field length is no limitation. But I have error below. Could you please check it for me ?

Code:

====> error field path: /ACK/MSH/Segment_Name===> error fieldName : Segment_Name, error detail: The value "MSH" has a length of 3 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Field_Separator===> error fieldName : Field_Separator, error detail: The value "|" has a length of 1 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Encoding_Characters===> error fieldName : Encoding_Characters, error detail: The value "^~&" has a length of 4 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Sending_Application/Namespace_ID===> error fieldName : Namespace_ID, error detail: The value "PhISCPS" has a length of 7 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Sending_Facility/Namespace_ID===> error fieldName : Namespace_ID, error detail: The value "91-10030214KP" has a length of 13 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Receiving_Application/Namespace_ID===> error fieldName : Namespace_ID, error detail: The value "SPP" has a length of 3 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Receiving_Facility/Namespace_ID===> error fieldName : Namespace_ID, error detail: The value "91-10030214KP" has a length of 13 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Date_Time_of_Message===> error fieldName : Date_Time_of_Message, error detail: The value "20130820111717" has a length of 14 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Security===> error fieldName : Security, error detail: The value "1003800" has a length of 7 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Message_Type/Message_Code===> error fieldName : Message_Code, error detail: The value "ORP" has a length of 3 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Message_Type/Trigger_Event===> error fieldName : Trigger_Event, error detail: The value "O10" has a length of 3 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Message_Type/Message_Structure===> error fieldName : Message_Structure, error detail: The value "ORP_O10" has a length of 7 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Message_Control_ID===> error fieldName : Message_Control_ID, error detail: The value "34" has a length of 2 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Processing_ID/Processing_ID===> error fieldName : Processing_ID, error detail: The value "P" has a length of 1 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSH/Version_ID/Version_ID===> error fieldName : Version_ID, error detail: The value "2.6" has a length of 3 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSA/Segment_Name===> error fieldName : Segment_Name, error detail: The value "MSA" has a length of 3 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSA/Acknowledgment_Code===> error fieldName : Acknowledgment_Code, error detail: The value "AE" has a length of 2 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/MSA/Message_Control_ID===> error fieldName : Message_Control_ID, error detail: The value "34" has a length of 2 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/ERR/Segment_Name===> error fieldName : Segment_Name, error detail: The value "OMP_O09" has a length of 7 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/ERR/Error_Location/Segment_ID===> error fieldName : Segment_ID, error detail: The value "1" has a length of 1 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/ERR/Error_Location/Segment_Sequence===> error fieldName : Segment_Sequence, error detail: The value "1" has a length of 1 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/ERR/HL7_Error_Code/Identifier===> error fieldName : Identifier, error detail: The value "101" has a length of 3 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/ERR/HL7_Error_Code/Text===> error fieldName : Text, error detail: The value "Location Setup not found" has a length of 24 characters, which is above the configured maximum length of 0 characters.====> error field path: /ACK/ERR/Severity===> error fieldName : Severity, error detail: The value "F" has a length of 1 characters, which is above the configured maximum length of 0 characters.

Thanks and best regards,
Dzung

Aug-20-13 04:45:52
Category: Saddle Forum
Forum: User

Dear Ortwin,

Good day,

I would like to ask about the error: "Segment_Name, error detail: The current number of field instances (0) is below the lower boundary of 1 instances that has been defined for this field"

I thought that the Segment_Name field always has default value for it.

My code is below:

Code:


getACK().getField("/ACK/MSH").setChildValue("Segment_Name", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Segment_Name"));
getACK().getField("/ACK/MSH").setChildValue("Field_Separator", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Field_Separator"));
        getACK().getField("/ACK/MSH").setChildValue("Encoding_Characters", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Encoding_Characters"));
        getACK().getField("/ACK/MSH/Sending_Application").setChildValue("Namespace_ID", "PhISCPS");
        getACK().getField("/ACK/MSH/Sending_Facility").setChildValue("Namespace_ID", "91-10030214KP");
        getACK().getField("/ACK/MSH/Receiving_Application").setChildValue("Namespace_ID", "SPP");
        getACK().getField("/ACK/MSH/Receiving_Facility").setChildValue("Namespace_ID", "91-10030214KP");
        String msgDateTime=DateUtil.yyyyMMddhhmmssDf.format(new Date());
        getACK().getField("/ACK/MSH").setChildValue("Date_Time_of_Message", msgDateTime);
        getACK().getField("/ACK/MSH").setChildValue("Security", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Security"));
        getACK().getField("/ACK/MSH/Message_Type/Message_Code").setValue("ORP");
        getACK().getField("/ACK/MSH/Message_Type/Trigger_Event").setValue("O10");
        getACK().getField("/ACK/MSH/Message_Type/Message_Structure").setValue("ORP_O10");
        getACK().getField("/ACK/MSH").setChildValue("Message_Control_ID", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Message_Control_ID"));
        getACK().getField("/ACK/MSH").getChild("Processing_ID").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Processing_ID"), true);
        getACK().getField("/ACK/MSH").getChild("Version_ID").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Version_ID"), true);
        getACK().getField("/ACK/MSH").setChildValue("Sequence_Number", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Sequence_Number"));
        getACK().getField("/ACK/MSH").setChildValue("Continuation_Pointer", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Continuation_Pointer"));
        getACK().getField("/ACK/MSH").setChildValue("Accept_Acknowledgment_Type", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Accept_Acknowledgment_Type"));
        getACK().getField("/ACK/MSH").setChildValue("Application_Acknowledgment_Type", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Application_Acknowledgment_Type"));
        getACK().getField("/ACK/MSH").setChildValue("Country_Code", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Country_Code"));
        getACK().getField("/ACK/MSH").setChildValue("Character_Set", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Character_Set"));
        getACK().getField("/ACK/MSH").getChild("Principal_Language_Of_Message").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Principal_Language_Of_Message"), true);
        getACK().getField("/ACK/MSH").setChildValue("Alternate_Character_Set_Handling_Scheme", getOMP_O09_VM().getField("/OMP_O09/MSH").getChildValue("Alternate_Character_Set_Handling_Scheme"));
        getACK().getField("/ACK/MSH").getChild("Sending_Responsible_Organization").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Sending_Responsible_Organization"), true);
        getACK().getField("/ACK/MSH").getChild("Receiving_Responsible_Organization").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Receiving_Responsible_Organization"), true);
        getACK().getField("/ACK/MSH").getChild("Sending_Network_Address").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Sending_Network_Address"), true);
        getACK().getField("/ACK/MSH").getChild("Receiving_Network_Address").copy(getOMP_O09_VM().getField("/OMP_O09/MSH").getChild("Receiving_Network_Address"), true);
       
        getACK().getField("/ACK/MSA/Acknowledgment_Code").setValue("AE");
        getACK().getField("/ACK/MSA/Message_Control_ID").setValue(getOMP_O09_VM().getField("/OMP_O09/MSH/Message_Control_ID").getValue());
       
       
        Field err=getACK().getField("/ACK/ERR");
        err.setChildValue("Segment_Name", "OMP_O09");
        err.getField("./Error_Location").setChildValue("Segment_ID","111");
        err.getField("./HL7_Error_Code").setChildValue("Identifier","ERR");
        err.getField("./HL7_Error_Code").setChildValue("Text","Location Setup not found");

Thanks and best regards,
Dzung

Aug-02-13 02:10:12
Category: Saddle Forum
Forum: User

Dear Ortwin,

I would like to say thanks for your effort. Actually I changed your code to skip the response in send() method of Hl7Client.java file, then I used it in my project. I will check your attachment here and inform u result. I am sorry because inform you late, this time I am doing testing with partner.

Thanks and best regards,
Dzung

Jul-30-13 09:03:06
Category: Saddle Forum
Forum: User

Dear Ortwin,

I would like to say thanks for your effort. I will try new version of Hl7Client and inform you result.

Thanks and best regards,
Dzung

Jul-21-13 05:29:18
Category: Saddle Forum
Forum: User

Dear Ortwin,

I used Hl7Client.jar file to send Hl7 message when user click a button in my web application. In my case u can see like this:

Code:


public void confirmOrder() {
// do my web app business logic code
// call Hl7Client to send OMP^O09 message out
// update some status
}

The problem is Hl7Client sends successfully out the OMP^O09 message but I guess it waits for ACK message, so it takes long time (3-5mins) to finish it, then I can run the code of part "update some status", then my confirmOrder() method will be finish.

I tried to use Hl7Client.close() immediatelly sending but it isn't useful. Could you please give me an advice for this case ?

Thanks and best regards,
Dzung

Dear Ortwin,

Thank for your solution, actually I write the code in each component to transform input message to see full msg now. I will create customized log component.

Thanks and best regards,
Dzung

Dear Ortwin,

Could you tell me how we can configure the log component to log full comming message  ?

For example, our system receives OMP^O09 message but I only can see

Code:


********************************************************************************
* Message received in service: Log_1. Content is:                              *
* 'MSH|^~&|SPP|91-0030214KP|PhISCPS|90-1020104H|20100608162725|1003800|OMP^O0 *
* 9^OMP_O09|20100608162725|...[100 of 429]'                                    *
********************************************************************************

I want to see full log message in log file.

Thanks and best regards,
Dzung

Dear Johannmichaelchua ,

Actually you can download here to download the standalone version of Saddle for all operation system. It is fourth version after Apple version.
After you download it, you can extract and then go to saddle/bin folder, run ./saddle (make sure u have permission to run).

You don't need to install saddle, use the standalone version is better.

Thanks and best regards,
Dzung

Dear Ortwin,

I would like to say thanks a lot for your helping. I can see that it works well now.

Thanks and best regards,
Dzung

Dear Ortwin,

Good day.

I used the Nightly Build Saddle_20130611 but it seems that the class MessageToMixedStringTransformer doesn't work well. After the code is run:

Code:


MessageToMixedStringTransformer mtmst=new MessageToMixedStringTransformer(true);
                try {
                    System.out.println("==> msg is created: " + new String(mtmst.transformToByteArray(ompO09)));
                    System.out.println("==========> msg is parsed");
                } catch (SaddleValidationException ex) {
                    Map errorMap=ex.getErrors();
                    for (Field field : errorMap.keySet()) {
                        System.out.println("====> error field path: " + field.getPath());
                        for (String error : errorMap.get(field)) {
                            System.out.println("===> error fieldName : " + field.getName() + ", error detail: " + error);
                        }
                    }
                }

The message should be generated but no message is generated. Then I used the Nightly Build Saddle 20130531 and put my code to fix the problem about loop forever for optional field, then the message of above code is generated.

Could you please check for me what happened ?

Please find my source code and database backup file as attachment here (I have to upload to Google Drive because the file is too big, forum doesn't allow to attach)
phishl7 source code
phishl7 database backup file

My database is PostgreSQL, you download PostgreSQL and create blank database, then u can right click to that database, select Restore and select the file.

Thanks and best regards,
Dzung

Dear Ortwin,

Thank you for your reply. I would like to ask you one more thing, how about the maxLength of field in HL7 template ? I saw that a lot of field have maxLength="0", so when I use TestTemplate to test one message which is generated by me, there is error about the length of field.

Thanks and best regards,
Dzung

Dear Ortwin,

I downloaded source code and read MessageToMixedStringTransformer class:

Code:


if (isHL7) {
            result="";
            // check if the currently treated field has empty predecessors
            Field currentSibling=p_field.getPreviousSibling();
            while (currentSibling !=null && currentSibling.isExisting()) {
                // and add an empty field for each of these to the result string
                System.out.println("========> fieldDel: " + fieldDel);
                System.out.println("========> fieldDel123: " + fieldDel);
                result +=fieldDel;
                currentSibling=currentSibling.getNextSibling();
            }
            // finally add the value of the HL7 field itself
            System.out.println("========> fieldValue1: " + fieldValue.toString());
            result +=fieldValue.toString();
        } else {
            // get the string representation of the field value
            System.out.println("========> fieldValue2: " + fieldValue.toString());
            result=fieldValue.toString();
        }

The code

Code:

while (currentSibling !=null && currentSibling.isExisting())

will loop forever and cause error. Then I tried to fix by adding

Code:

currentSibling=currentSibling.getNextSibling();

it works well now but I am not sure the logic is correct or not. I think we should put

Code:

currentSibling=currentSibling.getPreviousSibling();

Could u check for me ?

Thanks and best regards,
Dzung

Dear Ortwin,

I checked with the build NIGHTLY 20130531 and there is the problem about MessageToMixedStringTransformer.
If I set the validation of MessageToMixedStringTransformer to true as below code:

Code:

MessageToMixedStringTransformer mtmst=new MessageToMixedStringTransformer(true);

Then I will have error
msg-transformer-error.txt

but if I set validation of MessageToMixedStringTransformer to false as below code:

Code:

MessageToMixedStringTransformer mtmst=new MessageToMixedStringTransformer(false);

It seems that the MessageToMixedStringTransformer doesn't work. In the build Nightly 20130402, I still can see the message is generated but when I use TemplateTest to test it, there is error. But now in lastest Nightly Build 20130531, there isn't no message is generated.

2. I just want to ask one more thing, I checked in the template, almost the maxLength of field in OMP_O09 and ADT_A01 has value is 0 (maxLength="0"), so if u set

Code:

MessageToMixedStringTransformer mtmst=new MessageToMixedStringTransformer(false);

, then you will have error as attachment file, the error showed that the value I set to message is more than 0.

Could you please check for me about it ?

Thanks and best regards,
Dzung

Dear Ortwin,

Thanks a lot for your effort. I will check it and inform you asap.

Thanks and best regards,
Dzung

Dear Ortwin,

Thanks a lot for your help. When you are free, you can do it.

Thanks and best regards,
Dzung

Dear Ortwin,

Code:

PID||970707056565^02-2|&&ASHWINA A/P MARAN

If you see the PID segment u can see the structure like this:
- PID
  + Segment_Name
  + Set_ID_PID: optional
  + Patient_ID : optional
  + Patient_Identifier_List: mandatory
  + Alternate_Patient_ID_PID: optional
  + Patient_Name: mandatory

My code is:

Code:

pid.getField("./Set_ID_PID").setValue("");

        pid.getField("./Patient_Identifier_List/ID_Number").setValue(patient.getPatientIdno());
        pid.getField("./Patient_Identifier_List/Identifier_Check_Digit").setValue(patient.getPatientIdType());
        pid.getField("./Patient_Name/Family_Name/Surname").setValue("");
        pid.getField("./Patient_Name/Family_Name/Own_Surname_Prefix").setValue("");
        pid.getField("./Patient_Name/Family_Name/Own_Surname").setValue(patient.getFullName());
        pid.getField("./Patient_Name/Family_Name/Surname_Prefix_from_Partner_Spouse").setValue("");
        pid.getField("./Patient_Name/Family_Name/Surname_from_Partner_Spouse").setValue("");

You can see in my code, I set for value for Patient_Identifier_List and Patient_Name which are mandatory, I don't set for Alternate_Patient_ID_PID which is optional. So when I don't set Alternate_Patient_ID_PID, it should have the value is ||, but now there isn't that value, that's why I have the error about Patient Name. If now I write the code to set "" for Alternate_Patient_ID_PID, I won't have that error anymore.

If I don't write code(as u told, normally I shouldn't care about value of optional part), the messeage will be
PID||970707056565^02-2|&&ASHWINA A/P MARAN

If I write the code, the message will be:
PID||970707056565^02-2||&&ASHWINA A/P MARAN

The red || only is there when I write the code to set "" for Alternate_Patient_ID_PID

Thanks and best regards,
Dzung

Dear Ortwin,

I would like to say thanks for your reply.

Actually my task is sending out OMP_O09 message. In order to validate the output message, I did like that:

Code:

MessageToMixedStringTransformer mtmst=new MessageToMixedStringTransformer(false);

Then I used the transformer to parse the field to string and copy that message to Template Test to test. Then I have that error. I attached here the message I generated, because I put some code to insert blank for optional field, then maybe the message now has different error with my previous post. For mandatory field, I understand that we have to put value for that. My question is how I can automatically put the blank value for optional field without writing code for each optional field ?
For example:

Code:


pid.getField("./Set_ID_PID").setValue("");
pid.getField("./Patient_Identifier_List/ID_Number").setValue(patient.getPatientIdno());
pid.getField("./Patient_Identifier_List/Identifier_Check_Digit").setValue(patient.getPatientIdType());
pid.getField("./Patient_Name/Family_Name/Surname").setValue("");
pid.getField("./Patient_Name/Family_Name/Own_Surname_Prefix").setValue("");
pid.getField("./Patient_Name/Family_Name/Own_Surname").setValue(patient.getFullName());
pid.getField("./Patient_Name/Family_Name/Surname_Prefix_from_Partner_Spouse").setValue("");
pid.getField("./Patient_Name/Family_Name/Surname_from_Partner_Spouse").setValue("");

You can see that the Surname, Own_Surname_Prefix,... in Family_Name group are optional, but if I don't put the value blank (""), the generated message will have error.

My message is OMP-O09Out.hl7

Thanks and best regards,
Dzung

Dear Matthias,

Good day,

My problem is:
- message segment PID has:
   + Segment_Name
   + Set_ID_PID : optional
   + Patient_ID:
        + ID_Number: mandatory
        + Identifier_Check_Digit

In my code when I wrote:

Code:


      pid.getField("./Patient_Identifier_List/ID_Number").setValue(patient.getPatientIdno());
      pid.getField("./Patient_Identifier_List/Identifier_Check_Digit").setValue(patient.getPatientIdType());
      pid.getField("./Patient_Name/Family_Name/Own_Surname").setValue(patient.getFullName());

The output of PID segment is: 

Code:

PID|970707056565^02-2|ASHWINA A/P MARAN

The error will be:

Code:


Parsing failed: The incoming message (394 bytes) could not be transformed.

Exception that caused parsing abort: The lower range limit of the first provided tag is -1 and therefore out of range.
Allowed range for the provided raw message is from 0 to 399.
(refering to parsing of node "/OMP_O09/OMP_O09_PATIENT/PID/Patient_Identifier_List")
caused Exception 2: Could not process field "/OMP_O09/OMP_O09_PATIENT/PID/Patient_Identifier_List

I found out that I need to put blank value for Set_ID_PID field by the code:

Code:

pid.getField("./Set_ID_PID").setValue("");

I want to ask whether we have the way to automatically create the blank value, then the correct message will be: PID||970707056565^02-2|ASHWINA A/P MARAN   (you can see now we have ||)

Thanks and best regards,
Dzung

Mar-05-13 10:58:25
Category: Saddle Forum
Forum: User

Dear Matthias,

Thank you a lot for your advice. I forgot about the line ending character. I also thought the file has problem because before I added ZD2 segment to it, my system can work well with at least 5 times test. But I don't know what problem can be, thank you a lot.

Best regards,
Dzung

  • Index
  • » Users
  • » dzungdev
  • » Profile

Board Info

Board Stats
 
Total Topics:
119
Total Polls:
0
Total Posts:
800
User Info
 
Total Users:
947
Newest User:
vraju
Members Online:
0
Guests Online:
10

Online: 
There are no members online