This repository contains the example code used in the introductory tutorial. It showcases several self-contained use cases that highlight the main features of the Cardinal SDK, including:
- Creating a patient.
- Generating medical data for that patient (simulating a medical examination with multiple exams).
- Searching through the medical data.
- Sharing the medical data with other doctors and patients.
- Utilizing codifications such as SNOMED-CT and LOINC.
The tutorial code is available in Kotlin, Python, and TypeScript. Below you will find instructions for running the code in all three languages. For further explanations and examples, check the Cardinal documentation.
To run the tutorial in Kotlin, clone this repository:
git clone https://github.com/icure/cardinal-introductory-tutorial.gitThen, open the folder in IntelliJ and run the main function
To run the tutorial in Python, clone this repository:
git clone https://github.com/icure/cardinal-introductory-tutorial.git
cd cardinal-introductory-tutorialIt is recommended to use a virtual environment, to avoid conflicting dependencies. The minimum supported Python version is 3.9.
cd python
python3 -m venv venv
source venv/bin/activateThen, install the Cardinal SDK from PyPI.
pip install cardinal-sdkFinally, run the example Python code.
python src/main.pyTo run the tutorial in Typescript, clone this repository:
git clone https://github.com/icure/cardinal-introductory-tutorial.git
cd cardinal-introductory-tutorialThe minimum supported Node version is 19. You can install it using nvm.
nvm install 19
nvm use 19Then, you can navigate to the typescript directory and install the required dependencies using yarn.
cd typescript
yarn installFinally, run the example Typescript code using yarn:
yarn ts-node --esm src/main.ts