Gravitate-Health / lens-selector-mvp2

Set of lenses for MVP2
Apache License 2.0
0 stars 0 forks source link

[L] Improving, debugging MVP2 lenses for MVP3 #17

Closed joofio closed 1 month ago

aalonsolopez commented 5 months ago

TY!

joofio commented 5 months ago

following this discussion: https://github.com/orgs/Gravitate-Health/discussions/7

aalonsolopez commented 5 months ago

I transfer this issue to the repo that currently has the lenses :)

aalonsolopez commented 5 months ago

@joofio maybe I'm having a concept error, and kinda looks basic but... This is all the info that the IPS have. Where are supposed to be the codes related to each condition that the patient has?

https://gravitate-health.lst.tfo.upm.es/ips/api/fhir/Patient/pedro-patient

joofio commented 5 months ago

this is not the ips. that is the patient resource.

check IPS here: https://gravitate-health.lst.tfo.upm.es/ips/api/fhir/Patient/$summary?identifier=ips-2 or for pedro: https://gravitate-health.lst.tfo.upm.es/ips/api/fhir/Patient/$summary?identifier=Pedro-1

The list of IPSs we have: https://build.fhir.org/ig/hl7-eu/gravitate-health-ips/artifacts.html

aalonsolopez commented 5 months ago

as I said, a concept error by my side 👍🏻 thanks joao

aalonsolopez commented 5 months ago

Condition Lens finished - you can see the code here and it's connected meanwhile I'm thinking a way to make it more human readable. Eventually, we will create a "development library" to have all the logic that is repeated across lenses out of them. You can of course give feedback @joofio. Should I deploy it to dev?

joofio commented 5 months ago

yes it is better to deploy so i can test properly.

aalonsolopez commented 5 months ago

deployed :D

joofio commented 5 months ago

the allergy, intolerance, should be similar...

aalonsolopez commented 5 months ago

Almost the same but looking for intolerance instead of conditions yep

aalonsolopez commented 5 months ago

@joofio have you tried the lens? Is this what you expect?

aalonsolopez commented 5 months ago

A quick update: Pedro has no Allergy nor Intolerance.

joofio commented 5 months ago

try Helen https://build.fhir.org/ig/hl7-eu/gravitate-health-ips/Bundle-gravitate-helen.html will test the other now

joofio commented 5 months ago

@joofio have you tried the lens? Is this what you expect?

link to do it? like name of the lens?

aalonsolopez commented 5 months ago

@joofio have you tried the lens? Is this what you expect?

link to do it? like name of the lens?

lens-selector-mvp2_conditions

aalonsolopez commented 5 months ago

Should we unify Allergy and Intolerance lenses? In FHIR it's the same kind of resource....

joofio commented 5 months ago

yes merge them

aalonsolopez commented 5 months ago

okay!

Edit: OMG I said typo instead of kind. Mondays are hard

joofio commented 5 months ago

should this work ?

### condition lens
POST https://gravitate-health.lst.tfo.upm.es/focusing/focus/bundlepackageleaflet-es-94a96e39cfdcd8b378d12dd4063065f9?preprocessors=preprocessing-service-manual&lenses=lens-selector-mvp2_conditions&patientIdentifier=alicia-1

getting 500

aalonsolopez commented 5 months ago

let me check why is this happening

aalonsolopez commented 5 months ago

In 5 mins it's fixed

aalonsolopez commented 5 months ago

Fixed

joofio commented 5 months ago

can we send a preprocessed epi?instead or raw

aalonsolopez commented 5 months ago

Of course, the preprocessor manual ignores the ePI if its preprocessed

joofio commented 5 months ago

doesnt seem to be doing that.uploaded a test so you can try. https://github.com/hl7-eu/gravitate-health/blob/2c9cb410cbe69a2031aad191c76648d82be22e30/tests/lenses.http#L12

joofio commented 5 months ago

or did you mean a identifier for a preprocessed? and not the epi?

aalonsolopez commented 5 months ago

But there are no codes that Alicia and the preprocessed biktarvy shares, right? Or I'm wrong?

joofio commented 5 months ago

with the preprocessed in the folder, they do. that why i wanted to send a preprocessed epi

aalonsolopez commented 5 months ago

Ah! You mean in the body?

joofio commented 5 months ago

Ah! You mean in the body?

yes

aalonsolopez commented 5 months ago

Then the request you are trying is wrong. It's POST https://gravitate-health.lst.tfo.upm.es/focusing/focus/?preprocessors=preprocessing-service-manual&lenses=lens-selector-mvp2_conditions&patientIdentifier=alicia-1 and the example epi in the body like this

{
    "epi": <full ePI JSON>"
}
aalonsolopez commented 5 months ago

BTW, it doesn't work this way neither because it tries to preprocess it again. I will have to take a look at the Focusing Manager

joofio commented 5 months ago

yeah it doesnt work like this. let me change the preprocessed one on the server to test

aalonsolopez commented 5 months ago

I'm 100% sure that this is due to the change we made to display the errors during the process on the headers in the response. With a quick change it should work because that way is meant to work. (if preprocessed on body, ignore preprocessor)

joofio commented 5 months ago

ok please check that if you can. having he possibility of sending epi data will help testing

aalonsolopez commented 5 months ago

I will write here when I have it working 👍🏻

aalonsolopez commented 5 months ago

Try now :) @joofio

aalonsolopez commented 5 months ago

Also, I discovered that the "Accept": text/html was not working and it's also fixed

joofio commented 5 months ago

Also, I discovered that the "Accept": text/html was not working and it's also fixed

doesnt seem like it . with content-type: application/jsonreturns the html.

EDIT: it is working

POST https://gravitate-health.lst.tfo.upm.es/focusing/focus/?preprocessors=preprocessing-service-manual&lenses=lens-selector-mvp2_conditions&patientIdentifier=alicia-1
content-type: application/json
Accept: application/json
aalonsolopez commented 5 months ago

Nice!

joofio commented 5 months ago

let me do more testing with other codes to check the full compliance. but its looking good

EDIT:

the system changes and the highlight still applies. the match should be code+system

if you think it can take some time, I would prefer to solve this after all the other lenses.

cc @aalonsolopez (made edit, not sure you get the notification)

aalonsolopez commented 5 months ago

meanwhile, by the end of this week, I expect to have all the other lenses working too

aalonsolopez commented 5 months ago

let me do more testing with other codes to check the full compliance. but its looking good

EDIT:

the system changes and the highlight still applies. the match should be code+system

if you think it can take some time, I would prefer to solve this after all the other lenses.

cc @aalonsolopez (made edit, not sure you get the notification)

I think I understand it

aalonsolopez commented 4 months ago

https://github.com/Gravitate-Health/lens-selector-mvp2/commit/e1a9e118356866318568b346bd295e7d7d02801c

Now you can try. I think it's what you want right?

joofio commented 4 months ago

i tested and didnt work...

aalonsolopez commented 4 months ago

okay I forgot to test a thing. let me fix it fast

aalonsolopez commented 4 months ago

Sorry, now it works (I've tested myself). Try changing the system. IDK why the automatic deploy is not working properly.

joofio commented 4 months ago

now it works!

aalonsolopez commented 4 months ago

Go for the next lenses