Skip to content

agustinmoranr/Invitro-Backend

Repository files navigation

Sistema gestor de exámenes clínicos.

Repositories related with Invitro-backend project.

Frontend Repository

Documentation.

Please checkout our in vitro wiki Here you can access to the complete documentation for API using.

API Rutes

Development

API REST builded with:

  • Node.JS + Express.JS
  • Firebase Ecosystem
    • Firebase Authetication
    • Firestore
    • Firebase Storage
    • Firebase cloud Functions
  • Deployed in Heroku.

Collections

  • Users
    • Define all personal data from user.
  • ClinicHistory
    • Define all the consults that user is going to be taking through time as sub-documents.
  • Exams
    • Define all the exams assigned to a pacient.

Each user has a personal document into each collection.

Each document ID is defined by user identity-Number

indentity-Number is an unique combination of numbers/letters (or both) defined on user document-type

Sub-collections.

  • Consults
    • contains all the pacient consults as documents.
  • ExamsAssigned
    • contains all the pacient exams as documents.

collections Data

User

const users = [
    {
        "userId": "MOORO25631EREW25",
        "UserData": {
            "lastName": "User",
            "name": "New",
            "numberContact": 555555,
            "email": "[email protected]",
            "rol": "Admin",
            "identityNumber": "MOORO25631EREW25",
            "userStatus": true,
            "documentType": "INE"
        }
    }
]

ClinicHistory

const clinicHistory = [
    {
        "userId": "MOORO25631EREW25",
        "consults": [
            {
                "consultId": "15-7-2020-23:45:9",
                "consult": {
                    "consultId": "15-7-2020-23:45:9",
                    "date": "15-07-2020",
                    "details":"Pacient presents strong headache"
                }
            }
        ] 
    }
]

Exams

const exam = [
    {
        "userId": "MOORO25631EREW25",
        "examsAssigned": [
            {
                "examId": "3QUf7iM5zwyhrX1ajsGIe",
                "exam": {
                    "consultId": "15-7-2020-23:45:9",
                    "examId": "3QUf7iM5zwyhrX1ajsGIe",
                    "typeExam": "Sangre",
                    "indications": "Take exam with at least 5 hours fasting",
                    "aditionalData": "Continue taking current treatment",
                    "pdfURL": "https://firebasestorage.googleapis.com/v0/b/in-vitro-470ae.appspot.com/o/C66ZE-3Og4iRBAQbQIh60.pdf?alt=media",
                    "status": true
                }
            }
        ]
    }
]

DB structure in Firestore.

Firestore 
        |Collection|        |Document|        |Sub-Collection|     |Sub-Document|
        +
        + Users ------------UserDocument
        +                               
        +
        + ClinicHistory-----UserDocument---------Consults----------consultDocument   
        +                                                                       
        +                                                                                  
        + Exams-------------UserDocument-------ExamsAssigned--------examDocument

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published