예제 #1
0
        /// <summary>
        /// Creates a collection from its JSON representation
        /// </summary>
        /// <param name="proKnow">Root object for interfacing with the ProKnow API</param>
        /// <param name="json">JSON representation of the patient item</param>
        internal CollectionItem(ProKnowApi proKnow, string json)
        {
            var collectionItem = JsonSerializer.Deserialize <CollectionItem>(json);

            _proKnow     = proKnow;
            Id           = collectionItem.Id;
            Name         = collectionItem.Name;
            Description  = collectionItem.Description;
            Type         = collectionItem.Type;
            WorkspaceIds = collectionItem.WorkspaceIds;
            Patients     = new CollectionPatients(_proKnow, this);
        }
예제 #2
0
 /// <summary>
 /// Finishes initialization of object after deserialization from JSON
 /// </summary>
 /// <param name="proKnow">Root object for interfacing with the ProKnow API</param>
 internal void PostProcessDeserialization(ProKnowApi proKnow)
 {
     _proKnow = proKnow;
     Patients = new CollectionPatients(proKnow, this);
 }