Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Use of functions from DLL using extern Pin
Stuart Dootson18-Apr-09 7:40
professionalStuart Dootson18-Apr-09 7:40 
GeneralRe: Use of functions from DLL using extern Pin
ytubis18-Apr-09 8:07
ytubis18-Apr-09 8:07 
GeneralRe: Use of functions from DLL using extern Pin
Stuart Dootson18-Apr-09 8:14
professionalStuart Dootson18-Apr-09 8:14 
QuestionIs this a virus or some thing? Pin
Joseph Marzbani18-Apr-09 4:17
Joseph Marzbani18-Apr-09 4:17 
AnswerRe: Is this a virus or some thing? Pin
Luc Pattyn18-Apr-09 4:23
sitebuilderLuc Pattyn18-Apr-09 4:23 
GeneralRe: Is this a virus or some thing? Pin
enhzflep18-Apr-09 17:14
enhzflep18-Apr-09 17:14 
QuestionHow to parse HL7 message in VC++ Pin
Abhijit D. Babar17-Apr-09 23:22
Abhijit D. Babar17-Apr-09 23:22 
AnswerRe: How to parse HL7 message in VC++ Pin
Stuart Dootson18-Apr-09 0:31
professionalStuart Dootson18-Apr-09 0:31 
From what I've seen (in the last five minutes, by Googling 'HL7' and 'HL7 PID' - you have heard of Google, I presume), each message segment is on a separate line. Each segment consists of fields separated by a '|' character. This page[^] defines the PID segment. This page[^] defines the data type of a person name.

So - you're looking for a line starting 'PID'. Now look through that line for '|' characters. The patient name is between the 5th and 6th '|'.

I'd probably use a regex, like:

^PID(\|[^|]*){4}\|([^|]+)\|.+$


so the patient name field ends up in match #2. With Boost.Regex, this looks like this (using an example message segment I found on the web):

boost::regex rePID("^PID(\\|[^|]*){4}\\|([^|]*)\\|.*$");
boost::smatch match;
if (boost::regex_match(std::string("PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOPE^JOHN^^^^|19480203|M||B|254 E238ST^^EUCLID^OH^44123^USA||(216)731-4359|||M|NON|400003403~1129086|"),
                       match, rePID))

{
   std::cout << match[2] << endl;
}
else
{
   cerr << "No match" << endl;
}


Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: How to parse HL7 message in VC++ Pin
Abhijit D. Babar18-Apr-09 1:05
Abhijit D. Babar18-Apr-09 1:05 
GeneralRe: How to parse HL7 message in VC++ Pin
Stuart Dootson18-Apr-09 1:07
professionalStuart Dootson18-Apr-09 1:07 
GeneralRe: How to parse HL7 message in VC++ Pin
Abhijit D. Babar18-Apr-09 1:40
Abhijit D. Babar18-Apr-09 1:40 
GeneralRe: How to parse HL7 message in VC++ Pin
Stuart Dootson18-Apr-09 1:50
professionalStuart Dootson18-Apr-09 1:50 
GeneralRe: How to parse HL7 message in VC++ [modified] Pin
Abhijit D. Babar18-Apr-09 3:05
Abhijit D. Babar18-Apr-09 3:05 
GeneralRe: How to parse HL7 message in VC++ Pin
Stuart Dootson18-Apr-09 5:08
professionalStuart Dootson18-Apr-09 5:08 
QuestionSplit string into substrings Pin
Manfr3d17-Apr-09 21:12
Manfr3d17-Apr-09 21:12 
AnswerRe: Split string into substrings [modified] Pin
Stuart Dootson17-Apr-09 21:56
professionalStuart Dootson17-Apr-09 21:56 
GeneralRe: Split string into substrings Pin
Manfr3d18-Apr-09 5:04
Manfr3d18-Apr-09 5:04 
GeneralRe: Split string into substrings Pin
Stuart Dootson18-Apr-09 5:14
professionalStuart Dootson18-Apr-09 5:14 
QuestionHow do I develop an internet video conferencing system like skype? Pin
Hiigara17-Apr-09 11:16
Hiigara17-Apr-09 11:16 
AnswerRe: How do I develop an internet video conferencing system like skype? Pin
Divyang Mithaiwala17-Apr-09 19:40
Divyang Mithaiwala17-Apr-09 19:40 
AnswerRe: How do I develop an internet video conferencing system like skype? Pin
zhanzongru19-Apr-09 1:20
zhanzongru19-Apr-09 1:20 
QuestionDLL Processing Speed, Pin
ScotDolan17-Apr-09 8:55
ScotDolan17-Apr-09 8:55 
AnswerRe: DLL Processing Speed, Pin
Stuart Dootson17-Apr-09 9:04
professionalStuart Dootson17-Apr-09 9:04 
AnswerRe: DLL Processing Speed, Pin
Luc Pattyn17-Apr-09 11:26
sitebuilderLuc Pattyn17-Apr-09 11:26 
QuestionDo loop while waiting for a component event Pin
digitalni17-Apr-09 8:22
digitalni17-Apr-09 8:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.