Replies: 1 comment
-
Answered on forums. https://forums.mirthproject.io/forum/mirth-connect/general-discussion/183119-text-in-custom-segment-is-wrapping-and-causing-the-recipient-to-see-an-extra-segment#post183120 @mayowan16 please refer to both places if you post here and the forums. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are on Mirth version 4.0.1. We have an outbound channel that is writing a custom STF segment. Here is the code that has been in place for years. The vendor is only recently complaining that it is causing an issue on their end.
We are doing a database query to retrieve the contents of the custom segment.
//Get Appt_XREF_ID from HL7 messaage.
var Appt_XREF_ID = msg['SCH']['SCH.1']['SCH.1.1']
//The Query
var query = "select national_provider_id, last_name, first_name, middle_name, fax, phone, address_line_1, address_line_2, city, state, zip from provider_mstr where provider_id = (select primarycare_prov_id from appointments where appt_id = (select guid_id from intrf_appt_g_xref where int_id = '" + Appt_XREF_ID + "'))"
var result = dbConn.executeCachedQuery(query);
var cnt = result.size(); //get the number of rows returned in the query
for (i = 0; i < cnt; i++) { //loop it
result.next(); //go to the first row
msg['STF']['STF.2']['STF.2.1'] = result.getString(1);
msg['STF']['STF.3']['STF.3.1'] = result.getString(2);
msg['STF']['STF.3']['STF.3.2'] = result.getString(3);
msg['STF']['STF.3']['STF.3.3'] = result.getString(4);
msg['STF']['STF.4']['STF.4.1'] = 'PCP';
msg['STF']['STF.10']['STF.10.1'] = result.getString(5);
msg['STF']['STF.10']['STF.10.2'] = result.getString(6);
msg['STF']['STF.11']['STF.11.1'] = result.getString(7);
msg['STF']['STF.11']['STF.11.2'] = result.getString(8);
msg['STF']['STF.11']['STF.11.3'] = result.getString(9);
msg['STF']['STF.11']['STF.11.4'] = result.getString(10);
msg['STF']['STF.11']['STF.11.5'] = result.getString(11);
result.close();
dbConn.close();
}
}
The third party recipient sent this back. They are stating that their receiving engine is reading "Suite" as its own segment.
STF|1|1700032125|Fader PA^Frank^P|PCP||||||3607886852^3607888420|PeaceHea lth Same-Day Clinic^3015 Squalicum Pkwy
Suite 140^Bellingham^WA^98225
Can I add code that will prevent the text from wrapping? There are two other standard segments (PID and PV1) that are wrapping as well but they are not causing a problem. Do you think the recipient will need to fix this instead? It appears that it is only happening with some key words like "suite". There are thousands of addresses in the source database, so I don't think there is anything to be done from that perspective.
Beta Was this translation helpful? Give feedback.
All reactions