Hi Rafael, the messages seem correct.
IMO your system and the sender system might need to agree on the codes and have 
some kind of table that tells you which codes are for batteries and which ones 
are for individual results, but that's outside the messages. So in OBR-4 you 
might use those codes and use the lookup table to know which are batteries and 
which not. If you need that inside the messages you might use a Z segment or a 
NTE associated with the OBR.
Hope that helps!

-- 
Kind regards,
Eng. Pablo Pazos Gutiérrez
http://cabolabs.com

From: jamesag...@gmail.com
Date: Tue, 11 Nov 2014 12:04:37 -0500
To: rsanvi...@fsoria.com
CC: hl7api-devel@lists.sourceforge.net; bomor...@fsoria.com
Subject: Re: [HAPI-devel] ORU^R01 Message: Battery and its testsdf

Hi Rafael,

(Other people please chime in too! I'm hardly a lab expert..)

One of the joys of HL7 v2 is that a lot of the standard is loose and subject to 
interpretation, which means that often there isn't a right answer to how 
something works in the specification, you need to understand how the 
sender/receiver is using it.

This is one of those cases. Based on the samples you have provided it seems 
like your interpretation is correct.. but really only the sender would know for 
sure.

Cheers,
James


On Tue, Nov 11, 2014 at 10:33 AM,  <rsanvi...@fsoria.com> wrote:


Hi, I have received the next ORU^R01
message:



MSH|^~\&|MG|MG|LAB|LAB|20100127101236+0100||ORU^R01^ORU_R01|1234567890|P|2.5

PID|...

PV1|...

ORC|...

OBR|1|OP2|10101010|HEM^Hemograma^SISTEMA1|...

OBX|1|NM|HTIE^Hematíes^SISTEMA1||7.00|x10*6/uL|4.5
- 5.9|HH|||F|||20100127095652

OBX|2|NM|HGB^Hemoglobina^SISTEMA1||567567.0|g/dL|13.0
- 17.5|HH|||F|||20100127095652

OBX|3|NM|HTCO^Hematocrito^SISTEMA1||77.0|%|37.0
- 53.0|HH|||F|||20100127095728

OBX|4|NM|VCM^VCM^SISTEMA1||67.0|fl|80.0
- 100.0|LL|||F|||20100127095728

SPM|1|9018000088||^SANGRE PERIFERICA||||||||||||||20100127095625||Y||||||1



In this message, the OBR Segment contains
a Battery (HEM) and the tests have been added in OBX Segments.

In this case, the HEM Battery contains
4 tests (HTIE, HGB, HTCO and VCM).



I would like to know if this message
is a Standard HL7 Message.

At the moment, I have only received
tests in ORU^R01 messages.



In the next ORU^R01 message, I have
received a test (CLC00500) with two results (OBX.1 and OBX.2 segments):



MSH|^~\&|MG|MG|FSM|FSM|20141105132023+0100||ORU^R01^ORU_R01|LAB31415190023385|P|2.5

PID|...

PV1|...

ORC|...

OBR|1|PA5999171|20000002|CLC00500^Pla--Glucosa;
c.sust.(proc.)^SISTEMA1||||||CE||||||00010258960^ape1 ape2, 
nombre||||5||||LAB|F|||||||admin^20141105132022+0100

OBX|1|NM|CLC00500^Pla--Glucosa; 
c.sust.(proc.)^SISTEMA1||65|mg/dL||HH|||F|||20141105132022||admin|||20141105132022

OBX|2|ST|CLC00500^Pla--Glucosa; 
c.sust.(proc.)^SISTEMA1|1|POSITIVO|||||||||20141105132022||admin

SPM|1|0120000002||3^Suero||||||||||||||20141105132010||Y||||||1



How could I to know when the OBR
Segment contains a Battery or a test?

My first idea is the next: if OBR.4.1
= OBX.3.1, then the OBR Segment contains a Test, else OBR Segment contains
a Battery. But this is a bad solution :(



Help me!

Best Regards.

Rafael.









Rafael San Vidal Hidalgo - Dpto. Sistemas de Diagnóstico 

Tlf.: 914702104 (ext.158) - Fax: 915261867 

rsanvi...@fsoria.com
- www.f-soria.es





AVISO DE CONFIDENCIALIDAD



La información contenida en
este mensaje y archivos adjuntos es privada, confidencial y de uso exclusivo
de la(s) persona(s) y entidad(es) a la(s) que va dirigido. Si Ud. no es
el destinatario de esta información se le notifica que está expresamente
prohibida la declaración, reproducción, distribución o la toma de cualquier
acción basada en el contenido de esta comunicación. Si ha recibido este
mensaje por error, le rogamos que nos lo comunique inmediatamente y proceda
a eliminarlo de todos sus sistemas. Francisco Soria Melguizo, S.A. no asume
responsabilidad legal por el contenido de esta comunicación, ni representa
la opinión de la firma, salvo que expresamente se especifique lo contrario
y que el remitente esté autorizado para hacerlo. Gracias. 










De:
Rafael San Vidal Hidalgo/GSORIA

Para:
Ian Vowles <ian.vow...@health.qld.gov.au>

cc:
"hl7api-devel@lists.sourceforge.net"
<hl7api-devel@lists.sourceforge.net>

Fecha:
08/05/2014 09:36

Asunto:
RE: [HAPI-devel] Parse only Segment
MSH






Thank you, Ian

I will develope your two options.



In the first option (using parser method
with the first segment only), How do I get the first segment in XML Format?
 

I would try to get the first segment
 looking for the </MSH> value.

I will try the preparser option too,
proposed by our partner James Agner. 



Best regards.

Rafael San Vidal.





Rafael San Vidal Hidalgo - Dpto. Sistemas de Diagnóstico 

Tlf.: 914702104 (ext.158) - Fax: 915261867 

rsanvi...@fsoria.com
- www.f-soria.es





AVISO DE CONFIDENCIALIDAD



La información contenida en
este mensaje y archivos adjuntos es privada, confidencial y de uso exclusivo
de la(s) persona(s) y entidad(es) a la(s) que va dirigido. Si Ud. no es
el destinatario de esta información se le notifica que está expresamente
prohibida la declaración, reproducción, distribución o la toma de cualquier
acción basada en el contenido de esta comunicación. Si ha recibido este
mensaje por error, le rogamos que nos lo comunique inmediatamente y proceda
a eliminarlo de todos sus sistemas. Francisco Soria Melguizo, S.A. no asume
responsabilidad legal por el contenido de esta comunicación, ni representa
la opinión de la firma, salvo que expresamente se especifique lo contrario
y que el remitente esté autorizado para hacerlo. Gracias. 
















RE: [HAPI-devel] Parse
only Segment MSH




Ian Vowles 
para:
rsanvi...@fsoria.com, hl7api-devel@lists.sourceforge.net

Enviado: 08/05/2014 00:11

Recibido: 08/05/2014 09:10












Our team often finds itself
wanting to deal with individual segments. Segment constructors still require
something to base themselves on, so you seem to be required to do something
like this:

 

    private
static ADT_A01 parent;

.

.

.

       
parent = new ADT_A01();

       
parent.initQuickstart("ADT", "A01", "P");

       
String message = 
"MSH|^~\\&|SENDING-APP|SENDING-FAC|RECEIVING-APP|RECEIVING-FAC|20140508111155|SECURITY|ADT^A08|MESSAGE-CONTROL-ID|P|2.4|||AL|AL|AUS|ASCII|ENG|\r"

               
+ "MORE SEGMENTS GO HERE IN A REAL MESSAGE\r";

       
System.out.println("Message Control Id = " + getUID(message));

.

.

.

 

       
/** 

         *
Get MessageControlID 

         *
@param mensaje 

         *
@return MessageControlID 

         */


        public
static String getUID(String mensaje) 

        {                


                try


                {

                   
MSH msh = new MSH(parent,parent.getModelClassFactory());

           
        if (mensaje.indexOf("\r")
> 0) {

                   
  msh.parse(mensaje.substring(0, mensaje.indexOf("\r")));


                    }

                   
return msh.getMessageControlID().getValue(); 

                }

               
catch (HL7Exception e) {}        


                return
null; 

        }

 

If anyone can show a simpler
way to create a segment from scratch, that would be most helpful.

 

To just get amongst the MSH
you could go for all string manipulation, but you have to worry about the
standard. You could do something like this:

 

       
/** 

         *
Get MessageControlID 

         *
@param mensaje 

         *
@return MessageControlID 

         */


        public
static String getUIDNoHapi(String mensaje) 

        {                


            if
(mensaje != null && mensaje.length() > 4 && mensaje.startsWith("MSH")
&& mensaje.indexOf("\r") > 0) {

               
String msh = mensaje.substring(0, mensaje.indexOf("\r"));

               
String fieldDel = mshsubstring(3, 4);

               
if ("|".equals(fieldDel)) {

                   
fieldDel = "\\|";

               
}

               
String[] mshFields = msh.split(fieldDel);

       
        return mshFields[9];

           
}   

            return
null; 

        }

 

 

There are traps in this code
if people start using non standard delimiters or send you very bad content.
The HAPI library is a much better to help you avoid such trouble.

 

Thanks

Ian

 

From: rsanvi...@fsoria.com [mailto:rsanvi...@fsoria.com]


Sent: Wednesday, 7 May 2014 6:22 PM

To: Ian Vowles; hl7api-devel@lists.sourceforge.net

Subject: [HAPI-devel] Parse only Segment MSH

 



Hi, 

In our source code, we parse the full message (from string data) to get
the MessageControlID value.


How can I get the MessageControlID value without parsing the full message
(Example: parsing only the MSH Segment)?




Note: I attach the "getUID" method to get this value.


Best regards. 

Rafael. 





        import
ca.uhn.hl7v2.model.Message;


        import
ca.uhn.hl7v2.model.v25.segment.MSH;




        /**


         * Get MessageControlID


         * @param
mensaje 

         * @return
MessageControlID 

         */


        public
static
String getUID(String mensaje)


        {            
    

                try


                {


                    
   Parser parseador = new
GenericParser(); 

                    
   parseador.setValidationContext(new
NoValidation()); 



                    
   Message mensajeHAPI = parseador.parse(mensaje);




                    
   MSH segmentoHAPI_MSH = (MSH) mensajeHAPI.get(Parametros.MSH);


                    
   return
segmentoHAPI_MSH.getMessageControlID().getValue();


                }


                catch
(Exception e) {}        


                return
null;


        }








Rafael San Vidal Hidalgo - Dpto. Sistemas de Diagnóstico 

Tlf.: 914702104 (ext.158) - Fax: 915261867 

rsanvi...@fsoria.com
- www.f-soria.es





AVISO DE CONFIDENCIALIDAD 

 





La información contenida en
este mensaje y archivos adjuntos es privada, confidencial y de uso exclusivo
de la(s) persona(s) y entidad(es) a la(s) que va dirigido. Si Ud. no es
el destinatario de esta información se le notifica que está expresamente
prohibida la declaración, reproducción, distribución o la toma de cualquier
acción basada en el contenido de esta comunicación. Si ha recibido este
mensaje por error, le rogamos que nos lo comunique inmediatamente y proceda
a eliminarlo de todos sus sistemas. Francisco Soria Melguizo, S.A. no asume
responsabilidad legal por el contenido de esta comunicación, ni representa
la opinión de la firma, salvo que expresamente se especifique lo contrario
y que el remitente esté autorizado para hacerlo. Gracias. 
********************************************************************************

This email, including any attachments sent with it, is
confidential and for the sole use of the intended recipient(s). This 
confidentiality
is not waived or lost, if you receive it and you are not the intended 
recipient(s),
or if it is transmitted/received in error.

Any unauthorised use, alteration, disclosure, distribution
or review of this email is strictly prohibited. The information contained
in this email, including any attachment sent with it, may be subject to
a statutory duty of confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have
received this email in error, you are asked to immediately notify the sender
by telephone collect on Australia +61 1800 198 175 or by return email.
You should also delete this email, and any copies, from your computer system
network and destroy any hard copies produced.

If not an intended recipient of this email, you must not
copy, distribute or take any action(s) that relies on it; any form of 
disclosure,
modification, distribution and/or publication of this email is also prohibited.

Although Queensland Health takes all reasonable steps to
ensure this email does not contain malicious software, Queensland Health
does not accept responsibility for the consequences if any person's computer
inadvertently suffers any disruption to services, loss of information,
harm or is infected with a virus, other malicious computer programme or
code that may occur as a consequence of receiving this email.

Unless stated otherwise, this email represents only the
views of the sender and not the views of the Queensland Government.

**********************************************************************************











------------------------------------------------------------------------------

Comprehensive Server Monitoring with Site24x7.

Monitor 10 servers for $9/Month.

Get alerted through email, SMS, voice calls or mobile push notifications.

Take corrective actions from your mobile device.

http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________

Hl7api-devel mailing list

Hl7api-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/hl7api-devel





------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel                       
                  
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to