简体   繁体   中英

NHAPI C# 3.5 parsing orm_001 2.3

I am having trouble putting a structure on this message. It is an order message. When it casts it stays null so orm001 is always null. I used some other hl7 types and it went in ok. I and thinking it may be the OBR line but it still does the same thing when we take it out.

 static void Main(string[] args)
    {
        string message =
        @"MSH|^~\&|lab1|WEDGE|Lab2|1|20180910045317||ORM^O01|20180910045317|P|2.3
PID|1|WEDGE-15453|WEDGE-15453||Wolfe^Test^K||19560801|F|||122 
futh^^Rogersville^MO^65742||(417) 444-4444~|||||||||U
PV1||N|||||1326334459^SUPPORO^OSAKAE^^^^M.D
IN1|1||NULL|Medicare B|^^^^|||||||||||^||||||||||||||||||||2151584A
IN1|2||NULL|AARP Medicare Supplement Plan 
F|^^^^|||||||||||^||||||||||||||||||||1234564-22
GT1|1||^||^^^^|
ORC|NW|0698892|||||1||20180910
OBR|1|1271|0698892|CLIN^CYP1A2, CYP2B6, CYP2C9, CYP2C19, CYP2D6, CYP3A4, 
CYP3A5,  DRD2/ANKK1, APOE, COMT, Factor II, Factor V Leiden, MTHFR, OPRM1,  
SLCO1B1, VKORC1^^CLIN^CYP1A2, CYP2B6, CYP2C9, CYP2C19, CYP2D6, CYP3A4, 
CYP3A5,  DRD2/ANKK1, APOE, COMT, Factor II, Factor V Leiden, MTHFR, OPRM1,  
SLCO1B1, VKORC1|||20180910||||||||4N6FLOQ||||||||||||1
DG1|1||F90.2^Attention-deficit hyperactivity disorder, combined type|||W
DG1|2||Z13.79^Encounter for other screening for genetic and chromosomal 
anomalies|||W
OBX|1|TX|Drug^Drug Information||00002751001^Humalog Vial 100u/Ml||||||X";
        // Get a new instance of the PipeParser to parse this piped message
        PipeParser parser = new PipeParser();
        // Parsing it will return an abstract message
        IMessage m = parser.Parse(message);
        // Cast the abstract message to the right type
        // Other examples will show how to determine the type
        // of message if this is unknown
        ORM_O01 orm001 = m as ORM_O01;
        // Output one of the field values to the console
        Console.WriteLine(orm001.Message);
        Console.ReadLine();

        }
    }

ORM_O01中 ,不允许重复IN1 ,不允许OBR

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM