добавил HELPER.md

main
Тухтаров Сергей 2 months ago
parent 2c7812a68a
commit b656b0df16

@ -0,0 +1,19 @@
# board
Почти как dashboard только короче.
## История
- 25-09-2025 Создал репозиторий
- 30-09-2025 Добавил Сережу
- 30-09-2025 Сережа внес свою правку
- 04-10-2025 Добавил структуру проекта в figma
- 05-10-2025 Добавил программу конвертации Excel -> JSON
- 05-10-2025 Добавил дизайн страниц дашборда поликлиники и терапевтического отделения
- 13-10-2025 Изменил программу конвертации (версия 0.1.0)
- Добавил в обработку столбцы от A до Z
- Запуск программы: tsa.exe `<CONFIG>`, где файл конфигурации сордержит всю
необходимую информацию по конвертации, включая входной и выходной файлы.
- Не используемые столбцы в excel при конвертации можно просто не указывать или указать
не существующий столбец в таблице базы данных.
- Допускается указание для имен файлов относительных путей и использование русских букв.
- Для примера см. Стационар.yaml - корректность распределения столбцов не проверял!

@ -0,0 +1 @@
Subproject commit 2c7812a68ab6466ad78e877d1febc4487ce51590

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -0,0 +1,26 @@
inputFile: дорз1_09.xlsx
outputFile: DORZ1.json
sheet: Лист1
startRow: 2
columns:
B: caseId # Ид случая
C: ticketNo # Номер талона
D: patientName # ФИО пациента
E: birthDate # Дата рождения
F: policyNumber # Номер полиса
G: volumeCode # Код объема
H: visitCode # Код посещения
I: amount # Сумма
J: diagnosCode # Код диагноза
K: department # Отделение
L: profile # Профиль
M: unit # Подразделение
N: doctor # Врач
O: specialty # Специальность
P: visit # Посещение
Q: yetCode # УЕТ
R: payment # Оплата
S: smo # СМО
T: prev # Подавался ранее

Binary file not shown.

@ -66,5 +66,5 @@ async function test() {
//test()
//await clearCollection("rmias");
await importJSON("excel/ДВН2.json", "dvn2")
await importJSON("excel/DORZ1.json", "Dorz1")
console.log("Готово")

Binary file not shown.

@ -0,0 +1,323 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": "",
"deleteRule": "",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3338851614",
"max": 0,
"min": 0,
"name": "caseId",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3747851106",
"max": 0,
"min": 0,
"name": "ticketNo",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text4045201499",
"max": 0,
"min": 0,
"name": "patientName",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text852947741",
"max": 0,
"min": 0,
"name": "birthDate",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2697101061",
"max": 0,
"min": 0,
"name": "policyNumber",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2982690215",
"max": 0,
"min": 0,
"name": "volumeCode",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2724104176",
"max": 0,
"min": 0,
"name": "visitCode",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2392944706",
"max": 0,
"min": 0,
"name": "amount",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1567889211",
"max": 0,
"min": 0,
"name": "diagnosCode",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3441287562",
"max": 0,
"min": 0,
"name": "department",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2170006031",
"max": 0,
"min": 0,
"name": "profile",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3703245907",
"max": 0,
"min": 0,
"name": "unit",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text532738922",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3764823788",
"max": 0,
"min": 0,
"name": "specialty",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1132390713",
"max": 0,
"min": 0,
"name": "visit",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1184158426",
"max": 0,
"min": 0,
"name": "yetCode",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text1831371789",
"max": 0,
"min": 0,
"name": "payment",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text2762499640",
"max": 0,
"min": 0,
"name": "smo",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3168962645",
"max": 0,
"min": 0,
"name": "prev",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"hidden": false,
"id": "autodate2990389176",
"name": "created",
"onCreate": true,
"onUpdate": false,
"presentable": false,
"system": false,
"type": "autodate"
},
{
"hidden": false,
"id": "autodate3332085495",
"name": "updated",
"onCreate": true,
"onUpdate": true,
"presentable": false,
"system": false,
"type": "autodate"
}
],
"id": "pbc_3521663574",
"indexes": [],
"listRule": "",
"name": "dorz1",
"system": false,
"type": "base",
"updateRule": "",
"viewRule": ""
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3521663574");
return app.delete(collection);
})

@ -0,0 +1,22 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3521663574")
// update collection data
unmarshal({
"listRule": null,
"viewRule": null
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3521663574")
// update collection data
unmarshal({
"listRule": "",
"viewRule": ""
}, collection)
return app.save(collection)
})

@ -0,0 +1,52 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = new Collection({
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "",
"hidden": false,
"id": "text3208210256",
"max": 0,
"min": 0,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_srCj",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}
],
"id": "pbc_480415205",
"indexes": [],
"listRule": null,
"name": "Sergey_Practic_sql",
"system": false,
"type": "view",
"updateRule": null,
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id,\n doctor\nFROM dorz1",
"viewRule": null
});
return app.save(collection);
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205");
return app.delete(collection);
})

@ -0,0 +1,75 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1"
}, collection)
// remove field
collection.fields.removeById("_clone_srCj")
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_1U8A",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// add field
collection.fields.addAt(2, new Field({
"hidden": false,
"id": "number432430951",
"max": null,
"min": null,
"name": "cnt",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id,\n doctor\nFROM dorz1"
}, collection)
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_srCj",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// remove field
collection.fields.removeById("_clone_1U8A")
// remove field
collection.fields.removeById("number432430951")
return app.save(collection)
})

@ -0,0 +1,58 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\ngroup by doctor"
}, collection)
// remove field
collection.fields.removeById("_clone_1U8A")
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_dlF1",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1"
}, collection)
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_1U8A",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// remove field
collection.fields.removeById("_clone_dlF1")
return app.save(collection)
})

@ -0,0 +1,58 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\n"
}, collection)
// remove field
collection.fields.removeById("_clone_dlF1")
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_nMPs",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\ngroup by doctor"
}, collection)
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_dlF1",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// remove field
collection.fields.removeById("_clone_nMPs")
return app.save(collection)
})

@ -0,0 +1,58 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\nwhere diagnosCode = \"K86.1\"\n"
}, collection)
// remove field
collection.fields.removeById("_clone_nMPs")
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_kzd7",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\n"
}, collection)
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_nMPs",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// remove field
collection.fields.removeById("_clone_kzd7")
return app.save(collection)
})

@ -0,0 +1,58 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\nwhere diagnosCode = \"Z10.8\"\n"
}, collection)
// remove field
collection.fields.removeById("_clone_kzd7")
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_8Fck",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_480415205")
// update collection data
unmarshal({
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom dorz1\nwhere diagnosCode = \"K86.1\"\n"
}, collection)
// add field
collection.fields.addAt(1, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "_clone_kzd7",
"max": 0,
"min": 0,
"name": "doctor",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
// remove field
collection.fields.removeById("_clone_8Fck")
return app.save(collection)
})
Loading…
Cancel
Save