Interested in speaking at MongoDB World 2022? Click here to become a speaker.
HomeMongoDB for AcademiaStudent SpotlightsEHRS-Peru


EHRS PUCP, a theoretical national Electronic Health System in Peru

#About the project

This is a theoretical Electronic Health Record system (EHR-S) in Peru, which uses a MongoDB cluster to store clinical information.

Note: This is my (Jorge) dual-thesis project for the degree in Computer Engineering (with the role of Backend Development). The MongoDB + Spring service is hosted in the "ehrs-format" folder of the Gitlab repository, in the "develop" branch.


When I started this project, I didn’t know about MongoDB. I think in Peru, it’s a myth that MongoDB is only used in Data Analytics or Big Data. Few people talk about using MongoDB as their primary database. Most of the time, we use MySQL. SQL Server or Oracle. In university, we only learn about relational databases. When I looked into my project thesis and other Electronic Health Record Systems, I discovered many applications use MongoDB. So I started to investigate more, and I learned that MongoDB has many advantages as my primary database.

#Why MongoDB?

We chose MongoDB for its horizontal scaling, powerful query capacity, and document flexibility. We specifically used these features to support various clinical information formats regulated by local legal regulations.

When we chose MongoDB as our system's clinical information database, I hadn't much previous experience in that. During system development, I was able to identify the benefits that MongoDB offers. This motivated me to learn more about system development with MongoDB, both in programming forums and MongoDB University courses. Then, I wondered how the technological landscape would be favored with integrating NoSQL databases in information systems with potential in data mining and/or high storage capability.

In the medium term, we'll see more systems developed using MongoDB as the primary database in Peru universities' projects for information systems, taking advantage of the growing spread of Big Data and Data Analytics in the Latin American region.

#How it works

For this project, I’m using information systems from relational databases and non-relational databases. Because I discovered that they are not necessarily separated, they can both be convenient to use.

This is a system with a microservice-oriented architecture. There is a summary of each project in the GitLab repository (each folder represents a microservice):

  • ehrs-eureka: Attention Service, which works as a server for the other microservices.
  • ehrs-gateway: Distribution Service, which works as a load balancer, which allows the use of a single port for the requests received by the system.
  • ehrs-auth: Authentication Service, which manages access to the system.
  • ehrs-auditoria: Audit Service, which performs the audit trails of the system.
  • ehrs-formatos: Formats Service, which records clinical information in the database of formats.
  • ehrs-fhir [under maintenance]: FHIR Query Service, which consults the information under the HL7 FHIR standard.

#Challenges and learnings

When I presented this idea to my advisor M.Sc. Angel Lena, he didn’t know about MongoDB as a support in this area. We had to make a plan to justify the use of MongoDB as the primary database.

The challenge, later on, was how we could store all the different formats in one collection.

At the moment, we’ve been working with the free cluster. As the program will scale and go into the deployment phase, I probably need to increase my cluster. That will be a challenge for me because the investment can be a problem. Besides that, there are not many other projects built with MongoDB in my university, and it is sometimes difficult for me to get support.

To solve this problem, I’ve been working on increasing my knowledge of MongoDB. I’ve been taking classes at MongoDB University. I’ve completed the basics course and the cluster administration course. There are not many certified MongoDB professionals in my country; only two, I believe, and I would like to become the third one.

When I started working on my thesis, I didn’t imagine that I had the opportunity to share my project in this way, and I’m very excited that I can. I hope that MongoDB will work on a Student ambassador program for universities in the future. Universities still need to learn a lot about MongoDB, and it’s exciting that an ambassador program is in the works.

Tools Used
  • Atlas
  • MongoDB
  • JavaScript
  • Data
View CodeLive Demo
Created By

Explore more Student Spotlights

Database Development for Dog Care Providers (DCP)

Learn MongoDB by creating a database for dog care providers!


GoFifa - A comprehensive soccer stats tracker.


Instantly find the streetball game you are looking for anytime and anywhere with Chember!

Hostels Kenya

Find hostels and student apartments all over Kenya

See All

Have an interesting MongoDB project to share? Let us know!

Show off your project
Backpack with GitHub logo plus MongoDB leaf

Get exclusive student access to MongoDB Atlas, University on-demand content and certifications.

Students can apply for the GitHub Student Developer Pack and get access to MongoDB Atlas, University on-demand content and certifications.

GitHub Student Developer Pack
MongoDB logo
© 2021 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.