EClassNotFound Tdi604_231

Discussion of open issues, suggestions and bugs regarding to (known as Delphi HL7) HL7 Components
lucas.amiune
Posts: 25
Joined: Mon Oct 29, 2012 7:41 pm

EClassNotFound Tdi604_231

Post by lucas.amiune »

As I said in other topic after the Multiple OBR fields fixed, my program was running fine.

But now I leave for the lunch and I started to test again and the program was showing EClassNotFound Tdi604_231.

Any hint what could happened?


Best Regards.
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: EClassNotFound Tdi604_231

Post by admin »

Hi,

For more detailed information, can you share your message?

Best regards.
lucas.amiune
Posts: 25
Joined: Mon Oct 29, 2012 7:41 pm

Re: EClassNotFound Tdi604_231

Post by lucas.amiune »

Error occurs after msghl7.AsString := Msg; when i´m trying to recieve a message.

Error Message: "Project GatewayMV.exe raised exception class EClassNotFound with message 'Class Tdi604_231 not found'. Process stopped. Use Step pr Run to continue."



Best Regards
Attachments
PrintScreenErro.jpg
PrintScreenErro.jpg (252.95 KiB) Viewed 25721 times
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: EClassNotFound Tdi604_231

Post by admin »

Can you share HL7 Message?
or
send to with mail : support@delphihl7.com
lucas.amiune
Posts: 25
Joined: Mon Oct 29, 2012 7:41 pm

Re: EClassNotFound Tdi604_231

Post by lucas.amiune »

Is the same message from the order topic.

Code: Select all

MSH|^~\&|MV2000i|MVSISTEMAS|MEDLAB|MEDLAB|20121026142002||ORM^O01|65|P|2.3.1|65||||||
PID||1339981|1339981||OLIVEIRA^CRISTINA^LOPES DE|SOUZA^ELISA^LOPES DE|19890429|F|||CORONEL ARQUIBALDO JORDAO^SAO PAULO^SP^03561080^BRASIL||1127411263||||||||||||||||
PV1|1|I|13505-02 CLINICA MEDICA||5816604||SILVEIRA^MARCELO^AUGUSTO DUARTE|||||||||||||||||||||||||||||||||||||20120620173000||||||||
ORC|NW|2154927|||||||20121027000000|4|||419 UI CLINICA CIRURGICA 3 A|||||||
OBR|1|2154927||106|||||||||||RX ABDOMEN - AP - LAT OU LOCALIZADA|SILVEIRA^MARCELO^AUGUSTO DUARTE||2650269|106|6953||||CR|||||||||||||||||||||||
OBR|2|2154927||107|||||||||||RX ABDOMEN AGUDO (02 POSIÇÕES)|SILVEIRA^MARCELO^AUGUSTO DUARTE||2650270|107|6953||||CR|||||||||||||||||||||||
It was working fine, but suddenly it started to shwo this EClassNotFoundError.
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: EClassNotFound Tdi604_231

Post by admin »

Hi,

Your message parsed without any error.
Can you write a sample project -with source code-, error that you recieve?
Please send to us the project.

Best regards.
lucas.amiune
Posts: 25
Joined: Mon Oct 29, 2012 7:41 pm

Re: EClassNotFound Tdi604_231

Post by lucas.amiune »

Code: Select all

procedure TfrmPrincipal.IdTCPServer1Execute(AContext: TIdContext);
var
    Msg: string;
    MsgOut: string;
    msghl7 : TdiORM_O01_231;
    msgACK: TdiACK_231;
    valido: boolean;
    mi: TdiMessageInfo;
    messagem: string;
    IDMessage: string;
begin
    try
        if config.UseBLOCKS then
        begin
            Msg := AContext.Connection.IOHandler.ReadLn(END_BLOCK);
            Delete(msg,1,pos(START_BLOCK,msg));
        end
        else
        begin
            Msg := AContext.Connection.IOHandler.ReadLn();
        end;


        if config.LogExtendido then
            datamod.gravaLog('Mensagem Recebida: ' + msg);


        msghl7 := TdiORM_O01_231.Create;

        try
            mi:=GetMessageInfo(msg);
            if mi.MessageType ='ORM^O01' then
            begin
                msghl7.AsString := Msg; //Parse message
                valido:=true;
                messagem:='OK';
                IDMessage:=msghl7.MSH.MessageControlID.AsString;
                datamod.gravaLog('Mensagem Válida ORM: OK '+ IDMessage);

            end
            else
            begin
                valido:=false;

                datamod.gravaLog('Mensagem Válida ORM: NOK ('+ mi.MessageType+')');

                messagem:='TIPO DE MESSAGEM NAO SUPORTADO. ENVIAR ORM^O01';
            end;
        except
            On E:Exception do
            begin
                messagem:='FALHA ESTRUTURAL ' + e.Message;

                datamod.gravaLog('Server: '+ messagem);

                valido:=false;
            end;
        end;

        try
            //Gerar o Worklist
              gerarWL(msghl7);
        except
            On E:Exception do
            begin
                messagem:= e.Message;
                valido:=false;
                datamod.gravaLog('Server Erro: '+ messagem);
            end;
        end;


        msgACK:= TdiACK_231.Create;

        msgACK.MSH.SendingApplication.NamespaceID.AsString:=config.NomeSistema;
        msgACK.MSH.SendingFacility.NamespaceID.AsString:=config.NomeFabricante;
        msgACK.MSH.ReceivingApplication.NamespaceID.AsString:=config.ServerHL7_NomeSistema;
        msgACK.MSH.ReceivingFacility.NamespaceID.AsString:=config.ServerHL7_NomeFabricante;

        msgACK.MSH.DateTimeOfMessage.TimeOfAnEvent.AsString:=FormatDateTime('yyyymmddhhmmss', now);
        msgACK.MSH.MessageType.MessageType.AsString:='ACK';

        msgACK.MSH.ApplicationAcknowledgmentType.AsString:='';
        msgACK.MSH.AcceptAcknowledgmentType.AsString:='';
        msgACK.MSH.SequenceNumber.AsString:='';
        msgACK.MSH.ContinuationPointer.AsString:='';
        msgACK.MSH.CountryCode.AsString:='';
        msgACK.MSH.CharacterSet[0].AsString:='8859/1';

        //Gerar um ID

        msgACK.MSH.MessageControlID.AsString:=FormatDateTime('yyyymmddhhmmss', now);

        if valido then
           msgACK.MSA.AcknowledgementCode.AsString:='AA'
        else
           msgACK.MSA.AcknowledgementCode.AsString:='AE';

        msgACK.MSA.TextMessage.AsString:=messagem;
        msgACK.MSA.MessageControlID.AsString:=IDMessage;

        datamod.gravaLog('Enviando ACK: '+msgACK.MSA.AcknowledgementCode.AsString+' ' + messagem);

        if config.UseBLOCKS then
            AContext.Connection.IOHandler.Write(START_BLOCK+msgACK.AsString+END_BLOCK)
        else
            AContext.Connection.IOHandler.Write(msgACK.AsString);

            
        
        if config.LogExtendido then
            datamod.gravaLog('ACK: '+msgACK.AsString);



  finally
    FreeAndNil(msghl7);
    FreeAndNil(msgACK);
  end;
end;

lucas.amiune
Posts: 25
Joined: Mon Oct 29, 2012 7:41 pm

Re: EClassNotFound Tdi604_231

Post by lucas.amiune »

I had one idea, can you send me a Small project with the parser Working in version 2.3.1 ?
To test here.

I think something is missed in dhl7base
lucas.amiune
Posts: 25
Joined: Mon Oct 29, 2012 7:41 pm

Re: EClassNotFound Tdi604_231

Post by lucas.amiune »

Hi, take here a small project.


Same error, when trying to parse the MSG.



Best Regards
Attachments
TesteHL72.zip
(447.3 KiB) Downloaded 1207 times
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: EClassNotFound Tdi604_231

Post by admin »

When tested with socket client, its running without any error.

But trial versions is limited 10 message per day.
msg.AsString :=' '; or Variable :=msg.AsString;
counted as message.

For Tdi604_231 error, Are you sure that there is another message?
for example, a message with OBX segment?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests