Learning Documentation Community Open Exchange Global Masters Certification Partner Directory Ideas Portal
Developer Community
  • Posts
    • InterSystems Official
    • Articles
    • Questions
    • Announcements
    • Discussions
    • Tags
  • Events
    • Tech Article Contest
    • Programming Contest
    • InterSystems Ideas Contest
    • Event Calendar
  • Products
    • InterSystems IRIS
    • InterSystems IRIS for Health
    • HealthShare
    • TrakCare
    • Caché
    • Ensemble
    • InterSystems Analytics (DeepSee)
    • InterSystems Text Analytics (iKnow)
  • Jobs
    • Job Opportunity
    • Job Wanted
  • Members
  • About
    • About Us
    • FAQ
    • Feedback
    • Report an Issue
    • Share an Idea
    • Code of Conduct
    • Contact Us

EN

Search by posts, members, tags
Language
EN|
ESPTJPCNFREN
New post
  • Profile page
  • Posts (1)
  • Replies (4)
  • Mentions (2)
  • Official certification & Credly badges (1)
  • Global Masters badges (0)
  • Followers (1)
  • Following (0)
AllAccepted answers
    go to post
Tony Alexander · Nov 24, 2021

This because the RawContent field is a %String where MAXLEN is 10000. You will need to get the contents out as a stream. So it'll be like:

s msg=##class(EnsLib.HL7.Message).%OpenId(EnsMsgBodyID)

d msg.OutputToLibraryStream(.msgstream)

s newmsg=##class(EnsLib.HL7.Message).ImportFromLibraryStream(msgstream)

0 0 https://community.intersystems.com/post/rawcontent-only-has-first-10k-message-how-do-i-pull-out-full-message#comment-173596
    go to post
Tony Alexander · Nov 24, 2021

You cannot change the doc type of "msg" as its state is immutable. You'll need to create a clone then change doc type. To create the clone:

s outmsg=msg.%ConstructClone(1)

Also note that not all trigger events (MSH:9.2) share the same doctype either, so you'll need to derive it appropriately. e.g. ADT^A01, ADT^A04, ADT^A05 the doc type is  ADT_A01.

0 0 https://community.intersystems.com/post/dtl-editor-how-get-doctype-runtime#comment-173576
Tony Alexander
@Tony.Alexander
Maeston Consulting
Follow

User statistics

Posts
1
Replies
4
Likes
6
Applications
0
Badges
0
Followers
1
People reached
1.3K
Accepted answers
2
  • Privacy & Terms
  • Guarantee
  • Section 508
  • Contest Terms
  • Cookies Settings
© 2025 InterSystems Corporation, Cambridge, MA. All rights reserved.

Log in or sign up

Log in or create a new account to continue

Log inSign up

Log in or sign up

Log in or create a new account to continue

Log inSign up

Log in or sign up

Log in or create a new account to continue

Log inSign up

Log in or sign up

Log in or create a new account to continue

Log inSign up