serenity-health / roadmap

Public roadmap for development of Serenity's apps reported by our community of users
0 stars 1 forks source link

feature/register a loinc code #116

Open chris-dare opened 2 years ago

chris-dare commented 2 years ago

Tell us about your request! LOINC is a database and universal standard for identifying medical laboratory observations. This is what powers the documentation of diagnostic reports on Serenity. Our intial dataset of loinc codes was built on a dataset from Mayo Clinic. However, this needs to be extended on a need basis to include other loinc codes The task is to set up a feature that allows a lab technician to search for and register a loinc observation code for use in the provider's laboratory

Which app does this concern? Provider portal

What will be benefit of this feature? Providers can configure their loinc code without the intervention of the Serenity team

Describe the solution you'd like

  1. Set up an API to register a new loinc code
  2. Design an interface to add a new loinc code
  3. Implement the interface and integrate the API to add loinc codes

Describe alternatives you've considered @dexios1 currently creates this manually as and when requested. It's a boatload of work!

Additional context N/A

chris-dare commented 2 years ago

@agbavorrichmond I need you to set up an interface for this.

Makes sense?

chris-dare commented 2 years ago

@TuyizereBapt setting up the endpoint could just be a simple create and read. We won't be requiring edit or delete.

Here are the constraints:

  1. If the `DiagnosticTestCode.loinc_code already exists, do not create
  2. Every provider will have their set of loinc codes, so you'll need to account for this in endpoint URL via the provider id

The model you'll need for this is diagnostics.models.DiagnosticTestCode

chris-dare commented 2 years ago

@pkdadson Richmond will give you a UI for this

TuyizereBapt commented 2 years ago

@TuyizereBapt setting up the endpoint could just be a simple create and read. We won't be requiring edit or delete.

Here are the constraints:

  1. If the `DiagnosticTestCode.loinc_code already exists, do not create
  2. Every provider will have their set of loinc codes, so you'll need to account for this in endpoint URL via the provider id

The model you'll need for this is diagnostics.models.DiagnosticTestCode

Regarding the first point, should it fail silently by returning an OK status?

chris-dare commented 2 years ago

@TuyizereBapt setting up the endpoint could just be a simple create and read. We won't be requiring edit or delete. Here are the constraints:

  1. If the `DiagnosticTestCode.loinc_code already exists, do not create
  2. Every provider will have their set of loinc codes, so you'll need to account for this in endpoint URL via the provider id

The model you'll need for this is diagnostics.models.DiagnosticTestCode

Regarding the first point, should it fail silently by returning an OK status?

That's fabulous

TuyizereBapt commented 2 years ago

Thanks

TuyizereBapt commented 2 years ago

There is this endpoint for GET path("diagnostic-order-type", DiagnosticTestCodeValuesetListView.as_view()), I want to extend it to support POST to register loinc_code. Is this right? I am asking due to the presence of diagnostic-order-type in the path

TuyizereBapt commented 2 years ago

Hey @dexios1 I looked at the db and I found this test_id = models.TextField(unique=True). is this the actual loinc code rather the loinc_code = models.TextField()? The latter is empty in the db. If yes, why test_id unique across all data whereas it is supposed to be unique per provider?

chris-dare commented 2 years ago

Hey @dexios1 I looked at the db and I found this test_id = models.TextField(unique=True). is this the actual loinc code rather the loinc_code = models.TextField()? The latter is empty in the db. If yes, why test_id unique across all data whereas it is supposed to be unique per provider?

No please it's just a unique id like uuid. At the time we set this up, we were using the dataset from mayo clinic which had duplicated loinc codes - which is why there was a unique test id with each record. And so the way to ensure that we could import all the records was with the test ids - which was in their database as well.

Some entries actually have values for loinc_code. Here's a copy of the dataset that was imported to the DB: https://docs.google.com/spreadsheets/d/1KueUO-EFu27zS2WtcgqYeeR4kIL7Jeca4dFCuRIrjNg/edit#gid=262436576 > Hey @dexios1 I looked at the db and I found this test_id = models.TextField(unique=True). is this the actual loinc code rather the loinc_code = models.TextField()? The latter is empty in the db. If yes, why test_id unique across all data whereas it is supposed to be unique per provider?

No please it's just a unique id like uuid. At the time we set this up, we were using the dataset from mayo clinic which had duplicated loinc codes - which is why there was a unique test id with each record. And so the way to ensure that we could import all the records was with the test ids - which was in their database as well.

Some entries actually have values for loinc_code. Here's a copy of the dataset that was imported to the DB: https://docs.google.com/spreadsheets/d/1KueUO-EFu27zS2WtcgqYeeR4kIL7Jeca4dFCuRIrjNg/edit#gid=262436576

pkdadson commented 2 years ago

@pkdadson Richmond will give you a UI for this

Hello @agbavorrichmond