0

Hello I'm looking to generate json FHIR messages based off a patient demographic CSV extract. Essentially the data I receive will be an excel file with columns containing patient demographics (i.e. first name, last name, address, DOB, etc). I need to go line by line through the excel file and generate a json FHIR message. I'm using excel VBA and would like to create a macro to do this.
Here's what I've done so far and I'm certain there must be an easier way. I've created a json FHIR message template and basically perform a find/replace. Template would contain:

{
    "use": "official",
    "family": "zLASTNAME",
    "given": [
      "zFIRSTNAME"
    ]
}

And then when comes to the lastname and firstname column in the excel file. I would find/replace zLASTNAME and zFIRSTNAME. I know this is by far the wrong way to do it but I don't know what the best practice is for this case.

Any help would be much appreciated!

6
  • Is there some specific problem you're having with using this approach? Commented Sep 21, 2022 at 21:27
  • Would using the json module in stackoverflow.com/a/59586380/2193968 make it easier? Commented Sep 21, 2022 at 21:31
  • What are you trying to do with these JSON messages? Are you putting them back into the spreadsheet, writing them to a file, or something else? Commented Sep 21, 2022 at 21:40
  • I'm sending these JSON messages to a web service which in turn is taking that information and updating a public health records system. Commented Sep 21, 2022 at 22:41
  • I'm not having any issues with my current approach but it just doesn't seem like best practice. My approach just seems elementary, the use of "find/replace". Commented Sep 21, 2022 at 22:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.