Changes between Initial Version and Version 1 of About


Ignore:
Timestamp:
12/27/25 09:50:47 (31 hours ago)
Author:
185022
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • About

    v1 v1  
     1= Генерирање на податоци
     2
     3{{{#!cmd
     4./run_synthea.bat -p 250000
     5}}}
     6
     7= Креирање на табели
     8
     9=== Креирање на база на податоци
     10
     11{{{#!sql
     12create database HospitalSyntheaDB
     13on primary
     14(name = 'HospitalSyntheaDB', filename = 'C:\Path\To\Data\HospitalSyntheaDB.mdf', size = 1024MB, filegrowth = 256MB)
     15log on
     16(name = 'HospitalSyntheaDB_log', filename = 'C:\Path\To\Data\HospitalSyntheaDB_log.ldf', size = 512MB, filegrowth = 128MB);
     17go
     18}}}
     19
     20=== Patients табела
     21
     22{{{#!sql
     23create table patients (
     24    id uniqueidentifier primary key,
     25    birthdate date not null,
     26    deathdate date null,
     27    ssn varchar(20) null,
     28    drivers varchar(50) null,
     29    passport varchar(50) null,
     30    prefix varchar(20) null,
     31    first varchar(100) not null,
     32    middle varchar(100) null,
     33    last varchar(100) not null,
     34    suffix varchar(20) null,
     35    maiden varchar(100) null,
     36    marital varchar(20) null,
     37    race varchar(50) not null,
     38    ethnicity varchar(50) not null,
     39    gender char(1) not null,
     40    birthplace varchar(200) null,
     41    address varchar(200) not null,
     42    city varchar(100) not null,
     43    state varchar(50) not null,
     44    county varchar(100) null,
     45    fips varchar(10) null,
     46    zip varchar(20) null,
     47    lat decimal(9,6) null,
     48    lon decimal(9,6) null,
     49    healthcare_expenses decimal(18,2) null,
     50    healthcare_coverage decimal(18,2) null,
     51    income decimal(18,2) null
     52);
     53go
     54}}}
     55
     56=== Encounters табела
     57
     58{{{#!sql
     59create table encounters (
     60    id uniqueidentifier primary key,
     61    start datetime2 not null,
     62    stop datetime2 null,
     63    patient uniqueidentifier not null,
     64    organization uniqueidentifier not null,
     65    provider uniqueidentifier not null,
     66    payer uniqueidentifier not null,
     67    encounterclass varchar(50) not null,
     68    code varchar(50) not null,
     69    description varchar(500) not null,
     70    base_encounter_cost decimal(18,2) not null,
     71    total_claim_cost decimal(18,2) not null,
     72    payer_coverage decimal(18,2) not null,
     73    reasoncode varchar(50) null,
     74    reasondescription varchar(500) null
     75);
     76go
     77}}}
     78
     79=== Conditions табела
     80
     81{{{#!sql
     82create table conditions (
     83    start date not null,
     84    stop date null,
     85    patient uniqueidentifier not null,
     86    encounter uniqueidentifier not null,
     87    system varchar(100) not null,
     88    code varchar(50) not null,
     89    description varchar(500) not null
     90);
     91go
     92}}}
     93
     94=== Observations
     95
     96{{{#!sql
     97create table observations (
     98    date datetime2 not null,
     99    patient uniqueidentifier not null,
     100    encounter uniqueidentifier null,
     101    category varchar(100) null,
     102    code varchar(50) not null,
     103    description varchar(500) not null,
     104    value varchar(max) not null,
     105    units varchar(50) null,
     106    type varchar(50) not null
     107);
     108go
     109}}}
     110
     111=== Medications
     112
     113{{{#!sql
     114create table medications (
     115    start datetime2 not null,
     116    stop datetime2 null,
     117    patient uniqueidentifier not null,
     118    payer uniqueidentifier not null,
     119    encounter uniqueidentifier not null,
     120    code varchar(50) not null,
     121    description varchar(500) not null,
     122    base_cost decimal(18,2) not null,
     123    payer_coverage decimal(18,2) not null,
     124    dispenses int not null,
     125    totalcost decimal(18,2) not null,
     126    reasoncode varchar(50) null,
     127    reasondescription varchar(500) null
     128);
     129go
     130}}}
     131
     132=== Allergies
     133
     134{{{#!sql
     135create table allergies (
     136    start date null,
     137    stop date null,
     138    patient uniqueidentifier not null,
     139    encounter uniqueidentifier null,
     140    code varchar(50) not null,
     141    system varchar(100) not null,
     142    description varchar(500) not null,
     143    type varchar(50) null,
     144    category varchar(50) null,
     145    reaction1 varchar(100) null,
     146    description1 varchar(500) null,
     147    severity1 varchar(50) null,
     148    reaction2 varchar(100) null,
     149    description2 varchar(500) null,
     150    severity2 varchar(50) null
     151);
     152go
     153}}}
     154
     155=== Procedures
     156
     157{{{#!sql
     158create table procedures (
     159    start datetime2 not null,
     160    stop datetime2 null,
     161    patient uniqueidentifier not null,
     162    encounter uniqueidentifier not null,
     163    system varchar(100) null,
     164    code varchar(50) not null,
     165    description varchar(500) not null,
     166    base_cost decimal(18,2) null,
     167    reasoncode varchar(50) null,
     168    reasondescription varchar(500) null
     169);
     170go
     171}}}
     172
     173=== Immunizations
     174
     175{{{#!sql
     176create table immunizations (
     177    date datetime2 not null,
     178    patient uniqueidentifier not null,
     179    encounter uniqueidentifier null,
     180    code varchar(50) not null,
     181    description varchar(500) not null,
     182    base_cost decimal(18,2) not null
     183);
     184go
     185}}}