carat and New line issues using NHAPI tool in .NET - hl7

I'm using NHapi v22 tool for sending HL7 messages. Issue is I'm not able to create component separator(^) and new line. Please tell me how to code for it in C#.
Following is the code:
MSH|^~\&|xyz|xyz|FLOW|FLOW|201601201525||ADT\S\A04|201601201525123456789|P|2.3|||NE|NE
I need to get like this- ADT^A04

I believe the issue here is that \S\ is an escape character for ^ (component separator). Your message should contain an actual component separator with the actual ^ in it, not the escape character.
"ADT" should appear in MSH-9-1 and "A04" should appear in MSH-9-2 as opposed to how I suspect you are doing it with "ADT^A01" in MSH-9.
Does this help? Please feel free to contact me directly if you need more specialized advice.
edit: I don't normally use NHapi but I suspect you may need to do something along this line:
terser.set("/MSH-9-1", "ADT");
terser.set("/MSH-9-2", "A01");
as opposed to something you might be doing
terser.set("/MSH-9", "ADT^A01");

Related

Line control statement in swift

i am reading swift from apple docs and learning about statements. but couldnot find any information about the Line Control Statements.
According to the docs
A line control statement is used to specify a line number and filename
that can be different from the line number and filename of the source
code being compiled. Use a line control statement to change the source
code location used by Swift for diagnostic and debugging purposes.
A line control statement has the following forms:
#sourceLocation(file: filename, line: line number)
#sourceLocation()
My question is when should i use it? The docs lags an example about the topic.Any links or some hints would be helpful.
This isn't the sort of thing you'd ever need as a beginner, and you could probably go through an entire career without using it. It seems to be meant for use in tools that generate source code. See the comments in the original feature proposal for the complete story.
TL/DR: Don't worry about it, you'll never need it.

SQLWindows - How to check Line Number?

I am new to SQLWindows IDE and I need to edit a number of SQLWindows applications. I am using Version 3.0.0 of the IDE. I am facing trouble finding the line number of a particular line of code. Is there any setting or way to know the line number of the code? Generally IDEs provide the line number, but I am not able to see any line number details in the [Outline] mode. Kindly help!
SQLWindows doesn't use line numbers at all.
If you want to change similar code lines in several files, I suggest getting acquainted with the CDK, which lets you write applications that alter .app/apt/apl files. Unfortunately wasn't able to find a "Starter Guide" on Google.
Im guessing you have corruption in a apl file ? If so save the file as 'text' , ( never save as Binary i.e. 'Compiled' or 'App' always save using the 'Text' option ) then re-open it. 9 out of 10 any line number errors fix automatically this way . Once you have saved as Text , you can open it and edit it ( carefully ) in Notepad++ .
Its very unusual to need to know a line number....why would you possibly want to know it ? If you explain more , there may be a better workaround ( there always is )

Xamarin ios - import library

I need help importing a library to Xamarin. I included the library and inserted it into a new folder named BarcodeScanner, and the name of the library is libBarcodeScanner.a.
gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a”
But it shows an error:
Error: Could not parse additional mtouch arguments: No matching quote found.
What should i do ?
Do i need to create a binding project to use a library like BarcodeScanner ?
Error: Could not parse additional mtouch arguments: No matching quote found.
That does not look like a Xamarin.iOS (mtouch) error message. Those start with a MT prefix followed by 4 numbers, e.g. MT2001. Could it be Xamarin Studio giving you this error ?
What should i do ?
Review the flags: are they identical to what's pasted above ?
No matching quote found. makes is sound there's an extra quote in there. Maybe one of the " is wrong (e.g. a autocorrection giving you a smart quote) ?
Or maybe your project directory (replaced from ${ProjectDir} contains a quote character ?
Also can you edit your question to add which version of Xamarin Studio you're using ?
Do i need to create a binding project to use a library like BarcodeScanner ?
No, but it's the preferred ways to link static libraries. Using a binding project removed the need to add Additional mtouch arguments inside every projects and every build configuration (e.g. Debug, Release...) of your applications.
I will answer my own question, maybe it will help someone. I declared in my MainController that i needed:
using MonoTouch.CoreVideo;
using MonoTouch.CoreMedia;
using MonoTouch.CoreGraphics;
using MonoTouch.CoreFoundation;
And after that i referenced only the static library with:
-gcc_flags "-L${ProjectDir} -lBarcodeScanner -force_load ${ProjectDir}/libBarcodeScanner.a"
#poupou's "maybe" was spot on, but I'll be pedantic and explain exactly.
Look closely at this line I just quoted from your original question. I've marked it down using code (four spaces prefix per line), and broke it into two lines. Nothing else has been changed. Hopefully the error should be obvious now:
- gcc_flags "-L${ProjectDir} -lBarcodeScanner
-force_load ${ProjectDir}/libBarcodeScanner.a”
Essentially, you used different types of double quotes. The first double-quote character above is Unicode 0x0022, which is the regular Quotation Mark. The second double-quote character above is Unicode 0x8221, or Right Double Quotation Mark. It might be that you had copied & pasted all or part of the line above from a web page, rather than typing it in.
For command-line processing, mixing your styles of double quotes simply won't work. You'll need to use balanced regular quotation marks, as you wrote in your own answer just now (but might not have specifically noticed?) FWIW, the right- and left- variants of the quotation mark are usually used for word processing, web pages, etc. where the style aesthetic matters.
Since you didn't use code-markup when quoting that line originally (while I noticed you did, in your recently posted answer) it looks like Stack Overflow "helpfully" tried to render the quotes as similar in style, fooling us into looking elsewhere for the problem, when it was right in front of us.
Anyway, next time you get an error about mismatched quotes, I suggest you carefully check their type. If they look the least bit different, they may not be the right kind of quotes.

How do you escape a reserved word in Delphi?

I need to Escape a reserved word to use it as an identifier in Delphi. I thought that was accomplished by using the ampersand "&", but that doesn't seem to be working right. Any other suggestions?
I found the doc page (search for Extended Syntax) on it, and it should be ampersand.
Figured out the problem. The ampersand works for compiling and error insight, but not code completion. Good to know. I had to add an _ suffix to get code completion to work, then change it back afterwords. I should check QC for a bug report.

Pretty Print for (Informix-)4gl code

i'm searching for a pretty print program (script, code, whatever) for Informix-4GL sources.
Do you know any ? Than you, Peter.
Have you looked at the IIUG (International Informix User Group) software archive? There are two pretty printers there (of indeterminate quality).
The other place to look would be the Aubit4GL site - an open source variant of I4GL. Again, I'm not sure that they have a pretty-printer, but it might be something they have (though a casual check doesn't show one).
I don't know if anyone is reading this post anymore, but the easiest way to get some kind of nice "pretty print" of 4gl code is to view it in the Openedge Developer Studio, then use ctrl-I to set indention. You can adjust indention in the editor settings by saying the length of "tabs". (default is 4, I use 3)
Then do a ctrl-shift-f to make all command words uppercase.
Next, you can condense the code a few lines by moving all the "DO:" statements up a line next to the "THEN" statement with this regular expression search and replace.
ctrl-f:
search "\s*\n\s*DO[:]"
replace " DO:"
make sure you click the checkbox marked regular expressions.
At this point the code is nice and tidy.
Do a ctrl-a and ctrl-c to copy it to the clipboard.
paste it in Outlook as an email without sending. Print it in color.

Resources