Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display all valid fields #69

Open
Bugs5382 opened this issue Jan 11, 2024 · 1 comment
Open

feat: display all valid fields #69

Bugs5382 opened this issue Jan 11, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed
Milestone

Comments

@Bugs5382
Copy link
Owner

Bugs5382 commented Jan 11, 2024

  • A function that will parsing the BSH, MSH, or FHS will parse out the entire tree either as an XML, JSON,, or OBJECT.
  • This way a user can see what field they need to get from a particular message when doing their initial interpretation of where certain data is.
message = new Message({
        messageHeader: {
          msh_9_1: 'ADT',
          msh_9_2: 'A01',
          msh_10: randomControlID,
          msh_11_1: "T"
        }
      })

should output:

{
        "MSH": [{
          path: "MSH.1",
          value: "|"
        }, {
          path: "MSH.2",
          vale: "^~\\&"
        }, {
          path: "MSH.9.1",
          value: "ADT"
        }, {
          path: "MSH.9.2",
          value: "A01",
        }, {
          path: "MSH.9.3",
          value: "ADT_A01"
        }, {
          path: "MSH.10",
          value: randomControlID.toString()
        }, {
          path: "MSH.11",
          value: "T"
        }, {
          path: "MSH.12",
          value: "2.7"
        }]
      }
@Bugs5382 Bugs5382 added this to the 2.0.0 milestone Jan 11, 2024
@Bugs5382 Bugs5382 self-assigned this Jan 11, 2024
@Bugs5382 Bugs5382 removed this from the 2.0.0 milestone Jan 11, 2024
@Bugs5382 Bugs5382 added the help wanted Extra attention is needed label Jan 13, 2024
@Bugs5382
Copy link
Owner Author

Bugs5382 commented Jun 25, 2024

The idea will be:

that you can take a whole message object and do:

const fields = message.displayAll()

... in which fields will then contain in order each segment (in order), and since we know they are the "segment," we can loop through the fields, and only fields that have "info" would be put into the array. In the end, it will create a formatted array, which then can be maintained by the end-user however they want.

@Bugs5382 Bugs5382 added this to the 2.0.0 milestone Jun 25, 2024
Bugs5382 added a commit that referenced this issue Jun 25, 2024
- some ci fixes as well
- update unit tests
- build initial functions for showing all entered fields

[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant