Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Urine compartment emptying" as an event template to PK-Sim #1933

Closed
sfrechen opened this issue Oct 29, 2021 · 12 comments
Closed

Add "Urine compartment emptying" as an event template to PK-Sim #1933

sfrechen opened this issue Oct 29, 2021 · 12 comments
Assignees
Milestone

Comments

@sfrechen
Copy link
Member

Similar as the gallblader emptying event, an event is required to empty the urine compartment.
The event should be available as a selection in the "Create Event" menu. No parameters needed to be specified by the user. The user should simply remove all compounds from the urine compartment (set all amounts to zero).
The event should then be added to a simulation via the "Events" tab, potentially at multiple times for one simulation.

@Yuri05

@AnnikaRPS
Copy link

I strongly agree!

@msevestre msevestre self-assigned this Jan 13, 2022
@msevestre msevestre added this to the Version 11 milestone Jan 13, 2022
@msevestre
Copy link
Member

msevestre commented Jan 13, 2022

@sfrechen Do we need a parameter such as for Gallbladder emptying?
image

@Yuri05 Why do we have this parameter? Is this to turn the event on and off without changing the sim structure?

@sfrechen
Copy link
Member Author

@sfrechen Do we need a parameter such as for Gallbladder emptying? image

@Yuri05 Why do we have this parameter? Is this to turn the event on and off without changing the sim structure?

Yes, we need such an event with such a single parameter. So pretty simple :-)

@msevestre
Copy link
Member

No parameters needed to be specified by the user.

That's why I was confused ah ah :)

For gallbladder, it does something a bit funky

There is a parameter called Time to complete gallbladder refilling. Do we have something like this for Urine as well?

@sfrechen
Copy link
Member Author

There is a parameter called Time to complete gallbladder refilling. Do we have something like this for Urine as well?

No. We just need the option to empty the compartment. Nothing more.

@msevestre
Copy link
Member

@Yuri05 Can we talk about this when you have time?

@msevestre
Copy link
Member

So it's not as easy as it may seem.
We have no way to set all amount in a compartment to zero. GallBladder emptying is done via a transporter from GallBladder to Liver/Duodenum

Option #1. We create a transporter UrineEmptying from Urine into a new compartment (toilet?:)) and we turn that transport on with an event. That way we can empty everuthing at once provided that the transport rate is high (whatever that means)

Option #2. We need to list the molecule to reset explicitely in the event. The problem is that the event will not work in MoBi when adding new molecules (as they need to be listed explicitely)

image

Thougths?

@msevestre
Copy link
Member

@Yuri05 There is this table here (tab_event_molecule)
image

5957,EVENT,Urine_Emptying_StartEvent,4914,DRUG,Events,Zero_Rate,1,1

Which creates this

--------------- SWITCHES ----------
Event: Urine_Emptying_StartEvent
Path: as|Events|PIPI|PIPI_1|Urine_Emptying_StartEvent
Condition: Urine_Emptying_Enabled AND (Time=StartTime)
StartTime: as|Events|PIPI|PIPI_1|Start time(120 [min])
Urine_Emptying_Enabled: as|Events|PIPI|Urine compartment emptying enabled(1)
Time: as|Time(0 [min])
Assignments:
Path: as|Organism|Kidney|Urine|Alfentanil
UseAsValue: True
Formula: 0

So somehow DRUG is replaced with Alfentanil...but only the first drug...maybe we can build upon this
I tried to apply two drugs but only the first one is added

msevestre added a commit that referenced this issue Jan 14, 2022
@Yuri05
Copy link
Member

Yuri05 commented Jan 14, 2022

So somehow DRUG is replaced with Alfentanil...but only the first drug...maybe we can build upon this
I tried to apply two drugs but only the first one is added

I was first wondering why... that's why. Lol
https://github.com/Open-Systems-Pharmacology/OSPSuite.Core/blob/eb53d542421fbb3c13fad936b547dfbd349c8ebb/src/OSPSuite.Core/Domain/Services/KeywordReplacerTask.cs#L83-L88

Actually this code should have been removed after we stopped support for 4.2 projects.
Also the immediate EHC emptying event should be removed from the PK-Sim database (is not used anymore as well)

So for now I see only Option 1 (Transport to 🚽 ) as solution. Or we need new keywords...

@msevestre
Copy link
Member

Lol...I am going to remove that now....4.2 shot going on still

@msevestre
Copy link
Member

Or we need new keywords...

I am going to try this.... "ALL_FLOATING".
This will only be used for Assignment for now

@msevestre
Copy link
Member

Seems to work...
image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants