|
Medial Code Documentation
|
A Regsitry creator to create categoriezed outcome by signal rules. More...
#include <MedRegistry.h>
Public Member Functions | |
| int | init (map< string, string > &map) |
| Initialize class parameters - it also needs repository_path parameter which called "rep". | |
| void | clear_create_variables () |
| clears the signals_rules | |
| ADD_SERIALIZATION_FUNCS(time_unit, registry_records, start_buffer_duration, end_buffer_duration, max_repo_date) private void | get_registry_records (int pid, int bdate, vector< UniversalSigVec_mem > &usv, vector< MedRegistryRecord > &results) |
| < max date allowed to each pid constrain | |
Public Member Functions inherited from MedRegistry | |
| void | write_text_file (const string &file_path) const |
| Writes the file to text file in tab delimeted format: PID, Start_Date, End_Date, min_allowed_date, max_allowed_date, Age, RegistryValue. | |
| void | read_text_file (const string &file_path) |
| Reads the file in text format in tab delimeted. | |
| void | create_registry (MedPidRepository &dataManager, medial::repository::fix_method method=medial::repository::fix_method::none, vector< RepProcessor * > *rep_processors=NULL) |
| Creates vector of registry using already initialized MedPidRepository with signals in parallel manner for each patient. | |
| void | get_registry_creation_codes (vector< string > &signal_codes) const |
| returns the signal codes used to create the registry - to load from rep | |
| void | get_registry_use_codes (vector< string > &signal_codes) const |
| returns the signal codes used to create the registry - to use in create_registry command as input | |
| void | get_pids (vector< int > &pids) const |
| returns all patients ids from registry - unique patient ids | |
| void | merge_records () |
| Merges registry record with same registry values (and continues in time) | |
| void * | new_polymorphic (string dname) |
| for polymorphic classes that want to be able to serialize/deserialize a pointer * to the derived class given its type one needs to implement this function to return a new to the derived class given its type (as in my_type) | |
| MedRegistry () | |
| Default Ctor. | |
| virtual bool | get_pid_records (PidRec &rec, int bDateCode, const vector< int > &used_sigs, vector< MedRegistryRecord > &results) |
| void | set_rep_for_init (MedRepository &rep) |
| Sets Repository object to initialize all registry object, if not given will try to use repository path to read and initialize repository. | |
Public Member Functions inherited from SerializableObject | |
| virtual int | version () const |
| Relevant for serializations. | |
| virtual string | my_class_name () const |
| For better handling of serializations it is highly recommended that each SerializableObject inheriting class will implement the next method. | |
| virtual void | serialized_fields_name (vector< string > &field_names) const |
| The names of the serialized fields. | |
| virtual void | pre_serialization () |
| virtual void | post_deserialization () |
| virtual size_t | get_size () |
| Gets bytes sizes for serializations. | |
| virtual size_t | serialize (unsigned char *blob) |
| Serialiazing object to blob memory. return number ob bytes wrote to memory. | |
| virtual size_t | deserialize (unsigned char *blob) |
| Deserialiazing blob to object. returns number of bytes read. | |
| size_t | serialize_vec (vector< unsigned char > &blob) |
| size_t | deserialize_vec (vector< unsigned char > &blob) |
| virtual size_t | serialize (vector< unsigned char > &blob) |
| virtual size_t | deserialize (vector< unsigned char > &blob) |
| virtual int | read_from_file (const string &fname) |
| read and deserialize model | |
| virtual int | write_to_file (const string &fname) |
| serialize model and write to file | |
| virtual int | read_from_file_unsafe (const string &fname) |
| read and deserialize model without checking version number - unsafe read | |
| int | init_from_string (string init_string) |
| Init from string. | |
| int | init_params_from_file (string init_file) |
| int | init_param_from_file (string file_str, string ¶m) |
| int | update_from_string (const string &init_string) |
| virtual int | update (map< string, string > &map) |
| Virtual to update object from parsed fields. | |
| virtual string | object_json () const |
Data Fields | |
| int | start_buffer_duration |
| the duration buffer form start | |
| int | end_buffer_duration |
| the duration buffer from last date | |
| int | max_repo_date |
| the maximal date for the repository | |
| vector< vector< RegistrySignal * > > | signals_rules |
| the signal rules vectors, first index is signal id, second is list of rules | |
Data Fields inherited from MedRegistry | |
| vector< MedRegistryRecord > | registry_records |
| the registry records vector | |
| int | time_unit |
| The time unit. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MedRegistry | |
| static MedRegistry * | make_registry (const string ®istry_type, const string &init_str="") |
| creates registry type and initialize it if init_str is not empty Use "binary" for MedRegistryCodesList and "categories" for MedRegistryCategories. | |
| static MedRegistry * | make_registry (const string ®istry_type, MedRepository &rep, const string &init_str="") |
| creates registry type and initialize it if init_str is not empty Use "binary" for MedRegistryCodesList and "categories" for MedRegistryCategories. | |
| static MedRegistry * | create_registry_full (const string ®istry_type, const string &init_str, const string &repository_path, MedModel &model_with_rep_processor, medial::repository::fix_method method=medial::repository::fix_method::none) |
| Creates vector of registry records - handles everything for you in parallel manner for each patient - uses create_registry. | |
Protected Attributes inherited from MedRegistry | |
| vector< string > | signalCodes_names |
| the signals codes by name | |
| bool | need_bdate |
| If true Bdate is also used in registry creation. | |
| medial::repository::fix_method | resolve_conlicts = medial::repository::fix_method::none |
| resolve conflicts in registry method | |
| MedRepository * | rep_for_init = NULL |
| repository pointer to init dicts | |
A Regsitry creator to create categoriezed outcome by signal rules.
Esch signal is condition independence in the rest of the signals.
|
virtual |
clears the signals_rules
Reimplemented from MedRegistry.
|
virtual |
< max date allowed to each pid constrain
Reimplemented from MedRegistry.
|
virtual |
Initialize class parameters - it also needs repository_path parameter which called "rep".
Reimplemented from SerializableObject.