synthetichealth/synthea

Transition Type Distributed is not distributing the data according to provided weight

kmvaishakh opened this issue · 2 comments

What happened?

I created test module using synthea module builder and used that in src/main/resources/modules folder and running it using
./run_synthea -p 10 -m testing_state -d src/main/resources/modules/testing_state command . According that if i give population size of 10 i should get 6 observations with state1code and 4 with state2code since i distributed weight as 60% and 40% . But synthea is not generating that number . Its randomly generating . Like 7 observations with state1code and 3 with state2 code.

This is the module i built:

{
"name": "testting state",
"remarks": [
"This example module adds a body temperature reading to every wellness encounter.",
""
],
"states": {
"Initial": {
"type": "Initial",
"name": "Initial",
"distributed_transition": [
{
"transition": "state 1",
"distribution": 0.6
},
{
"transition": "state 2",
"distribution": 0.4
}
],
"remarks": [
"60% and 40%"
]
},
"state 1": {
"type": "Observation",
"category": "vital-signs",
"unit": "",
"codes": [
{
"system": "LOINC",
"code": "state1code",
"display": "LOINC Code",
"value_set": ""
}
],
"distribution": {
"kind": "EXACT",
"round": false,
"parameters": {
"value": 1
}
},
"direct_transition": "Terminal",
"name": "state 1"
},
"state 2": {
"type": "Observation",
"category": "vital-signs",
"unit": "",
"codes": [
{
"system": "LOINC",
"code": "State2code",
"display": "LOINC Code",
"value_set": ""
}
],
"distribution": {
"kind": "EXACT",
"round": false,
"parameters": {
"value": 1
}
},
"direct_transition": "Terminal",
"name": "state 2"
},
"Terminal": {
"type": "Terminal",
"name": "Terminal"
}
},
"gmf_version": 2
}

Environment

- OS:macOS13.4
- Java:11.0.20.1

Relevant log output

No response

Also, see #1374