Medial Code Documentation
Loading...
Searching...
No Matches
AlgoMarker.h
1#pragma once
2
3//===============================================================================
4// AlgoMarker.h
5//-------------------------------------------------------------------------------
6//
7// Wrapper for a DLL that will contain :
8// (1) All the needed API's to perform as an AlgoMarker
9// (2) The option to run full MedProcessTools models with MedRepository inputs.
10// (3) All in one single DLL managing it all.
11//
12//===============================================================================
13
14// Branched to a separate branch (test)
15
16// AM_DLL_EXPORT is defined only in the matching .cpp file to handle the dll building
17// apps just include this h file and hence will work in import mode.
18
19// set next to:
20// 1 : and then use Release mode - this is to compile without DLLs (needed for direct tests of performance , etc)
21// 0 : and then use ReleaseDLL mode - this is to compile with DLLs
22#if 0
23#define DLL_WORK_MODE
24#else
25#ifdef _WIN32
26#if defined AM_DLL_IMPORT
27#define DLL_WORK_MODE __declspec(dllimport)
28#else // !AM_DLL_IMPORT
29#define DLL_WORK_MODE __declspec(dllexport)
30#endif // AM_DLL_IMPORT
31#else // !_WIN32
32#if defined AM_DLL_IMPORT
33#define DLL_WORK_MODE
34#else // !AM_DLL_IMPORT
35#define DLL_WORK_MODE __attribute__ ((visibility ("default")))
36#endif //AM_DLL_IMPORT
37#endif // _WIN32
38#endif // 0/1
39
40#ifdef _WIN32
41#pragma warning(disable: 4251)
42#endif
43
44//
45// includes of Medial Internal Libraries
46//
47#ifndef ALGOMARKER_FLAT_API
48#include "AlgoMarkerInternal.h"
49#endif // ALGOMARKER_FLAT_API
50#include "AlgoMarkerErr.h"
51
52
53typedef enum {
54 AM_TYPE_UNDEFINED = 0,
55 AM_TYPE_MEDIAL_INFRA = 1,
56 AM_TYPE_SIMPLE_EXAMPLE_EGFR = 2,
57} AlgoMarkerType;
58
59
60// Extension modes options
61#define LOAD_DICT_FROM_JSON 1001
62#define LOAD_DICT_FROM_FILE 1002
63
64#define DATA_JSON_FORMAT 2001
65#define DATA_BATCH_JSON_FORMAT 2002
66
67#define JSON_REQ_JSON_RESP 3001
68
69#ifndef ALGOMARKER_FLAT_API
70
71//===============================================================================
72// Responses and Requests classes
73//===============================================================================
74extern "C" class DLL_WORK_MODE AMPoint {
75public:
76 int pid = -1;
77 long long timestamp = -1;
78
79 void set(int _pid, long long _timestamp) { pid = _pid; timestamp = _timestamp; }
80
81 void clear() { pid = -1; timestamp = -1; }
82
83 // auto time convertor helper function
84 static int auto_time_convert(long long ts, int to_format);
85};
86
87//-------------------------------------------------------------------------------
88extern "C" class DLL_WORK_MODE AMMessages {
89
90private:
91
92 vector<int> codes;
93 vector<string> args_strs;
94
95 vector<char *> args; // for easier c c# export. pointing to strings , so no need to free.
96 int need_to_update_args = 0;
97
98public:
99
100 // get things
101 int get_n_msgs() { return (int)codes.size(); }
102 void get_messages(int *n_msgs, int **msgs_codes, char ***msgs_args);
103
104 // insert
105 void insert_message(int code, const char *arg_ch);
106
107 // clear
108 void clear() { codes.clear(); args_strs.clear(); args.clear(); }
109
110};
111
112//-------------------------------------------------------------------------------
113extern "C" class DLL_WORK_MODE AMScore {
114private:
115 // no need to release the score type pointer
116 char *p_score_type = NULL;
117 float score = (float)AM_UNDEFINED_VALUE;
118 AMMessages msgs;
119 string extended_score;
120public:
121 // get things
122 void get_score(float *_score, char **_score_type) { *_score = score; *_score_type = p_score_type; }
123 void get_extended_score(char** _ext_score, char **_score_type) { *_ext_score = &extended_score[0]; *_score_type = p_score_type; }
124 AMMessages *get_msgs() { return &msgs; }
125
126 // set things
127 void set_score_type(char *_score_type) { p_score_type = _score_type; }
128 void set_score(float _score) { score = _score; }
129 void set_ext_score(const string& _ext__score) { extended_score = _ext__score; }
130
131 // clear
132 void clear() { msgs.clear(); p_score_type = NULL; score = (float)AM_UNDEFINED_VALUE; }
133};
134
135//-------------------------------------------------------------------------------
136extern "C" class DLL_WORK_MODE AMResponse {
137
138private:
139
140 // p_score_types just points to the common info in the AMResponses class, no need to free
141 vector<AMScore> scores;
142
143 AMPoint point;
144
145 AMMessages msgs;
146
147public:
148
149 // get things
150 int get_patient_id() { return point.pid; }
151 long long get_timestamp() { return point.timestamp; }
152 int get_n_scores() { return (int)scores.size(); }
153 AMScore *get_am_score(int idx) { if (idx < 0 || idx >= scores.size()) return NULL; return &scores[idx]; }
154 int get_score(int idx, float *_score, char **_score_type) {
155 if (idx < 0 || idx >= scores.size()) return AM_FAIL_RC;
156 scores[idx].get_score(_score, _score_type);
157 return AM_OK_RC;
158 }
159 int get_ext_score(int idx, char **_ext_score, char **_score_type) {
160 if (idx < 0 || idx >= scores.size()) return AM_FAIL_RC;
161 scores[idx].get_extended_score(_ext_score, _score_type);
162 return AM_OK_RC;
163 }
164 AMMessages *get_score_msgs(int idx) { if (idx < 0 || idx >= scores.size()) return NULL; return scores[idx].get_msgs(); }
165 AMMessages *get_msgs() { return &msgs; }
166
167 // set things
168 void set_patient_id(int _patient_id) { point.pid = _patient_id; }
169 void set_timestamp(long long _timestamp) { point.timestamp = _timestamp; }
170 void set_score(int idx, float _score, char *_score_type, const string& _ext_score) {
171 if (idx >= 0 && idx < scores.size()) scores[idx].set_score(_score);
172 scores[idx].set_score_type(_score_type);
173 scores[idx].set_ext_score(_ext_score);
174 }
175 void init_scores(int size) { scores.clear(); scores.resize(size); }
176
177 // clear
178 void clear() { scores.clear(); point.clear(); }
179
180
181};
182
183//-------------------------------------------------------------------------------
184extern "C" class DLL_WORK_MODE AMResponses {
185
186private:
187
188 string requestId = "";
189 string version = "";
190
191 // For each point: pid , time : we hold an AMResponse object that contains all the results on all types for this time point
192 // plus all its specific messages
193 vector<AMResponse> responses;
194 map<pair<int, long long>, int> point2response_idx;
195
196 // score_types : these are common to all responses
197 vector<string> score_types_str;
198 vector<char *> score_types;
199 unordered_map<string, int> stype2idx;
200
201 // In here we report messages not specific to a single Response
202 AMMessages shared_msgs;
203public:
204
205 AMResponses() { clear(); }
206 ~AMResponses() { clear(); }
207
208 // get things
209 int get_n_responses() { return (int)responses.size(); }
210 AMResponse *get_response(int index) { if (index >= (int)responses.size()) return NULL; return &(responses[index]); }
211 int get_response_index_by_point(int _pid, long long _timestamp); // if does not exist returns -1.
212 AMResponse *get_response_by_point(int _pid, long long _timestamp); // if does not exist, return NULL
213 void get_score_types(int *n_score_types, char ***_score_types);
214 AMMessages *get_shared_messages() { return &shared_msgs; }
215 char *get_request_id() { return (char *)requestId.c_str(); }
216 char *get_version() { return (char *)version.c_str(); }
217 int get_score(int _pid, long long _timestamp, char *_score_type, float *out_score);
218 int get_score_by_type(int index, char *_score_type, float *out_score);
219 vector<char *> *get_score_type_vec_ptr() { return &score_types; }
220
221 // set things
222 void set_request_id(char *request_id) { requestId = string(request_id); }
223 void set_version(char *_version) { version = string(_version); }
224 void insert_score_types(char **_score_type, int n_score_types);
225 AMResponse *create_point_response(int _pid, long long _timestamp);
226
227 // clear
228 void clear() { requestId = ""; version = ""; responses.clear(); point2response_idx.clear(); score_types_str.clear(); score_types.clear(); stype2idx.clear(); shared_msgs.clear(); }
229
230};
231
232//-------------------------------------------------------------------------------
233extern "C" class DLL_WORK_MODE AMRequest {
234
235private:
236
237 // Id for tracking given by user
238 string requestId = "";
239
240 // score types asked for
241 // Currently supporting : "Raw"
242 vector<string> score_types_str;
243
244 // list of points to give scores at
245 vector<AMPoint> points;
246
247public:
248
249 // get things
250 char *get_request_id() { return (char *)requestId.c_str(); }
251 int get_n_score_types() { return (int)score_types_str.size(); }
252 char *get_score_type(int index) { if (index >= get_n_score_types()) return NULL; return (char *)score_types_str[index].c_str(); }
253 int get_n_points() { return (int)points.size(); }
254 AMPoint *get_point(int index) { if (index >= get_n_points()) return NULL; return &points[index]; }
255 int get_pid(int index) { if (index >= get_n_points()) return -1; return points[index].pid; }
256 long long get_timestamp(int index) { if (index >= get_n_points()) return -1; return points[index].timestamp; }
257
258 // set things
259 void set_request_id(char *req_id) { requestId = string(req_id); }
260 void insert_point(int _pid, long long _timestamp) { AMPoint p; p.set(_pid, _timestamp); points.push_back(p); }
261 void insert_score_types(char **_score_types, int n_score_types) { for (int i = 0; i < n_score_types; i++) score_types_str.push_back(string(_score_types[i])); }
262
263 // clear
264 void clear() { requestId = ""; score_types_str.clear(); points.clear(); }
265
266};
267
268
269//===============================================================================
270// Base AlgoMarker class
271//===============================================================================
272extern "C" class DLL_WORK_MODE AlgoMarker {
273private:
274 AlgoMarkerType type;
275 string name = "";
276 string am_udi_di = "";
277 string am_manfactor_date = "";
278 string am_version = "";
279 string config_fname = "";
280 vector<string> supported_score_types;
281 int time_unit = MedTime::Date; // typically Date (for outpatient) or Minutes (for in patients)
282
283public:
284
285 // major APIs
286 // When creating a new type of algomarker one needs to inherit from this class, and
287 // make sure to implement the following virtual APIs. This will suffice.
288 virtual int Load(const char *config_f) { return 0; }
289 virtual int Unload() { return 0; }
290 virtual int ClearData() { return 0; }
291 virtual int AddData(int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, float* Values) { return 0; }
292 virtual int AddDataStr(int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, char** Values) { return 0; }
293 virtual int Calculate(AMRequest *request, AMResponses *responses) { return 0; }
294
295 // Extentions
296 virtual int AdditionalLoad(const int LoadType, const char *load) { return 0; } // options for LoadType: LOAD_DICT_FROM_FILE , LOAD_DICT_FROM_JSON
297 virtual int AddDataByType(const char *data, char **messages) { *messages = NULL; return 0; }
298 virtual int CalculateByType(int CalculateType, char *request, char **response) { *response = NULL; return 0; } // options: JSON_REQ_JSON_RESP
299
300 //Discovery api
301 virtual int Discovery(char **response) { *response = NULL; return 0; }
302
303 // check supported score types in the supported_score_types vector
304 int IsScoreTypeSupported(const char *_stype);
305
306 // get things
307 int get_type() { return (int)type; }
308 char *get_name() { return (char *)name.c_str(); }
309 char *get_config() { return (char *)config_fname.c_str(); }
310 int get_time_unit() { return time_unit; }
311 char *get_am_udi_di() { return (char *)am_udi_di.c_str(); }
312 char *get_manfactor_date() { return (char *)am_manfactor_date.c_str(); }
313 char *get_am_version() { return (char *)am_version.c_str(); }
314 virtual void show_rep_data(char **response) { *response = NULL; }
315
316 // set things
317 void set_type(int _type) { type = (AlgoMarkerType)_type; }
318 void set_name(const char *_name) { name = string(_name); }
319 void set_config(const char *_config_f) { config_fname = string(_config_f); }
320 void add_supported_stype(const char *stype) { supported_score_types.push_back(string(stype)); }
321 void set_time_unit(int tu) { time_unit = tu; }
322 void set_am_udi_di(const char *_am_udi_di) { am_udi_di = string(_am_udi_di); }
323 void set_manafactur_date(const char *_am_man_date) { am_manfactor_date = string(_am_man_date); }
324 void set_am_version(const char *_am_version) { am_version = string(_am_version); }
325
326 // get a new AlgoMarker
327 static AlgoMarker *make_algomarker(AlgoMarkerType am_type);
328
329 virtual ~AlgoMarker() { ClearData(); Unload(); };
330
331};
332
333
334//===============================================================================
335// MedialInfraAlgoMarker - an AlgoMarker that works with Medial infrastructure
336//===============================================================================
337extern "C" class DLL_WORK_MODE MedialInfraAlgoMarker : public AlgoMarker {
338
339private:
342
343 // some configs
344 string type_in_config_file = "";
345 string rep_fname = "";
346 string model_fname = "";
347 string input_tester_config_file = "";
348 bool allow_rep_adjustments = false;
349
350 int read_config(const string &conf_f);
351
352 //vector<string> supported_score_types ={ "Raw" };
353
354 int sort_needed = 1; // in some debug cases we ommit the sort od data at the end of loading to do that this needs to be 0
355 string am_matrix = ""; // for debugging : if not empty will write matrix to given file name
356 bool first_write = true;
357 int model_end_stage = MED_MDL_END;
358 vector<string> extended_result_fields;
359 bool is_loaded = false;
360
361 void get_jsons_locations(const char *data, vector<size_t> &j_start, vector<size_t> &j_len); // helper to split given string to jsons within it. Used in batch json mode.
362 int AddJsonData(int patient_id, json &j_data, vector<string> &messages, map<pair<int, int>, pair<int, vector<char>>> *data = NULL);
363 int rec_AddDataByType(int DataType, const char *data, vector<string> &messages);
364 void clear_patients_data(const vector<int> &pids);
365 int AddDataStr_data(int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, char** Values,
366 map<pair<int, int>, pair<int, vector<char>>> *data);
367 int AddData_data(int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, float* Values,
368 map<pair<int, int>, pair<int, vector<char>>> *data);
369public:
370 MedialInfraAlgoMarker() { set_type((int)AM_TYPE_MEDIAL_INFRA); add_supported_stype("Raw"); }
371
372 int Load(const char *config_f);
373 int Unload();
374 int ClearData();
375 int AddData(int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, float* Values);
376 int AddDataStr(int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, char** Values);
377 int Calculate(AMRequest *request, AMResponses *responses);
378 int AdditionalLoad(const int LoadType, const char *load); // options for LoadType: LOAD_DICT_FROM_FILE , LOAD_DICT_FROM_JSON
379 int AddDataByType(const char *data, char **messages);
380 int CalculateByType(int CalculateType, char *request, char **response); // options: JSON_REQ_JSON_RESP
381 int Discovery(char **response);
382
383 int set_sort(int s) { sort_needed = s; return 0; } // use only for debug modes.
384 void set_am_matrix(string s) { am_matrix = s; }
385 void get_am_rep_signals(unordered_set<string> &am_sigs) { ma.get_rep_signals(am_sigs); } // returns the available
386 void get_sig_structure(string &sig, int &n_time_channels, int &n_val_channels, int* &is_categ) { ma.get_signal_structure(sig, n_time_channels, n_val_channels, is_categ); }
387
388 string get_sig_unit(const string &sig, int val_channel) { return ma.get_rep().sigs.unit_of_measurement(sig, val_channel); }
389
390 string get_lib_code_version();
391
392 void show_rep_data(char **response);
393};
394
395//===============================================================================
396// SimpleExampleEGFRAlgoMarker - the simplest example for a different AM
397//===============================================================================
398extern "C" class DLL_WORK_MODE SimpleExampleEGFRAlgoMarker : public AlgoMarker {
399
400private:
401
402 // inputs for egfr
403 float age = -1, gender = -1, creatinine = -1;
404 int ethnicity = 0;
405
406 int pid = -1; // this example AM supports only a single pid at a time and no batches
407
408public:
409 SimpleExampleEGFRAlgoMarker() { set_type((int)AM_TYPE_MEDIAL_INFRA); add_supported_stype("Raw"); this->set_name("SimpleEGFR"); }
410
411 int Load(const char *config_f) { ClearData(); return AM_OK_RC; }
412 int Unload() { return AM_OK_RC; }
413 int ClearData() { age = -1; gender = -1; creatinine = -1; return AM_OK_RC; }
414 int AddData(int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, float* Values);
415 int Calculate(AMRequest *request, AMResponses *responses);
416
417};
418
419#endif //ALGOMARKER_FLAT_API
420
421
422//========================================================================================
423// Actual AlgoMarker API to be used via C# :: External users should work ONLY with these !!
424// Any change to the below functions must rely only on exposed API of the above classes.
425//========================================================================================
426
427// all return codes are defined in AlgoMarkerErr.h
428
429// create a new AlgoMarker of type am_type and init its name
430extern "C" DLL_WORK_MODE int AM_API_Create(int am_type, AlgoMarker **new_am);
431
432// loading AlgoMarker and making it ready to get Requests
433extern "C" DLL_WORK_MODE int AM_API_Load(AlgoMarker* pAlgoMarker, const char *config_fname);
434
435// Additional load options for AlgoMarker
436extern "C" DLL_WORK_MODE int AM_API_AdditionalLoad(AlgoMarker* pAlgoMarker, const int load_type, const char *load);
437
438// clearing data from AlgoMarker (recommended at the start and/or end of each query session
439extern "C" DLL_WORK_MODE int AM_API_ClearData(AlgoMarker* pAlgoMarker);
440
441// adding data to an AlgoMarker
442// this API allows adding a specific signal, with matching arrays of times and values
443extern "C" DLL_WORK_MODE int AM_API_AddData(AlgoMarker* pAlgoMarker, int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, float* Values);
444extern "C" DLL_WORK_MODE int AM_API_AddDataStr(AlgoMarker* pAlgoMarker, int patient_id, const char *signalName, int TimeStamps_len, long long* TimeStamps, int Values_len, char** Values);
445
446// adding data in a new DataType
447extern "C" DLL_WORK_MODE int AM_API_AddDataByType(AlgoMarker* pAlgoMarker, const char *data, char **messages);
448
449// Prepare a Request
450// Null RC means failure
451extern "C" DLL_WORK_MODE int AM_API_CreateRequest(char *requestId, char **score_types, int n_score_types, int *patient_ids, long long *time_stamps, int n_points, AMRequest **new_req);
452
453// Create a new empty responses object
454extern "C" DLL_WORK_MODE int AM_API_CreateResponses(AMResponses **new_responses);
455
456// Get scores for a ready request
457extern "C" DLL_WORK_MODE int AM_API_Calculate(AlgoMarker *pAlgoMarker, AMRequest *request, AMResponses *responses);
458
459// Get scores in general types
460extern "C" DLL_WORK_MODE int AM_API_CalculateByType(AlgoMarker *pAlgoMarker, int CalcType, char *request, char **responses);
461
462// get Responses num
463extern "C" DLL_WORK_MODE int AM_API_GetResponsesNum(AMResponses *responses);
464
465// get messages shared for all responses
466extern "C" DLL_WORK_MODE int AM_API_GetSharedMessages(AMResponses *responses, int *n_msgs, int **msgs_codes, char ***msgs_args);
467
468// get a response at a specific index
469extern "C" DLL_WORK_MODE int AM_API_GetResponseIndex(AMResponses *responses, int _pid, long long _timestamp);
470
471// get the request id that was used to create a responses object
472extern "C" DLL_WORK_MODE int AM_API_GetResponsesRequestId(AMResponses *responses, char **requestId);
473
474// get a score from responses given the response index and the type of the score
475extern "C" DLL_WORK_MODE int AM_API_GetResponseScoreByType(AMResponses *responses, int res_index, char *_score_type, float *out_score);
476
477// get a response at a certain index in responses
478extern "C" DLL_WORK_MODE int AM_API_GetResponseAtIndex(AMResponses *responses, int index, AMResponse **response);
479
480// get number of different scores in a response
481extern "C" DLL_WORK_MODE int AM_API_GetResponseScoresNum(AMResponse *response, int *n_scores);
482
483// get response score at a given score_index, returns pid, ts, score, and score_type
484extern "C" DLL_WORK_MODE int AM_API_GetResponseScoreByIndex(AMResponse *response, int score_index, float *score, char **_score_type);
485
486// get response score at a given score_index, returns pid, ts, score, and score_type
487extern "C" DLL_WORK_MODE int AM_API_GetResponseExtendedScoreByIndex(AMResponse *response, int score_index, char **ext_score, char **_score_type);
488
489// get messages for a response : messages that are score independent (such as raw eligibility tests)
490extern "C" DLL_WORK_MODE int AM_API_GetResponseMessages(AMResponse *response, int *n_msgs, int **msgs_codes, char ***msgs_args);
491
492// get score messages for a specific score index
493extern "C" DLL_WORK_MODE int AM_API_GetScoreMessages(AMResponse *response, int score_index, int *n_msgs, int **msgs_codes, char ***msgs_args);
494
495// get pid and timepoint of a response
496extern "C" DLL_WORK_MODE int AM_API_GetResponsePoint(AMResponse *response, int *pid, long long *timestamp);
497
498// get the name of an algomarker
499extern "C" DLL_WORK_MODE int AM_API_GetName(AlgoMarker *pAlgoMArker, char **name);
500
501// Dispose of AlgoMarker - free all memory
502extern "C" DLL_WORK_MODE void AM_API_DisposeAlgoMarker(AlgoMarker *pAlgoMarker);
503
504// Dispose of AMRequest - free all memory
505extern "C" DLL_WORK_MODE void AM_API_DisposeRequest(AMRequest *pRequest);
506
507// Dispose of responses - free all memory
508extern "C" DLL_WORK_MODE void AM_API_DisposeResponses(AMResponses *responses);
509
510extern "C" DLL_WORK_MODE void AM_API_Discovery(AlgoMarker *pAlgoMarker, char **resp);
511
512// Dispose of allocated memory
513extern "C" DLL_WORK_MODE void AM_API_Dispose(char *data);
514
515//Show memory:
516extern "C" DLL_WORK_MODE int AM_API_DebugRepMemory(AlgoMarker *pAlgoMarker, char **resp);
517
518//========================================================================================
519// Follows is a simple API to allow access to data repositories via c#
520//========================================================================================
521#ifndef ALGOMARKER_FLAT_API
522
523extern "C" class DLL_WORK_MODE RepositoryHandle {
524public:
525 string fname;
526 vector<int> pids;
527 vector<string> signals;
528 MedRepository rep;
529};
530
531extern "C" class DLL_WORK_MODE SignalDataHandle {
532public:
533 UniversalSigVec usv;
534};
535
536// create a Repository Handle and read data into memory, given file name, pids, and signals return: 0: OK -1: failed
537extern "C" DLL_WORK_MODE int DATA_API_RepositoryHandle_Create(RepositoryHandle **new_rep, char *fname, int *pids, int n_pids, char **sigs, int n_sigs);
538
539// Create a SignalDataHandle : can be reused for each read later, create several if working in parallel
540extern "C" DLL_WORK_MODE int DATA_API_SignalDataHandle_Create(SignalDataHandle **new_sdh);
541
542// Read Data into a signal data handle from a repository, returns len=number of elements read
543extern "C" DLL_WORK_MODE int DATA_API_ReadData(RepositoryHandle *rep_h, int pid, char *sig, SignalDataHandle *sdh, int *len);
544
545// Get a time channel at an index from a loaded SignalDataHandle
546extern "C" DLL_WORK_MODE int DATA_API_GetTime(SignalDataHandle *sdh, int idx, int time_channel, int *time);
547
548// Get a value channel at an index from a loaded SignalDataHandle
549extern "C" DLL_WORK_MODE int DATA_API_GetVal(SignalDataHandle *sdh, int idx, int val_channel, float *val);
550
551// dispose of SignalDataHandle
552extern "C" DLL_WORK_MODE void DATA_API_Dispose_SignalDataHandle(SignalDataHandle *sdh);
553
554// dispose of RepositoryHandle
555extern "C" DLL_WORK_MODE void DATA_API_Dispose_RepositoryHandle(RepositoryHandle *rep_h);
556
557#endif //ALGOMARKER_FLAT_API
@ MED_MDL_END
All Done.
Definition MedModel.h:33
Definition AlgoMarker.h:88
Definition AlgoMarker.h:74
Definition AlgoMarker.h:233
Definition AlgoMarker.h:136
Definition AlgoMarker.h:184
Definition AlgoMarker.h:113
Definition AlgoMarker.h:272
Definition InputTesters.h:183
Definition AlgoMarkerInternal.h:154
Definition InfraMed.h:303
static const int Date
dates are in full regular format YYYYMMDD
Definition MedTime.h:25
Definition AlgoMarker.h:337
Definition AlgoMarker.h:523
Definition AlgoMarker.h:531
Definition AlgoMarker.h:398