/// migrate((app) => { const collection = app.findCollectionByNameOrId("pbc_1849418653") // remove field collection.fields.removeById("text2056982715") // remove field collection.fields.removeById("text1796082571") // remove field collection.fields.removeById("text134245426") // remove field collection.fields.removeById("text3083820090") // remove field collection.fields.removeById("text1831371789") // remove field collection.fields.removeById("text2762499640") // remove field collection.fields.removeById("text1812407069") // remove field collection.fields.removeById("text1193963742") // remove field collection.fields.removeById("text3168962645") // update field collection.fields.addAt(2, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2800719619", "max": 0, "min": 0, "name": "cod", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(3, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text4045201499", "max": 0, "min": 0, "name": "naimen", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(4, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text852947741", "max": 0, "min": 0, "name": "comment", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(5, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2697101061", "max": 0, "min": 0, "name": "FIO", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(6, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2982690215", "max": 0, "min": 0, "name": "birth_date", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(7, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1389772923", "max": 0, "min": 0, "name": "otdel", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(8, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2324722085", "max": 0, "min": 0, "name": "profil", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(9, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2392944706", "max": 0, "min": 0, "name": "podraselenie", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(10, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1567889211", "max": 0, "min": 0, "name": "doctor", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(11, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3441287562", "max": 0, "min": 0, "name": "specialnost", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(12, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2170006031", "max": 0, "min": 0, "name": "nachalo", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(13, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3703245907", "max": 0, "min": 0, "name": "okonchanie", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(14, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text532738922", "max": 0, "min": 0, "name": "tip", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(15, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3764823788", "max": 0, "min": 0, "name": "MES", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) return app.save(collection) }, (app) => { const collection = app.findCollectionByNameOrId("pbc_1849418653") // add field collection.fields.addAt(16, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2056982715", "max": 0, "min": 0, "name": "postuplenie", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(17, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1796082571", "max": 0, "min": 0, "name": "vypiska", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(18, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text134245426", "max": 0, "min": 0, "name": "ishodGosp", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(19, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3083820090", "max": 0, "min": 0, "name": "koikodni", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(20, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1831371789", "max": 0, "min": 0, "name": "payment", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(21, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2762499640", "max": 0, "min": 0, "name": "smo", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(22, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1812407069", "max": 0, "min": 0, "name": "ksg", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(23, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1193963742", "max": 0, "min": 0, "name": "kpg", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // add field collection.fields.addAt(24, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3168962645", "max": 0, "min": 0, "name": "prev", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(2, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2800719619", "max": 0, "min": 0, "name": "cardNo", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(3, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text4045201499", "max": 0, "min": 0, "name": "patientName", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(4, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text852947741", "max": 0, "min": 0, "name": "birthDate", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(5, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2697101061", "max": 0, "min": 0, "name": "policyNumber", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(6, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2982690215", "max": 0, "min": 0, "name": "volumeCode", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(7, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1389772923", "max": 0, "min": 0, "name": "volumeCode2", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(8, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2324722085", "max": 0, "min": 0, "name": "finCode", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(9, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2392944706", "max": 0, "min": 0, "name": "amount", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(10, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text1567889211", "max": 0, "min": 0, "name": "diagnosCode", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(11, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3441287562", "max": 0, "min": 0, "name": "department", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(12, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text2170006031", "max": 0, "min": 0, "name": "profile", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(13, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3703245907", "max": 0, "min": 0, "name": "unit", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(14, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text532738922", "max": 0, "min": 0, "name": "doctor", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) // update field collection.fields.addAt(15, new Field({ "autogeneratePattern": "", "hidden": false, "id": "text3764823788", "max": 0, "min": 0, "name": "specialty", "pattern": "", "presentable": false, "primaryKey": false, "required": false, "system": false, "type": "text" })) return app.save(collection) })