Title: Get property names that have no data while parsing to XML. · Issue #478 · nHapiNET/nHapi · GitHub
Open Graph Title: Get property names that have no data while parsing to XML. · Issue #478 · nHapiNET/nHapi
X Title: Get property names that have no data while parsing to XML. · Issue #478 · nHapiNET/nHapi
Description: I am trying to create a tree by parsing hl7 message to XML. But XmlParser is checking if the component has DATA, if not then it is not adding that prop to XML tree. Here is the nhapi code that checks if component has data: Here is the ex...
Open Graph Description: I am trying to create a tree by parsing hl7 message to XML. But XmlParser is checking if the component has DATA, if not then it is not adding that prop to XML tree. Here is the nhapi code that chec...
X Description: I am trying to create a tree by parsing hl7 message to XML. But XmlParser is checking if the component has DATA, if not then it is not adding that prop to XML tree. Here is the nhapi code that chec...
Opengraph URL: https://github.com/nHapiNET/nHapi/issues/478
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get property names that have no data while parsing to XML.","articleBody":"I am trying to create a tree by parsing hl7 message to XML.\r\n\r\nBut XmlParser is checking if the component has DATA, if not then it is not adding that prop to XML tree.\r\n\r\nHere is the nhapi code that checks if component has data:\r\n\r\n\r\n\r\nHere is the example HL7 message.\r\n\r\n`MSH|^~\\\u0026|FDHL7|JOHNSON LABS||P1055|201007231634||ORU^R01|P1055–0000047907|P|2.3|1||NE|NE\r\nPID|1|JQ4988|108512373||SAMPLES^JUNIOR||01/10/1948^53 Y|M|||^******^^||||||||\r\nNTE|1|P|****************************************************************************\r\nADD|NON FASTING`\r\n\r\nand here is the output (XML)\r\n\r\n``` XML\r\n\u003cORU_R01 xmlns=\"urn:hl7-org:v2xml\"\u003e\r\n \u003cMSH\u003e\r\n \u003cMSH.1\u003e|\u003c/MSH.1\u003e\r\n \u003cMSH.2\u003e^~\\\u0026amp;\u003c/MSH.2\u003e\r\n \u003cMSH.3\u003e\r\n \u003cHD.1\u003eFDHL7\u003c/HD.1\u003e\r\n \u003c/MSH.3\u003e\r\n \u003cMSH.4\u003e\r\n \u003cHD.1\u003eJOHNSON LABS\u003c/HD.1\u003e\r\n \u003c/MSH.4\u003e\r\n \u003cMSH.6\u003e\r\n \u003cHD.1\u003eP1055\u003c/HD.1\u003e\r\n \u003c/MSH.6\u003e\r\n \u003cMSH.7\u003e\r\n \u003cTS.1\u003e201007231634\u003c/TS.1\u003e\r\n \u003c/MSH.7\u003e\r\n \u003cMSH.9\u003e\r\n \u003cCM_MSG.1\u003eORU\u003c/CM_MSG.1\u003e\r\n \u003cCM_MSG.2\u003eR01\u003c/CM_MSG.2\u003e\r\n \u003c/MSH.9\u003e\r\n \u003cMSH.10\u003eP1055–0000047907\u003c/MSH.10\u003e\r\n \u003cMSH.11\u003e\r\n \u003cPT.1\u003eP\u003c/PT.1\u003e\r\n \u003c/MSH.11\u003e\r\n \u003cMSH.12\u003e2.3\u003c/MSH.12\u003e\r\n \u003cMSH.13\u003e1\u003c/MSH.13\u003e\r\n \u003cMSH.15\u003eNE\u003c/MSH.15\u003e\r\n \u003cMSH.16\u003eNE\u003c/MSH.16\u003e\r\n \u003c/MSH\u003e\r\n```\r\n\r\nFor example, as you see MSH.5, MSH.8, MSH.14 are missing.\r\n\r\nHere is the output (tree)\r\n\r\n\r\n\r\n\r\nAnd here is my code:\r\n\r\n``` csharp\r\n public IEnumerable\u003cDictionary\u003cstring, object\u003e\u003e Deserialize(string text)\r\n {\r\n var parser = new PipeParser();\r\n var iMessage = parser.Parse(text);\r\n\r\n var xmlParser = new DefaultXMLParser();\r\n var xmlMessage = xmlParser.Encode(iMessage);\r\n\r\n ..... \r\n\r\n return nodes;\r\n }\r\n```\r\n\r\nWhat about adding a parser option to add properties that have no data?\r\nOr is there a way/workaround to do this?","author":{"url":"https://github.com/alirizaadiyahsi","@type":"Person","name":"alirizaadiyahsi"},"datePublished":"2023-08-29T19:03:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/478/nHapi/issues/478"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c6969fa6-c85f-9889-62cb-79f2b4d40dc5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D5A6:202FD4:78695D:A04B38:6A4C322F |
| html-safe-nonce | b9b65cfd18d67b87a18628a6545f510a513dd77be81b560f2d0504b3247d0008 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUE2OjIwMkZENDo3ODY5NUQ6QTA0QjM4OjZBNEMzMjJGIiwidmlzaXRvcl9pZCI6Ijc5NDM5ODQ1NjkxNjU1NTgzMTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9026ea2de128b12b4dcf7c084cbd11f98fada62f2f726f6bb22e9dfdb7d86bae |
| hovercard-subject-tag | issue:1872234238 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nHapiNET/nHapi/478/issue_layout |
| twitter:image | https://opengraph.githubassets.com/adbe60d3ba9677eadc6aebbe71e3b3b01382298708de61883710f41bf92b40fe/nHapiNET/nHapi/issues/478 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/adbe60d3ba9677eadc6aebbe71e3b3b01382298708de61883710f41bf92b40fe/nHapiNET/nHapi/issues/478 |
| og:image:alt | I am trying to create a tree by parsing hl7 message to XML. But XmlParser is checking if the component has DATA, if not then it is not adding that prop to XML tree. Here is the nhapi code that chec... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alirizaadiyahsi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| go-import | github.com/nHapiNET/nHapi git https://github.com/nHapiNET/nHapi.git |
| octolytics-dimension-user_id | 70870423 |
| octolytics-dimension-user_login | nHapiNET |
| octolytics-dimension-repository_id | 29993598 |
| octolytics-dimension-repository_nwo | nHapiNET/nHapi |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29993598 |
| octolytics-dimension-repository_network_root_nwo | nHapiNET/nHapi |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ee13484b32cf23e15fde191da4c9aa47d41201c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width