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

Development of User Defined Administration Protocol Template using Excel #305

Open
yvkashyap opened this Issue Apr 8, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@yvkashyap
Copy link

yvkashyap commented Apr 8, 2019

Hello,
I am trying to perform simulations using 26 different dosing regimens and each regimen has multiple administrations with different doses at each time point. Could you please let me know if I can upload all regimens in an excel format to create an Administration Protocol template to avoid manually entering all 26 dosing regimen.
Thanks,
Kash

@msevestre

This comment has been minimized.

Copy link
Member

msevestre commented Apr 8, 2019

Hey @yvkashyap,

Excel is not supported. However, you could use the snapshot mechanism.

You would have to start PK-sim using the --dev flag. Then you can create one administration protocol, export it to snapshot (json file), open edit with any editore (vscode is great) update it to fit your need and reimport.
This won't be as easy as excel but certainly faster than doing everything by hand

Hope that helps,
Michael

@msevestre

This comment has been minimized.

Copy link
Member

msevestre commented Apr 9, 2019

@yvkashyap To run with the dev flag, simply

  1. right click on the PKSim icon in the tray
  2. go to properties
    image
  3. add the --dev at the end of the target input
    image
@msevestre

This comment has been minimized.

Copy link
Member

msevestre commented Apr 9, 2019

After that you can create an admin protocol and save it to snapshot like so
image

this is how a simple protocol looks like

{
  "Name": "iv 5 mg - Smith 1981",
  "ApplicationType": "IntravenousBolus",
  "DosingInterval": "Single",
  "Parameters": [
    {
      "Name": "InputDose",
      "Value": 5.0,
      "Unit": "mg"
    }
  ]
}

if you create an advance protocol, it will look slightly more complicated but yet easy to update

For example, here is an advanced protocol with 2 entries

{
  "Name": "Advanced",
  "DosingInterval": "Single",
  "Schemas": [
    {
      "Name": "Schema 1",
      "SchemaItems": [
        {
          "Name": "Schema Item 1",
          "ApplicationType": "Oral",
          "FormulationKey": "Formulation",
          "Parameters": [
            {
              "Name": "Start time",
              "Value": 4.0,
              "Unit": "h"
            },
            {
              "Name": "InputDose",
              "Value": 1.0,
              "Unit": "mg/kg"
            },
            {
              "Name": "Volume of water/body weight",
              "Value": 3.5,
              "Unit": "ml/kg"
            }
          ]
        },
        {
          "Name": "Schema Item 2",
          "ApplicationType": "IntravenousBolus",
          "Parameters": [
            {
              "Name": "Start time",
              "Value": 0.0,
              "Unit": "h"
            },
            {
              "Name": "InputDose",
              "Value": 1.0,
              "Unit": "mg/kg"
            }
          ]
        }
      ],
      "Parameters": [
        {
          "Name": "Start time",
          "Value": 1.0,
          "Unit": "h",
          "ValueOrigin": {
            "Source": "Unknown"
          }
        },
        {
          "Name": "NumberOfRepetitions",
          "Value": 3.0,
          "ValueOrigin": {
            "Source": "Unknown"
          }
        },
        {
          "Name": "TimeBetweenRepetitions",
          "Value": 2.0,
          "Unit": "h",
          "ValueOrigin": {
            "Source": "Unknown"
          }
        }
      ]
    }
  ],
  "TimeUnit": "h"
}

in your case, simply update the Input dose

 {
              "Name": "InputDose",
              "Value": 1.0,
              "Unit": "mg/kg"
            }

@msevestre msevestre transferred this issue from Open-Systems-Pharmacology/PK-Sim Apr 9, 2019

@teutonicod

This comment has been minimized.

Copy link
Member

teutonicod commented Apr 9, 2019

Hi @msevestre, what are the implications of starting PK-Sim with the --dev flag? What does it change?

Thanks a lot!

Donato

@msevestre

This comment has been minimized.

Copy link
Member

msevestre commented Apr 9, 2019

@teutonicod Starting with the --dev flag simply adds a bunch of extra features (that we use mostly to debug issues that we have, or generate template files etc..). It does not change the behaviour of the application. Instead, it adds a bunch of extra options, specifically on context menus (All suffixed with the (Developer Only) text)

@yvkashyap

This comment has been minimized.

Copy link
Author

yvkashyap commented Apr 9, 2019

Hi Michael,

Thank you so much for answering my question within such a short time. I was able to convert my Admin Protocols in Excel to .json files and got them imported into PKSim and run simulations accordingly.

Sincerely,
Kash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.