[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[[["\u003cp\u003eThis page guides users on configuring schemas for HL7v2 stores to parse HL7v2 messages effectively.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Healthcare API uses a default schema for parsing standard HL7v2 messages, with a specific guide available for this use case.\u003c/p\u003e\n"],["\u003cp\u003eCustom schemas are necessary for HL7v2 messages that do not adhere to the standard, and a separate guide is available for these.\u003c/p\u003e\n"],["\u003cp\u003eRegardless of the schema used, the \u003ccode\u003eParserConfig\u003c/code\u003e object allows specifying a \u003ccode\u003eParserVersion\u003c/code\u003e, with \u003ccode\u003eV3\u003c/code\u003e recommended for its enhanced functionality, including unescaping default HL7v2 control characters and improved matching with custom parsers.\u003c/p\u003e\n"]]],[],null,["# Configure a schema to parse HL7v2 messages\n\nThis page provides an overview on how and when to configure a schema on\nan HL7v2 store to parse HL7v2 messages.\n\nDefault schema\n--------------\n\nThe Cloud Healthcare API uses a default schema to parse HL7v2 messages that conform\nto the HL7v2 standard. If your HL7v2 messages conform to the standard, and\ndo not contain custom segments, fields, or any other data that deviates from\nthe standard, see [Enable schematized parsing for HL7v2 messages](/healthcare-api/docs/how-tos/hl7v2-default-parser).\n\nCustom schema\n-------------\n\nIf you have HL7v2 messages that don't conform to the HL7v2 standard, see\n[Use a custom schema to parse HL7v2 messages](/healthcare-api/docs/how-tos/hl7v2-custom-parser).\n\nSelect a parser version\n-----------------------\n\nYou can specify options for the parser in the [`ParserConfig`](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserConfig) object, regardless of whether you're using the\ndefault schema or a custom schema. The `ParserConfig` contains a\n[`ParserVersion`](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserVersion)\nobject that lets you specify a version for the parser. See the [reference documentation](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserVersion.ENUM_VALUES) for details on each version.\n\nWe recommend that, for all use cases, you specify the\n[`V3`](/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.hl7V2Stores#ParserVersion.ENUM_VALUES.V3)\nversion of the parser. The `V3` version has the following advantages:\n\n- It contains the existing functionality in the `V2` version.\n- When used with the default parser, it unescapes the following default escaped\n HL7v2 control characters:\n\n - Field separator: `|`\n - Component separator: `^`\n - Sub-component separator: `&`\n - Repetition separator: `~`\n - Escape character: `\\`\n - Truncation character: `#`\n- When used with a custom parser, the `V3` parser uses improved matching\n techniques over the other parser versions."]]