Attributes to output data #1429
Replies: 5 comments 2 replies
-
{
"name": "Attribute Example",
"remarks": [
"Example of recording an attribute in the patient record."
],
"states": {
"Initial": {
"type": "Initial",
"direct_transition": "Wait a Year"
},
"My Attribute": {
"type": "SetAttribute",
"attribute": "my_attribute",
"direct_transition": "Encounter",
"distribution": {
"kind": "UNIFORM",
"round": true,
"parameters": {
"high": 20,
"low": 10
}
}
},
"Wait a Year": {
"type": "Delay",
"distribution": {
"kind": "EXACT",
"parameters": {
"value": 1
}
},
"unit": "years",
"direct_transition": "My Attribute"
},
"Encounter": {
"type": "Encounter",
"reason": "",
"telemedicine_possibility": "none",
"direct_transition": "Record My Attribute",
"wellness": true
},
"Record My Attribute": {
"type": "Observation",
"category": "survey",
"unit": "",
"codes": [
{
"system": "LOINC",
"code": "1234",
"display": "LOINC Code"
}
],
"direct_transition": "End Encounter",
"attribute": "my_attribute"
},
"End Encounter": {
"type": "EncounterEnd",
"direct_transition": "Wait a Year"
}
},
"gmf_version": 2
} |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. This seems like the resulting JSON from the module builder, right? I actually meant if there's a way to see this attribute in the resulting files after calling run_synthea with the module. |
Beta Was this translation helpful? Give feedback.
-
Ah I understand now. Thank you so much for taking the time :) |
Beta Was this translation helpful? Give feedback.
-
I just implemented this solution and it seems to work almost perfectly. The problem is that I'm also using a keep-module. For testing reasons I'm exporting the attribute I want to record as an observation right before terminal. There's no other path to terminal as of now. When I'm generating 1000 patients with the keep-module, I get 1000 encounters (1 per patient, that's correct), but only 752 observations with the set LOINC Code. Am I overseeing something here? |
Beta Was this translation helpful? Give feedback.
-
Update: So I looked a little bit for the issue. Right after my Initial State I have a distributed transition to 4 different states (each distribution weighs 0.25). In each of those states, the attribute to export will be either set to 1, 2, 3 or 4. However, if I set the attribute to 0 BEFORE the distributed transition, I have 1000 observations (as wanted, but 248 of those have value 0 on the respective attribute) . The thing is, I really need the distribution between those values and a default value is no option. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm currently implementing a custom module with the Synthea Module builder. Is there any way for me to export the attributes that I set in the module to the generated patient data somehow?
Thanks in advance for any hint!
Greetings!
Beta Was this translation helpful? Give feedback.
All reactions