<< Click to Display Table of Contents >> Import contexts |
![]() ![]() ![]() |
When you want to import data, you will normally take this course:
1.Open an import context (with a call to procedure OpenImportContext)
2.Add a list of persons to the database if needed, using mapping procedures MapPersonBy... or the procedure AddPerson.
3.Add the data with AddLab, AddDiagnose or AddClinProblem, using a BatchId variable supplied from OpenImportContext.
4.Save information about errors that occured with UpdateBatchErrors
5.Close the import context (with a call to procedure CloseImportContext)
In some scenarios, you will also want to add some study groups, and add persons to these groups. An example is the Treat to Target project/study, where a group is added for every physician at a clinic, and their patients are grouped based on who their primary physician is. This is done with two procedures, AddStudyGroup and AddStudCase. After adding a Person to a Study, he becomes a StudyCase, and can be put in a group with UpdateCaseGroup.