HL7细分订单

时间:2014-07-23 12:40:18

标签: java parsing hl7 hapi hl7-v2

我正在使用以下段顺序解析SIU S14: MSH SCH PID PV1 RGS AIL AIS

虽然它没有错误地解析,但我无法从AIS段检索数据。但是当我在AIL之前移动AIS时,一切似乎都很好。那么分段在HL7中的顺序是什么?

1 个答案:

答案 0 :(得分:3)

HL7消息中的段的顺序由消息类型预先确定。在计划信息未经请求的消息中, AIS 段必须先于 AIL

SIU^S12-S24,S26,S27^SIU_S12: Schedule Information Unsolicited

  MSH   Message Header  
  SCH   Schedule Activity Information       
    [ { TQ1 } ] Timing/Quantity     
    [ { NTE } ] Notes and Comments for the SCH  
  [ {   --- PATIENT begin       
      PID   Patient Identification  
      [ PD1 ]   Additional Demographics     
      [ PV1 ]   Patient Visit       
      [ PV2 ]   Patient Visit - Additional Info     
      [ { OBX } ]   Observation/Result      
      [ { DG1 } ]   Diagnosis       
  } ]   --- PATIENT end     
  {     --- RESOURCES begin     
    RGS      Resource Group Segment     
    [ { --- SERVICE begin       
        AIS     Appointment Information - Service       
        [ { NTE } ] Notes and Comments for the AIS      
    } ] --- SERVICE end     
    [ { --- GENERAL_RESOURCE begin      
        AIG      Appointment Information - General Resource     
        [ { NTE } ] Notes and Comments for the AIG      
    } ] --- GENERAL_RESOURCE end        
    [ { --- LOCATION_RESOURCE begin     
        AIL      Appointment Information - Location Resource        
        [ { NTE } ] Notes and Comments for the AIL      
    } ] --- LOCATION_RESOURCE end       
    [ { --- PERSONNEL_RESOURCE begin        
        AIP   Appointment Information - Personnel Resource      
        [ { NTE } ] Notes and Comments for the AIP      
    } ] --- PERSONNEL_RESOURCE end      
  } --- RESOURCES end       

但两个细分受众群的细分受众群都是可选的。因此,只有 AIL 且没有 AIS 段的消息在语法上是可以的。并且当HL7消息打开时,在完整消息之后允许有额外的或本地定义的段。为了检索这些附加数据,您需要一个适应的模板。