Skip to main content

05. Protocol

How to create a Protocol in Jinko

A protocol in Jinko represents a set of experimental conditions that can be applied to a virtual population (VPOP) to simulate different scenarios. This section explains how to create a protocol using the Jinko API.

What is a Protocol?

A protocol allows you to test different experimental conditions such as varying doses of a drug or treatment regimens. Each protocol arm is applied to all patients in the VPOP, and all patients in the same arm will have identical values for the protocol inputs. More details are available in the protocol guide.

Posting a Protocol

You can upload a Protocol in either JSON or CSV format. The two requests below create a protocol with two arms, each with different treatment schedules.

In JSON Format

import jinko_helpers as jinko

protocol_design = {
"scenarioArms": [
{
"armName": "arm_1",
"armOverrides": [
{"formula": "10", "key": "dose"},
],
},
{
"armName": "arm_2",
"armOverrides": [
{"formula": "20", "key": "dose"},
],
},
]
}

jinko.make_request(
path='/core/v2/scenario_manager/protocol_design',
method='POST',
json=protocol_design,
options={
"name": "Test Protocol",
"description": "A protocol with two arms",
"folder_id": "folder-id-123"
}
)

In CSV format

import jinko_helpers as jinko

csv_protocol_design = """arm,dose
arm_1,10
arm_2,20
"""

jinko.make_request(
path='/core/v2/scenario_manager/protocol_design',
method='POST',
data=csv_protocol_design,
options={
"name": "Test Protocol",
"description": "A protocol with two arms",
"folder_id": "folder-id-123",
'input_format': 'text/csv'
}
)

Additional Resources

For more information about setting up protocol arms, refer to the community guide on protocols.