• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Clinical Encounters

  • Home
  • About
  • Blog
  • Contact
Home › Development › Managing Case Files

Managing Case Files

Jun 15, 2018 | Ian McKinnon

One of our programmers details how we approached the issue of data retention in the Clinical Encounters platform.


Data Management

A lot of the work that has gone into Clinical Encounters has dealt with loading, saving, and managing data. This comes in the form of devising methods for parsing through XML files, handling the data during runtime, ensuring that all data is displayed correctly, saving the data to a file, and more. In particular, one recent area of concern is how users will access saved cases.

Locally-saved data is straightforward and simple, but the method is not scalable for our purposes.

In early testing, files were saved locally through a local file system. This was fairly straightforward and simple, but in order to implement database functionality, the whole system had to change. A main menu interface was designed that would provide users with a way to preview and search through cases to select the ones they would like to view or edit. From this menu, users can also choose to download cases to save them for later if they didn’t want to use mobile data, wanted the benefit of faster load times from local files, or knew they would not have access to the internet for a while. Yet, part of the issues we faced dealt with creating a balance between the local files and the database that the main menu could still work with.

The Balancing Act (The Problem)

Part of the issue now is that there are two instances of cases. One will live in a database while another could live on a user’s local machine. Users are not guaranteed to have downloaded the case file before attempting to load it, and local case files should be accessible even when not connected to the internet.

As far as our case creator and viewer components are concerned, it’s fairly simple. Depending on circumstances, the software could load from an existing file, load from the database if no existing local files are found, or could be told to load from the database even if there are local files. This can all be decided from a few simple checks or flags. Once the data has been loaded, then it can be handled without having to talk with the database or access local files until it is time to save.

The main menu is a different story. When showing previews of many potentially large cases, it doesn’t make much sense to download entire cases, parse through the data to find what we wish to display, and then display it. This would be an unnecessary burden on both download time and computational time. So, a separate table in the database was created exclusively for the menu previews. This way download times are quick and many previews can be loaded easily. This, however, creates a bit of a problem for local files. Since the information is stored, formatted, and retrieved through the database, how should local files give this same information to the main menu?

The Solution

The current approach is to prepare the information the main menu will need and store it locally as a separate file for every case. These files are the only .txt files saved to the local directory, making it easy for the main menu to find which files it needs to parse so it can get the needed data. When we prepared a demo build for the East Coast Gaming Conference, before this was implemented, we used a similar tactic due to the uncertainty of any internet connection at the convention center. Our approach then was to have a single file with all menu preview entries in it. We could then parse through the file and find what we needed from it, but the amount of text parsing and swapping made it more prone to error and had the potential to interfere with other case previews. The new system makes sure to divide the cases so that any errors are contained while making it easier to replace old preview files as well.

Moving Forward

The system used to balance the local saves and the database’s saves is still relatively new, so some bugs are still present. Managing duplicate filenames, record numbers, not being able to check the database if offline, and prioritizing the database’s or the local files have been some of the areas of concern among others that are subject to change in the future. The biggest concern will be avoiding any overwrites or loss of data when overwriting the local or database cases, yet with a fully developed and tested systems, users should never have to think or worry about it.

You can read more about the Clinical Encounters platform at its website.

Category: Development Tagged: dev-blog game-based learning

Health Impact Studio logo

About Health Impact Studio

We are a dedicated team of developers and researchers with the mission to improve the health of individuals through novel technology including games, virtual reality, and role-playing simulations. We welcome input from the full range of stakeholders to create a customer experience with the broadest applicability to improving health outcomes.

Clinical Tools – Spring 2021 Digital Health Awards® Winner

Jun 8, 2021

Clinical Tools Wins $200K SBIR Award to Decrease Vaping Behavior in Adolescents and Young Adults

Sep 30, 2019

Mindfulness and Patient Communication

Nov 19, 2018

Previous Post: « New Beginnings
Next Post: Nightmare Of Text »

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Ian McKinnon

Ian is a Unity Programmer working with C# primarily. Ian is a runner, dog lover, gamer, and is a pretty good juggler (The Circus is always his backup plan in life)

More Posts

Primary Sidebar

Keep Reading

  • Clinical Tools – Spring 2021 Digital Hea…
    Jun 8, 2021
  • Clinical Tools Wins $200K SBIR Award to …
    Sep 30, 2019
  • Mindfulness and Patient Communication
    Nov 19, 2018
  • Contact Us
  • Copyright & Reproduction Guidelines
  • Privacy Policy
  • Terms of Service
  • Technology Requirements
  • 508 Compliance

Footer

developed & maintained by
ClinicalTools

The Clinical Encounters Training Group: SBIRT Training | BupPractice | PainTx Challenge | CE:Vaping | CE:Alcohol | CE:Obesity | Lift

Clinical Encounters | Reader

Clinical Encounters | Platform

Group Training

  • Facebook
  • LinkedIn
  • Twitter
clinicaltoolsinc@gmail.com

101 A Market St Chapel Hill, NC 27516
919-960-8118

Contact Us

© 2026 · Clinical Tools, Inc · Log In

Walkthrough of a Clinical Encounters | Decisions Interactive Patient Case

Welcome!

If you have an account, please log in! Or create an account now!

Create an Account!
Log In

Forgot Password?
Register New Account
Don’t have an account?
Register now!
Register
  • Hidden
  • By registering, you agree to the Terms of Service and Privacy Policy. If you are a part of a group, you understand your participation information can be provided to the group organizer.
  • This field is for validation purposes and should be left unchanged.
Sign up for our Newsletter!

Want to keep up to date on HealthImpact.Studio developments? Enter your information below and we’ll let you know when we have new products or open research studies, and what we’re working on for the future.

  • Hidden