 

DECLARE @PanelInformationValidationSchemaDefaultValues TABLE (
	ParameterType [nvarchar](100) NULL,
	DefaultValue [nvarchar](max) NOT NULL
)


INSERT @PanelInformationValidationSchemaDefaultValues values (N'SafetyAndSOS_RoomType_DefaultValues', N'[{"type": "All","valueType": "string","value": "StandardRoom"}]')
INSERT @PanelInformationValidationSchemaDefaultValues values (N'SafetyAndSOS_BypassExtremeTemperature_DefaultValues', N'[{"type": "Dependent","dependent": ["SafetyAndSOS_HardwareType"],"value": false,"dependentOn": ["Sk2","IUNGO","RFDHost","Vpd","Spb","Mgls"],"interdependencies": [{"forValue": "Mgls","dependent": ["SafetyAndSOS_InputType"],"isExists": true,"dependentOn": ["WaterDetector","GasDetector","FireDetector","PanicDetector"]}]},{"type": "Dependent","dependent": ["SafetyAndSOS_HardwareType"],"value": true,"dependentOn": ["Mgls","Ep","EpPlus","Epa"],"interdependencies": [{"forValue": "Mgls","dependent": ["SafetyAndSOS_InputType"],"isExists": true,"dependentOn": ["EpilepsyDetector","EnuresisDetector"]}]}]')
INSERT @PanelInformationValidationSchemaDefaultValues values (N'SafetyAndSOS_FallDetection_DefaultValues', N'[{"type": "DependentValue","dependent": ["SafetyAndSOS_HardwareType"],"dependentOn": ["Epa"],"takeValueFrom": "PeripheralsConfiguration_EmergencyPendant_FallDetection_DeafultFallDetection"},{"type": "Dependent","dependent": ["SafetyAndSOS_HardwareType"],"dependentOn": ["RFDHost"],"value": true}]')
INSERT @PanelInformationValidationSchemaDefaultValues values (N'SafetyAndSOS_LED_DefaultValues', N'[{"type": "Dependent","dependent": ["SafetyAndSOS_HardwareType"],"value": true,"dependentOn": ["Vpd","Spb"]},{"type": "Dependent","dependent": ["SafetyAndSOS_HardwareType"],"value": false,"dependentOn": ["Mgls","RFDHost"]}]')
INSERT @PanelInformationValidationSchemaDefaultValues values (N'Dialer_Destinations_Port_DefaultValues', N'[{"type": "Dependent","dependent": ["Dialer_Destinations_CommType"],"dependentOn": ["ReceiverEvents"],"value": 10060},{"type": "Dependent","dependent": ["Dialer_Destinations_CommType"],"dependentOn": ["CareAtHomeInformation","Media","Debug"],"value": 5666},{"type": "Dependent","dependent": ["Dialer_Destinations_CommType"],"dependentOn": ["Stun"],"value": 3478},{"type": "Dependent","dependent": ["Dialer_Destinations_Protocol"],"dependentOn": ["SiaIp"],"value": 3061},{"type": "Dependent","dependent": ["Dialer_Destinations_Protocol"],"dependentOn": ["Scaip"],"value": 5060},{"type": "Dependent","dependent": ["Dialer_Destinations_Interface"],"dependentOn": ["Sms"],"value": null}]')
INSERT @PanelInformationValidationSchemaDefaultValues values (N'VoiceAndLEDVoice_Voice_VoiceReminders_PendantTestSchedule_DefaultValues', N'[{"type": "Dependent","dependent": ["VoiceAndLEDVoice_Voice_VoiceReminders_EnableCallback"],"dependentOn": ["true"],"value": {"frequency": "monthlyDayOfMonth","dayOfMonth": null,"startTime": "08:00","maximumDurationAddedToStartTime": "04:00"}}]')
INSERT @PanelInformationValidationSchemaDefaultValues values (N'ControlPanel_LogManagement_PeriodicShipment_DefaultValues', N'[{"type": "Dependent","dependent": ["ControlPanel_LogManagement_AutomaticShipment"],"dependentOn": ["true"],"value": true}]')



MERGE INTO [dbo].PanelInformationValidationSchemaDefaultValues AS TARGET  
USING @PanelInformationValidationSchemaDefaultValues AS SOURCE  
ON TARGET.ParameterType = SOURCE.ParameterType
WHEN NOT MATCHED BY TARGET THEN
INSERT (ParameterType,DefaultValue)
VALUES (SOURCE.ParameterType,SOURCE.DefaultValue )
WHEN MATCHED THEN    
UPDATE SET	TARGET.DefaultValue = source.DefaultValue

OUTPUT $action, SOURCE.*;

