[{"data":1,"prerenderedAt":1553},["ShallowReactive",2],{"/docs/jobs/ambulancejob/api/server-exports/insurance":3,"/docs/jobs/ambulancejob/api/server-exports/insurance-surround":1541,"/docs/jobs/ambulancejob/api/server-exports/insurance-implemented-suggestions":1552},{"id":4,"title":5,"body":6,"description":1532,"extension":1533,"head":1534,"implementedSuggestions":1534,"meta":1535,"navigation":703,"path":1536,"schemaOrg":1534,"seo":1537,"sitemap":1538,"stem":1539,"__hash__":1540},"docs/1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/3.insurance.md","Insurance",{"type":7,"value":8,"toc":1514},"minimark",[9,17,21,34,41,69,127,133,174,206,212,292,357,363,395,424,430,460,489,495,524,553,559,658,839,845,858,890,896,917,980,986,1017,1055,1061,1112,1158,1173,1179,1267,1342,1348,1379,1402,1408,1477,1510],[10,11,12],"p",{},[13,14,16],"a",{"href":15},"/docs/jobs/ambulancejob/api/server-exports","All server exports",[18,19,5],"h2",{"id":20},"insurance",[10,22,23,24,28,29,33],{},"Read and write access to the health-insurance system used by the ambulance billing flow. Read exports let other resources check coverage, calculate co-pays, and enumerate providers. Write exports let admin menus, hospital welcome flows, or custom integrations grant, remove, or extend coverage ",[25,26,27],"strong",{},"without charging the player"," (the in-game ",[30,31,32],"code",{},"/insurance"," command remains the normal purchase flow).",[35,36,38],"h3",{"id":37},"isinsuranceenabled",[30,39,40],{},"isInsuranceEnabled()",[42,43,44,55],"ul",{},[45,46,47,50,51,54],"li",{},[25,48,49],{},"Purpose",": Reports whether the insurance subsystem is enabled in ",[30,52,53],{},"Config.HealthInsurance",".",[45,56,57,60,61,64,65,68],{},[25,58,59],{},"Returns",": ",[30,62,63],{},"boolean"," — ",[30,66,67],{},"true"," when enabled.",[70,71,76],"pre",{"className":72,"code":73,"language":74,"meta":75,"style":75},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","if exports[\"sky_ambulancejob\"]:isInsuranceEnabled() then\n    -- insurance features are available\nend\n","lua","",[30,77,78,114,121],{"__ignoreMap":75},[79,80,83,87,91,95,99,101,104,108,111],"span",{"class":81,"line":82},"line",1,[79,84,86],{"class":85},"s7zQu","if",[79,88,90],{"class":89},"sTEyZ"," exports[",[79,92,94],{"class":93},"sMK4o","\"",[79,96,98],{"class":97},"sfazB","sky_ambulancejob",[79,100,94],{"class":93},[79,102,103],{"class":89},"]:",[79,105,107],{"class":106},"s2Zo4","isInsuranceEnabled",[79,109,110],{"class":89},"() ",[79,112,113],{"class":85},"then\n",[79,115,117],{"class":81,"line":116},2,[79,118,120],{"class":119},"sHwdD","    -- insurance features are available\n",[79,122,124],{"class":81,"line":123},3,[79,125,126],{"class":85},"end\n",[35,128,130],{"id":129},"hasinsuranceplayerid",[30,131,132],{},"hasInsurance(playerId)",[42,134,135,140,158],{},[45,136,137,139],{},[25,138,49],{},": Quick check whether a player currently has active insurance coverage.",[45,141,142,145,146],{},[25,143,144],{},"Arguments",":\n",[42,147,148],{},[45,149,150,153,154,157],{},[30,151,152],{},"playerId"," (",[30,155,156],{},"number","): The server ID of the player.",[45,159,160,60,162,64,164,166,167,170,171,173],{},[25,161,59],{},[30,163,63],{},[30,165,67],{}," when insured, ",[30,168,169],{},"false"," otherwise (also ",[30,172,169],{}," when insurance is disabled).",[70,175,177],{"className":72,"code":176,"language":74,"meta":75,"style":75},"local insured = exports[\"sky_ambulancejob\"]:hasInsurance(playerId)\n",[30,178,179],{"__ignoreMap":75},[79,180,181,184,187,190,192,194,196,198,200,203],{"class":81,"line":82},[79,182,183],{"class":93},"local",[79,185,186],{"class":89}," insured ",[79,188,189],{"class":93},"=",[79,191,90],{"class":89},[79,193,94],{"class":93},[79,195,98],{"class":97},[79,197,94],{"class":93},[79,199,103],{"class":89},[79,201,202],{"class":106},"hasInsurance",[79,204,205],{"class":89},"(playerId)\n",[35,207,209],{"id":208},"getcoverageplayerid",[30,210,211],{},"getCoverage(playerId)",[42,213,214,219,231],{},[45,215,216,218],{},[25,217,49],{},": Returns a compact summary of the player's current coverage.",[45,220,221,145,223],{},[25,222,144],{},[42,224,225],{},[45,226,227,153,229,157],{},[30,228,152],{},[30,230,156],{},[45,232,233,60,235,145,238],{},[25,234,59],{},[30,236,237],{},"table | nil",[42,239,240,253,264,272,280],{},[45,241,242,153,245,248,249,252],{},[30,243,244],{},"providerId",[30,246,247],{},"string",") — Provider ID (e.g. ",[30,250,251],{},"\"standard_care\"",").",[45,254,255,153,258,260,261,252],{},[30,256,257],{},"label",[30,259,247],{},") — Display name (e.g. ",[30,262,263],{},"\"Standard Care\"",[45,265,266,153,269,271],{},[30,267,268],{},"copayPercent",[30,270,156],{},") — Patient co-pay percentage.",[45,273,274,153,277,279],{},[30,275,276],{},"price",[30,278,156],{},") — Configured base premium.",[45,281,282,153,285,287,288,291],{},[30,283,284],{},"expiresAt",[30,286,156],{},") — Unix timestamp when coverage expires; ",[30,289,290],{},"0"," when no expiration.",[70,293,295],{"className":72,"code":294,"language":74,"meta":75,"style":75},"local coverage = exports[\"sky_ambulancejob\"]:getCoverage(playerId)\nif coverage then\n    print(coverage.label, coverage.copayPercent, coverage.expiresAt)\nend\n",[30,296,297,321,329,352],{"__ignoreMap":75},[79,298,299,301,304,306,308,310,312,314,316,319],{"class":81,"line":82},[79,300,183],{"class":93},[79,302,303],{"class":89}," coverage ",[79,305,189],{"class":93},[79,307,90],{"class":89},[79,309,94],{"class":93},[79,311,98],{"class":97},[79,313,94],{"class":93},[79,315,103],{"class":89},[79,317,318],{"class":106},"getCoverage",[79,320,205],{"class":89},[79,322,323,325,327],{"class":81,"line":116},[79,324,86],{"class":85},[79,326,303],{"class":89},[79,328,113],{"class":85},[79,330,331,334,337,340,343,345,347,349],{"class":81,"line":123},[79,332,333],{"class":106},"    print",[79,335,336],{"class":89},"(coverage.",[79,338,257],{"class":339},"sBMFI",[79,341,342],{"class":89},", coverage.",[79,344,268],{"class":339},[79,346,342],{"class":89},[79,348,284],{"class":339},[79,350,351],{"class":89},")\n",[79,353,355],{"class":81,"line":354},4,[79,356,126],{"class":85},[35,358,360],{"id":359},"getproviderplayerid",[30,361,362],{},"getProvider(playerId)",[42,364,365,374,386],{},[45,366,367,369,370,373],{},[25,368,49],{},": Returns the full provider record (including ",[30,371,372],{},"description",") assigned to the player.",[45,375,376,145,378],{},[25,377,144],{},[42,379,380],{},[45,381,382,153,384,157],{},[30,383,152],{},[30,385,156],{},[45,387,388,60,390,64,392,54],{},[25,389,59],{},[30,391,237],{},[30,393,394],{},"{ id, label, description, price, copayPercent }",[70,396,398],{"className":72,"code":397,"language":74,"meta":75,"style":75},"local provider = exports[\"sky_ambulancejob\"]:getProvider(playerId)\n",[30,399,400],{"__ignoreMap":75},[79,401,402,404,407,409,411,413,415,417,419,422],{"class":81,"line":82},[79,403,183],{"class":93},[79,405,406],{"class":89}," provider ",[79,408,189],{"class":93},[79,410,90],{"class":89},[79,412,94],{"class":93},[79,414,98],{"class":97},[79,416,94],{"class":93},[79,418,103],{"class":89},[79,420,421],{"class":106},"getProvider",[79,423,205],{"class":89},[35,425,427],{"id":426},"getcopaypercentplayerid",[30,428,429],{},"getCopayPercent(playerId)",[42,431,432,437,449],{},[45,433,434,436],{},[25,435,49],{},": Returns the percentage the player will pay on a medical bill.",[45,438,439,145,441],{},[25,440,144],{},[42,442,443],{},[45,444,445,153,447,157],{},[30,446,152],{},[30,448,156],{},[45,450,451,60,453,455,456,459],{},[25,452,59],{},[30,454,156],{}," — Co-pay percentage (",[30,457,458],{},"100"," when uninsured or insurance disabled).",[70,461,463],{"className":72,"code":462,"language":74,"meta":75,"style":75},"local percent = exports[\"sky_ambulancejob\"]:getCopayPercent(playerId)\n",[30,464,465],{"__ignoreMap":75},[79,466,467,469,472,474,476,478,480,482,484,487],{"class":81,"line":82},[79,468,183],{"class":93},[79,470,471],{"class":89}," percent ",[79,473,189],{"class":93},[79,475,90],{"class":89},[79,477,94],{"class":93},[79,479,98],{"class":97},[79,481,94],{"class":93},[79,483,103],{"class":89},[79,485,486],{"class":106},"getCopayPercent",[79,488,205],{"class":89},[35,490,492],{"id":491},"getexpiresatplayerid",[30,493,494],{},"getExpiresAt(playerId)",[42,496,497,502,514],{},[45,498,499,501],{},[25,500,49],{},": Returns the Unix timestamp at which the player's coverage expires.",[45,503,504,145,506],{},[25,505,144],{},[42,507,508],{},[45,509,510,153,512,157],{},[30,511,152],{},[30,513,156],{},[45,515,516,60,518,520,521,523],{},[25,517,59],{},[30,519,156],{}," — Unix timestamp; ",[30,522,290],{}," when coverage has no expiration or the player is uninsured.",[70,525,527],{"className":72,"code":526,"language":74,"meta":75,"style":75},"local expiresAt = exports[\"sky_ambulancejob\"]:getExpiresAt(playerId)\n",[30,528,529],{"__ignoreMap":75},[79,530,531,533,536,538,540,542,544,546,548,551],{"class":81,"line":82},[79,532,183],{"class":93},[79,534,535],{"class":89}," expiresAt ",[79,537,189],{"class":93},[79,539,90],{"class":89},[79,541,94],{"class":93},[79,543,98],{"class":97},[79,545,94],{"class":93},[79,547,103],{"class":89},[79,549,550],{"class":106},"getExpiresAt",[79,552,205],{"class":89},[35,554,556],{"id":555},"calculatecopayplayerid-billamount",[30,557,558],{},"calculateCopay(playerId, billAmount)",[42,560,561,566,587],{},[45,562,563,565],{},[25,564,49],{},": Calculates how much a patient would pay for a given bill amount, taking their active health insurance into account. If the player has no insurance or insurance is disabled, the full bill amount is returned.",[45,567,568,145,570],{},[25,569,144],{},[42,571,572,579],{},[45,573,574,153,576,578],{},[30,575,152],{},[30,577,156],{},"): The server ID of the player whose insurance should be checked.",[45,580,581,153,584,586],{},[30,582,583],{},"billAmount",[30,585,156],{},"): The original bill amount in dollars.",[45,588,589,60,591,594,595],{},[25,590,59],{},[30,592,593],{},"table"," with:\n",[42,596,597,605,613,620],{},[45,598,599,153,602,604],{},[30,600,601],{},"copayAmount",[30,603,156],{},") — The amount the patient pays after insurance.",[45,606,607,153,610,612],{},[30,608,609],{},"originalAmount",[30,611,156],{},") — The original bill amount passed in.",[45,614,615,153,617,619],{},[30,616,202],{},[30,618,63],{},") — Whether the player has active insurance.",[45,621,622,153,625,628,629],{},[30,623,624],{},"provider",[30,626,627],{},"table?",") — Insurance provider details (only when insured):\n",[42,630,631,640,648],{},[45,632,633,153,636,248,638,252],{},[30,634,635],{},"id",[30,637,247],{},[30,639,251],{},[45,641,642,153,644,260,646,252],{},[30,643,257],{},[30,645,247],{},[30,647,263],{},[45,649,650,153,652,654,655,252],{},[30,651,268],{},[30,653,156],{},") — The percentage the patient pays (e.g. ",[30,656,657],{},"30",[70,659,661],{"className":72,"code":660,"language":74,"meta":75,"style":75},"-- Example: Patient with \"Standard Care\" (30% copay) and a $900 bill\nlocal result = exports[\"sky_ambulancejob\"]:calculateCopay(playerId, 900)\n\nprint(result.copayAmount)   -- 270 (patient pays 30%)\nprint(result.originalAmount) -- 900\nprint(result.hasInsurance)   -- true\nprint(result.provider.label) -- \"Standard Care\"\n\n-- Example: Patient without insurance\nlocal result = exports[\"sky_ambulancejob\"]:calculateCopay(playerId, 900)\n\nprint(result.copayAmount)   -- 900 (full amount)\nprint(result.hasInsurance)   -- false\n",[30,662,663,668,699,705,721,736,750,768,773,779,806,811,825],{"__ignoreMap":75},[79,664,665],{"class":81,"line":82},[79,666,667],{"class":119},"-- Example: Patient with \"Standard Care\" (30% copay) and a $900 bill\n",[79,669,670,672,675,677,679,681,683,685,687,690,693,697],{"class":81,"line":116},[79,671,183],{"class":93},[79,673,674],{"class":89}," result ",[79,676,189],{"class":93},[79,678,90],{"class":89},[79,680,94],{"class":93},[79,682,98],{"class":97},[79,684,94],{"class":93},[79,686,103],{"class":89},[79,688,689],{"class":106},"calculateCopay",[79,691,692],{"class":89},"(playerId, ",[79,694,696],{"class":695},"sbssI","900",[79,698,351],{"class":89},[79,700,701],{"class":81,"line":123},[79,702,704],{"emptyLinePlaceholder":703},true,"\n",[79,706,707,710,713,715,718],{"class":81,"line":354},[79,708,709],{"class":106},"print",[79,711,712],{"class":89},"(result.",[79,714,601],{"class":339},[79,716,717],{"class":89},")   ",[79,719,720],{"class":119},"-- 270 (patient pays 30%)\n",[79,722,724,726,728,730,733],{"class":81,"line":723},5,[79,725,709],{"class":106},[79,727,712],{"class":89},[79,729,609],{"class":339},[79,731,732],{"class":89},") ",[79,734,735],{"class":119},"-- 900\n",[79,737,739,741,743,745,747],{"class":81,"line":738},6,[79,740,709],{"class":106},[79,742,712],{"class":89},[79,744,202],{"class":339},[79,746,717],{"class":89},[79,748,749],{"class":119},"-- true\n",[79,751,753,755,757,759,761,763,765],{"class":81,"line":752},7,[79,754,709],{"class":106},[79,756,712],{"class":89},[79,758,624],{"class":339},[79,760,54],{"class":89},[79,762,257],{"class":339},[79,764,732],{"class":89},[79,766,767],{"class":119},"-- \"Standard Care\"\n",[79,769,771],{"class":81,"line":770},8,[79,772,704],{"emptyLinePlaceholder":703},[79,774,776],{"class":81,"line":775},9,[79,777,778],{"class":119},"-- Example: Patient without insurance\n",[79,780,782,784,786,788,790,792,794,796,798,800,802,804],{"class":81,"line":781},10,[79,783,183],{"class":93},[79,785,674],{"class":89},[79,787,189],{"class":93},[79,789,90],{"class":89},[79,791,94],{"class":93},[79,793,98],{"class":97},[79,795,94],{"class":93},[79,797,103],{"class":89},[79,799,689],{"class":106},[79,801,692],{"class":89},[79,803,696],{"class":695},[79,805,351],{"class":89},[79,807,809],{"class":81,"line":808},11,[79,810,704],{"emptyLinePlaceholder":703},[79,812,814,816,818,820,822],{"class":81,"line":813},12,[79,815,709],{"class":106},[79,817,712],{"class":89},[79,819,601],{"class":339},[79,821,717],{"class":89},[79,823,824],{"class":119},"-- 900 (full amount)\n",[79,826,828,830,832,834,836],{"class":81,"line":827},13,[79,829,709],{"class":106},[79,831,712],{"class":89},[79,833,202],{"class":339},[79,835,717],{"class":89},[79,837,838],{"class":119},"-- false\n",[35,840,842],{"id":841},"calculateinsurancecopayplayerid-billamount",[30,843,844],{},"calculateInsuranceCopay(playerId, billAmount)",[42,846,847],{},[45,848,849,851,852,857],{},[25,850,49],{},": Alias for ",[13,853,855],{"href":854},"#calculatecopayplayerid-billamount",[30,856,689],{},", kept for backward compatibility. Returns identical results.",[70,859,861],{"className":72,"code":860,"language":74,"meta":75,"style":75},"local result = exports[\"sky_ambulancejob\"]:calculateInsuranceCopay(playerId, 900)\n",[30,862,863],{"__ignoreMap":75},[79,864,865,867,869,871,873,875,877,879,881,884,886,888],{"class":81,"line":82},[79,866,183],{"class":93},[79,868,674],{"class":89},[79,870,189],{"class":93},[79,872,90],{"class":89},[79,874,94],{"class":93},[79,876,98],{"class":97},[79,878,94],{"class":93},[79,880,103],{"class":89},[79,882,883],{"class":106},"calculateInsuranceCopay",[79,885,692],{"class":89},[79,887,696],{"class":695},[79,889,351],{"class":89},[35,891,893],{"id":892},"getallproviders",[30,894,895],{},"getAllProviders()",[42,897,898,907],{},[45,899,900,902,903,906],{},[25,901,49],{},": Returns every insurance provider configured in ",[30,904,905],{},"Config.HealthInsurance.providers",", sorted alphabetically by label.",[45,908,909,60,911,913,914,916],{},[25,910,59],{},[30,912,593],{}," — array of ",[30,915,394],{}," entries (cloned, safe to mutate).",[70,918,920],{"className":72,"code":919,"language":74,"meta":75,"style":75},"for _, provider in ipairs(exports[\"sky_ambulancejob\"]:getAllProviders()) do\n    print(provider.id, provider.label, provider.price)\nend\n",[30,921,922,956,976],{"__ignoreMap":75},[79,923,924,927,930,933,936,939,941,943,945,947,950,953],{"class":81,"line":82},[79,925,926],{"class":85},"for",[79,928,929],{"class":89}," _, provider ",[79,931,932],{"class":85},"in",[79,934,935],{"class":106}," ipairs",[79,937,938],{"class":89},"(exports[",[79,940,94],{"class":93},[79,942,98],{"class":97},[79,944,94],{"class":93},[79,946,103],{"class":89},[79,948,949],{"class":106},"getAllProviders",[79,951,952],{"class":89},"()) ",[79,954,955],{"class":85},"do\n",[79,957,958,960,963,965,968,970,972,974],{"class":81,"line":116},[79,959,333],{"class":106},[79,961,962],{"class":89},"(provider.",[79,964,635],{"class":339},[79,966,967],{"class":89},", provider.",[79,969,257],{"class":339},[79,971,967],{"class":89},[79,973,276],{"class":339},[79,975,351],{"class":89},[79,977,978],{"class":81,"line":123},[79,979,126],{"class":85},[35,981,983],{"id":982},"getproviderbyidproviderid",[30,984,985],{},"getProviderById(providerId)",[42,987,988,995,1011],{},[45,989,990,992,993,54],{},[25,991,49],{},": Returns a single configured provider by its ",[30,994,635],{},[45,996,997,145,999],{},[25,998,144],{},[42,1000,1001],{},[45,1002,1003,153,1005,1007,1008,252],{},[30,1004,244],{},[30,1006,247],{},"): The provider identifier (e.g. ",[30,1009,1010],{},"\"basic_care\"",[45,1012,1013,60,1015,54],{},[25,1014,59],{},[30,1016,237],{},[70,1018,1020],{"className":72,"code":1019,"language":74,"meta":75,"style":75},"local provider = exports[\"sky_ambulancejob\"]:getProviderById(\"basic_care\")\n",[30,1021,1022],{"__ignoreMap":75},[79,1023,1024,1026,1028,1030,1032,1034,1036,1038,1040,1043,1046,1048,1051,1053],{"class":81,"line":82},[79,1025,183],{"class":93},[79,1027,406],{"class":89},[79,1029,189],{"class":93},[79,1031,90],{"class":89},[79,1033,94],{"class":93},[79,1035,98],{"class":97},[79,1037,94],{"class":93},[79,1039,103],{"class":89},[79,1041,1042],{"class":106},"getProviderById",[79,1044,1045],{"class":89},"(",[79,1047,94],{"class":93},[79,1049,1050],{"class":97},"basic_care",[79,1052,94],{"class":93},[79,1054,351],{"class":89},[35,1056,1058],{"id":1057},"getinsuranceconfig",[30,1059,1060],{},"getInsuranceConfig()",[42,1062,1063,1068],{},[45,1064,1065,1067],{},[25,1066,49],{},": Returns a read-only snapshot of the high-level insurance configuration.",[45,1069,1070,60,1072,145,1074],{},[25,1071,59],{},[30,1073,593],{},[42,1075,1076,1084,1092,1100],{},[45,1077,1078,153,1081,1083],{},[30,1079,1080],{},"enabled",[30,1082,63],{},")",[45,1085,1086,153,1089,1091],{},[30,1087,1088],{},"command",[30,1090,247],{},") — Chat command used to open the UI.",[45,1093,1094,153,1097,1099],{},[30,1095,1096],{},"account",[30,1098,247],{},") — Account premiums are charged from.",[45,1101,1102,153,1105,1107,1108,1111],{},[30,1103,1104],{},"expirationOptions",[30,1106,593],{},") — Sorted array of valid ",[30,1109,1110],{},"durationDays"," values.",[70,1113,1115],{"className":72,"code":1114,"language":74,"meta":75,"style":75},"local cfg = exports[\"sky_ambulancejob\"]:getInsuranceConfig()\nprint(cfg.command, cfg.account)\n",[30,1116,1117,1142],{"__ignoreMap":75},[79,1118,1119,1121,1124,1126,1128,1130,1132,1134,1136,1139],{"class":81,"line":82},[79,1120,183],{"class":93},[79,1122,1123],{"class":89}," cfg ",[79,1125,189],{"class":93},[79,1127,90],{"class":89},[79,1129,94],{"class":93},[79,1131,98],{"class":97},[79,1133,94],{"class":93},[79,1135,103],{"class":89},[79,1137,1138],{"class":106},"getInsuranceConfig",[79,1140,1141],{"class":89},"()\n",[79,1143,1144,1146,1149,1151,1154,1156],{"class":81,"line":116},[79,1145,709],{"class":106},[79,1147,1148],{"class":89},"(cfg.",[79,1150,1088],{"class":339},[79,1152,1153],{"class":89},", cfg.",[79,1155,1096],{"class":339},[79,1157,351],{"class":89},[1159,1160,1163],"callout",{"color":1161,"icon":1162},"warning","i-lucide-alert-triangle",[10,1164,1165,1166,1169,1170,1172],{},"The following write exports ",[25,1167,1168],{},"do not charge the player",". They are integration hooks intended for admin menus, hospital welcome flows, or custom scripts. Use the in-game ",[30,1171,32],{}," command for the normal player-purchase flow.",[35,1174,1176],{"id":1175},"setinsuranceplayerid-providerid-durationdays",[30,1177,1178],{},"setInsurance(playerId, providerId, durationDays?)",[42,1180,1181,1186,1217],{},[45,1182,1183,1185],{},[25,1184,49],{},": Assigns or refreshes coverage for the player. When called with the same provider that the player already holds, the duration is appended to the existing expiration (mirrors the in-game purchase flow).",[45,1187,1188,145,1190],{},[25,1189,144],{},[42,1191,1192,1198,1205],{},[45,1193,1194,153,1196,157],{},[30,1195,152],{},[30,1197,156],{},[45,1199,1200,153,1202,1204],{},[30,1201,244],{},[30,1203,247],{},"): One of the configured provider IDs.",[45,1206,1207,153,1209,1212,1213,1216],{},[30,1208,1110],{},[30,1210,1211],{},"number?","): Number of days the coverage lasts. Must be one of ",[30,1214,1215],{},"Config.HealthInsurance.expiration.availableDays",". Defaults to the configured default duration when omitted.",[45,1218,1219,60,1221,64,1224,1226,1227,1229,1230],{},[25,1220,59],{},[30,1222,1223],{},"boolean, string?",[30,1225,67],{}," on success, otherwise ",[30,1228,169],{}," and one of:\n",[42,1231,1232,1238,1246,1252,1258],{},[45,1233,1234,1237],{},[30,1235,1236],{},"\"disabled\""," — insurance is disabled in config.",[45,1239,1240,1243,1244,54],{},[30,1241,1242],{},"\"invalid_provider\""," — unknown ",[30,1245,244],{},[45,1247,1248,1251],{},[30,1249,1250],{},"\"invalid_player\""," — player not online.",[45,1253,1254,1257],{},[30,1255,1256],{},"\"invalid_identifier\""," — could not resolve identifier.",[45,1259,1260,1263,1264,54],{},[30,1261,1262],{},"\"invalid_duration\""," — duration not in ",[30,1265,1266],{},"availableDays",[70,1268,1270],{"className":72,"code":1269,"language":74,"meta":75,"style":75},"local ok, err = exports[\"sky_ambulancejob\"]:setInsurance(playerId, \"basic_care\", 7)\nif not ok then\n    print(\"setInsurance failed:\", err)\nend\n",[30,1271,1272,1310,1322,1338],{"__ignoreMap":75},[79,1273,1274,1276,1279,1281,1283,1285,1287,1289,1291,1294,1296,1298,1300,1302,1305,1308],{"class":81,"line":82},[79,1275,183],{"class":93},[79,1277,1278],{"class":89}," ok, err ",[79,1280,189],{"class":93},[79,1282,90],{"class":89},[79,1284,94],{"class":93},[79,1286,98],{"class":97},[79,1288,94],{"class":93},[79,1290,103],{"class":89},[79,1292,1293],{"class":106},"setInsurance",[79,1295,692],{"class":89},[79,1297,94],{"class":93},[79,1299,1050],{"class":97},[79,1301,94],{"class":93},[79,1303,1304],{"class":89},", ",[79,1306,1307],{"class":695},"7",[79,1309,351],{"class":89},[79,1311,1312,1314,1317,1320],{"class":81,"line":116},[79,1313,86],{"class":85},[79,1315,1316],{"class":93}," not",[79,1318,1319],{"class":89}," ok ",[79,1321,113],{"class":85},[79,1323,1324,1326,1328,1330,1333,1335],{"class":81,"line":123},[79,1325,333],{"class":106},[79,1327,1045],{"class":89},[79,1329,94],{"class":93},[79,1331,1332],{"class":97},"setInsurance failed:",[79,1334,94],{"class":93},[79,1336,1337],{"class":89},", err)\n",[79,1339,1340],{"class":81,"line":354},[79,1341,126],{"class":85},[35,1343,1345],{"id":1344},"removeinsuranceplayerid",[30,1346,1347],{},"removeInsurance(playerId)",[42,1349,1350,1355,1367],{},[45,1351,1352,1354],{},[25,1353,49],{},": Removes the player's coverage and clears the cache.",[45,1356,1357,145,1359],{},[25,1358,144],{},[42,1360,1361],{},[45,1362,1363,153,1365,157],{},[30,1364,152],{},[30,1366,156],{},[45,1368,1369,60,1371,64,1373,1375,1376,1378],{},[25,1370,59],{},[30,1372,63],{},[30,1374,67],{}," when a coverage row was removed, ",[30,1377,169],{}," when the player had no coverage.",[70,1380,1382],{"className":72,"code":1381,"language":74,"meta":75,"style":75},"exports[\"sky_ambulancejob\"]:removeInsurance(playerId)\n",[30,1383,1384],{"__ignoreMap":75},[79,1385,1386,1389,1391,1393,1395,1397,1400],{"class":81,"line":82},[79,1387,1388],{"class":89},"exports[",[79,1390,94],{"class":93},[79,1392,98],{"class":97},[79,1394,94],{"class":93},[79,1396,103],{"class":89},[79,1398,1399],{"class":106},"removeInsurance",[79,1401,205],{"class":89},[35,1403,1405],{"id":1404},"extendinsuranceplayerid-additionaldays",[30,1406,1407],{},"extendInsurance(playerId, additionalDays)",[42,1409,1410,1421,1444],{},[45,1411,1412,1414,1415,1418,1419,54],{},[25,1413,49],{},": Extends an existing coverage's expiration by the given number of days. Base is the later of ",[30,1416,1417],{},"now"," and the current ",[30,1420,284],{},[45,1422,1423,145,1425],{},[25,1424,144],{},[42,1426,1427,1433],{},[45,1428,1429,153,1431,157],{},[30,1430,152],{},[30,1432,156],{},[45,1434,1435,153,1438,1440,1441,252],{},[30,1436,1437],{},"additionalDays",[30,1439,156],{},"): Days to add (must be ",[30,1442,1443],{},"> 0",[45,1445,1446,60,1448,64,1450,1226,1452,1229,1454],{},[25,1447,59],{},[30,1449,1223],{},[30,1451,67],{},[30,1453,169],{},[42,1455,1456,1460,1464,1471],{},[45,1457,1458,1237],{},[30,1459,1236],{},[45,1461,1462,1251],{},[30,1463,1250],{},[45,1465,1466,64,1468,1470],{},[30,1467,1262],{},[30,1469,1437],{}," is missing or non-positive.",[45,1472,1473,1476],{},[30,1474,1475],{},"\"not_insured\""," — player has no active coverage.",[70,1478,1480],{"className":72,"code":1479,"language":74,"meta":75,"style":75},"local ok, err = exports[\"sky_ambulancejob\"]:extendInsurance(playerId, 3)\n",[30,1481,1482],{"__ignoreMap":75},[79,1483,1484,1486,1488,1490,1492,1494,1496,1498,1500,1503,1505,1508],{"class":81,"line":82},[79,1485,183],{"class":93},[79,1487,1278],{"class":89},[79,1489,189],{"class":93},[79,1491,90],{"class":89},[79,1493,94],{"class":93},[79,1495,98],{"class":97},[79,1497,94],{"class":93},[79,1499,103],{"class":89},[79,1501,1502],{"class":106},"extendInsurance",[79,1504,692],{"class":89},[79,1506,1507],{"class":695},"3",[79,1509,351],{"class":89},[1511,1512,1513],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":75,"searchDepth":82,"depth":116,"links":1515},[1516],{"id":20,"depth":116,"text":5,"children":1517},[1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531],{"id":37,"depth":123,"text":40},{"id":129,"depth":123,"text":132},{"id":208,"depth":123,"text":211},{"id":359,"depth":123,"text":362},{"id":426,"depth":123,"text":429},{"id":491,"depth":123,"text":494},{"id":555,"depth":123,"text":558},{"id":841,"depth":123,"text":844},{"id":892,"depth":123,"text":895},{"id":982,"depth":123,"text":985},{"id":1057,"depth":123,"text":1060},{"id":1175,"depth":123,"text":1178},{"id":1344,"depth":123,"text":1347},{"id":1404,"depth":123,"text":1407},"Reference for Insurance in ambulancejob.","md",null,{},"/docs/jobs/ambulancejob/api/server-exports/insurance",{"title":5,"description":1532},{"loc":1536},"1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/3.insurance","4CeF96mUhYxPwBkq9NRNKvPVKmNLNMMva5L9U9tiCiA",[1542,1547],{"title":1543,"path":1544,"stem":1545,"description":1546,"children":-1},"Player State and Revive","/docs/jobs/ambulancejob/api/server-exports/player-state-and-revive","1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/2.player-state-and-revive","Death, revive, god-mode and player-state server exports.",{"title":1548,"path":1549,"stem":1550,"description":1551,"children":-1},"Salary","/docs/jobs/ambulancejob/api/server-exports/salary","1.docs/0.jobs/0.ambulancejob/5.api/1.server-exports/4.salary","Reference for Salary in ambulancejob.",[],1791814177429]