Esempio n. 1
0
        public static CptCode FromJson(string jString)
        {
            CptCode result  = null;
            JObject jObject = JsonConvert.DeserializeObject <JObject>(jString);

            if (jObject["codeType"].ToString() == "PQRS")
            {
                PQRSCode pqrsCode = JsonConvert.DeserializeObject <Business.Billing.Model.PQRSCode>(jString, new JsonSerializerSettings
                {
                    TypeNameHandling       = TypeNameHandling.All,
                    ObjectCreationHandling = ObjectCreationHandling.Replace
                });

                pqrsCode.ReportingDefinition = pqrsCode.Description;
                //pqrsCode.Comment = jObject["comment"].ToString();
                result = pqrsCode;
            }
            else
            {
                result = JsonConvert.DeserializeObject <Business.Billing.Model.CptCode>(jString, new JsonSerializerSettings
                {
                    TypeNameHandling       = TypeNameHandling.All,
                    ObjectCreationHandling = ObjectCreationHandling.Replace,
                });
            }

            return(result);
        }
Esempio n. 2
0
        public override CptCode Clone(CptCode cptCodeIn)
        {
            PQRSCode codeIn = (PQRSCode)cptCodeIn;

            return((CptCode)codeIn.MemberwiseClone());
        }