HL7v2 Schema Codegen
This tool generates HL7v2 message schemas for the Google Cloud Healthcare API given the HL7 abstract message syntax.
HL7 abstract message syntax
1
MSH2
MSA3
[{ERR}]4
[{NTE}]5
[6
[7
PID8
[{NTE}]9
]10
{11
ORC12
<OBR|RQD|RQ1|RXO|ODS|ODT>13
[{NTE}]14
[{CTI}]15
}16
]HL7v2 message schema config for Google Cloud Healthcare API
1
{2
"members": [3
{4
"segment": {5
"type": "MSH",6
"minOccurs": 1,7
"maxOccurs": 18
}9
},10
{11
"segment": {12
"type": "MSA",13
"minOccurs": 1,14
"maxOccurs": 115
}16
},17
{18
"group": {19
"name": "GROUP_NAME",20
"minOccurs": 0,21
"maxOccurs": 1,22
"members": [23
{24
"group": {25
"name": "GROUP_NAME",26
"minOccurs": 1,27
"maxOccurs": -1,28
"members": [29
{30
"segment": {31
"type": "ERR",32
"minOccurs": 1,33
"maxOccurs": 134
}35
}36
]37
}38
}39
]40
}41
},42
{43
"group": {44
"name": "GROUP_NAME",45
"minOccurs": 0,46
"maxOccurs": 1,47
"members": [48
{49
"group": {50
"name": "GROUP_NAME",51
"minOccurs": 1,52
"maxOccurs": -1,53
"members": [54
{55
"segment": {56
"type": "NTE",57
"minOccurs": 1,58
"maxOccurs": 159
}60
}61
]62
}63
}64
]65
}66
},67
{68
"group": {69
"name": "GROUP_NAME",70
"minOccurs": 0,71
"maxOccurs": 1,72
"members": [73
{74
"group": {75
"name": "GROUP_NAME",76
"minOccurs": 0,77
"maxOccurs": 1,78
"members": [79
{80
"segment": {81
"type": "PID",82
"minOccurs": 1,83
"maxOccurs": 184
}85
},86
{87
"group": {88
"name": "GROUP_NAME",89
"minOccurs": 0,90
"maxOccurs": 1,91
"members": [92
{93
"group": {94
"name": "GROUP_NAME",95
"minOccurs": 1,96
"maxOccurs": -1,97
"members": [98
{99
"segment": {100
"type": "NTE",101
"minOccurs": 1,102
"maxOccurs": 1103
}104
}105
]106
}107
}108
]109
}110
}111
]112
}113
},114
{115
"group": {116
"name": "GROUP_NAME",117
"minOccurs": 1,118
"maxOccurs": -1,119
"members": [120
{121
"segment": {122
"type": "ORC",123
"minOccurs": 1,124
"maxOccurs": 1125
}126
},127
{128
"group": {129
"name": "GROUP_NAME",130
"choice": true,131
"minOccurs": 1,132
"maxOccurs": 1,133
"members": [134
{135
"group": {136
"name": "GROUP_NAME",137
"minOccurs": 1,138
"maxOccurs": 1,139
"members": [140
{141
"segment": {142
"type": "OBR",143
"minOccurs": 1,144
"maxOccurs": 1145
}146
}147
]148
}149
},150
{151
"group": {152
"name": "GROUP_NAME",153
"minOccurs": 1,154
"maxOccurs": 1,155
"members": [156
{157
"segment": {158
"type": "RQD",159
"minOccurs": 1,160
"maxOccurs": 1161
}162
}163
]164
}165
},166
{167
"group": {168
"name": "GROUP_NAME",169
"minOccurs": 1,170
"maxOccurs": 1,171
"members": [172
{173
"segment": {174
"type": "RQ1",175
"minOccurs": 1,176
"maxOccurs": 1177
}178
}179
]180
}181
},182
{183
"group": {184
"name": "GROUP_NAME",185
"minOccurs": 1,186
"maxOccurs": 1,187
"members": [188
{189
"segment": {190
"type": "RXO",191
"minOccurs": 1,192
"maxOccurs": 1193
}194
}195
]196
}197
},198
{199
"group": {200
"name": "GROUP_NAME",201
"minOccurs": 1,202
"maxOccurs": 1,203
"members": [204
{205
"segment": {206
"type": "ODS",207
"minOccurs": 1,208
"maxOccurs": 1209
}210
}211
]212
}213
},214
{215
"group": {216
"name": "GROUP_NAME",217
"minOccurs": 1,218
"maxOccurs": 1,219
"members": [220
{221
"segment": {222
"type": "ODT",223
"minOccurs": 1,224
"maxOccurs": 1225
}226
}227
]228
}229
}230
]231
}232
},233
{234
"group": {235
"name": "GROUP_NAME",236
"minOccurs": 0,237
"maxOccurs": 1,238
"members": [239
{240
"group": {241
"name": "GROUP_NAME",242
"minOccurs": 1,243
"maxOccurs": -1,244
"members": [245
{246
"segment": {247
"type": "NTE",248
"minOccurs": 1,249
"maxOccurs": 1250
}251
}252
]253
}254
}255
]256
}257
},258
{259
"group": {260
"name": "GROUP_NAME",261
"minOccurs": 0,262
"maxOccurs": 1,263
"members": [264
{265
"group": {266
"name": "GROUP_NAME",267
"minOccurs": 1,268
"maxOccurs": -1,269
"members": [270
{271
"segment": {272
"type": "CTI",273
"minOccurs": 1,274
"maxOccurs": 1275
}276
}277
]278
}279
}280
]281
}282
}283
]284
}285
}286
]287
}288
}289
]290
}