Skip to content

Add HL7 v3 PRPM_IN406110UV01 XML parser for ObjectScript - #2

Draft
topchen2025 with Copilot wants to merge 5 commits into
mainfrom
copilot/add-organization-info-query
Draft

Add HL7 v3 PRPM_IN406110UV01 XML parser for ObjectScript#2
topchen2025 with Copilot wants to merge 5 commits into
mainfrom
copilot/add-organization-info-query

Conversation

Copilot AI commented Oct 30, 2025

Copy link
Copy Markdown

Implements ObjectScript parser for HL7 v3 PRPM_IN406110UV01 messages (healthcare organization/department information queries).

Implementation

Core Parser (PRPMIN406110UV01Parser.cls, 422 lines)

  • Parse from file/string with DOM-based XML parsing
  • Extract message metadata (ID, timestamp, interaction code)
  • Extract organization info (11 fields: ID, code, name, address, phone, status, etc.)
  • Extract custodian/personnel info (6 fields: person ID, name, department, contact)
  • Extract message routing (sender/receiver codes, acknowledgement status)
  • Return structured JSON via %DynamicObject

Demo & Testing

  • Demo.cls: 4 usage patterns (file/string parsing, JSON conversion)
  • Test.cls: 5 unit tests covering all extraction methods
  • validate_xml.py: Pre-import XML validation tool

Usage

// Parse and extract
Set parser = ##class(HL7.v3.PRPMIN406110UV01Parser).%New()
Do parser.ParseXMLFile("/path/to/message.xml")

// Get structured data
Set orgInfo = parser.GetOrganizationInfo()
Write orgInfo.name, " | ", orgInfo.telecom, !

// Or use convenience method
Do parser.DisplayAllInfo()

Documentation

  • README.md: API reference and usage patterns
  • INSTALLATION.md: Three installation methods (Portal/Terminal/VSCode)
  • Chinese guides: 使用示例.md, 快速参考.md, 项目总结.md
  • Example XML with real-world structure
Original prompt

<PRPM_IN406110UV01 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../multicacheschemas/PRPM_IN406110UV01.xsd">

使用objectscript 如何解析这个xml数据?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits October 30, 2025 12:33
Co-authored-by: topchen2025 <227556749+topchen2025@users.noreply.github.com>
Co-authored-by: topchen2025 <227556749+topchen2025@users.noreply.github.com>
Co-authored-by: topchen2025 <227556749+topchen2025@users.noreply.github.com>
Co-authored-by: topchen2025 <227556749+topchen2025@users.noreply.github.com>
Copilot AI changed the title [WIP] Add organization info query message structure Add HL7 v3 PRPM_IN406110UV01 XML parser for ObjectScript Oct 30, 2025
Copilot AI requested a review from topchen2025 October 30, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants