Fix tests
This commit is contained in:
parent
4543408dc8
commit
209752cd63
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.parser;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.api.server;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.api.server;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
public interface IServerMethodBinding {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.api;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBaseConformance;
|
||||
|
||||
import ca.uhn.fhir.rest.annotation.Metadata;
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.api;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBaseBundle;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.rest.api.Constants;
|
||||
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.gclient;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||
import ca.uhn.fhir.rest.api.PreferReturnEnum;
|
||||
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.param;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
public abstract class BaseParamWithPrefix<T extends BaseParam> extends BaseParam {
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.param;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.param;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class QualifierDetails {
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.apache;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.apache;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.apache;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.apache;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.apache;
|
|||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.apache;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.impl;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.impl;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.impl;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.impl;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.impl;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -18,7 +18,7 @@ import ca.uhn.fhir.rest.client.api.IGenericClient;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.impl;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.interceptor;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.interceptor;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.interceptor;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.http.HttpEntity;
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.interceptor;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.rest.api.Constants;
|
||||
import ca.uhn.fhir.rest.client.api.*;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.interceptor;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -4,7 +4,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.interceptor;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -4,7 +4,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.Method;
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -4,7 +4,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -4,7 +4,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -27,7 +27,7 @@ import ca.uhn.fhir.util.*;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
class SinceOrAtParameter extends SearchParameter {
|
||||
|
||||
// private Class<?> myType;
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.client.method;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.client.method;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Client Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,261 +1,282 @@
|
|||
package org.hl7.fhir.convertors;
|
||||
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of HL7 nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
public class CDAUtilities {
|
||||
|
||||
private Document doc;
|
||||
|
||||
public CDAUtilities(InputStream stream) throws Exception {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setNamespaceAware(true);
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
|
||||
doc = builder.parse(stream);
|
||||
basicChecks();
|
||||
}
|
||||
|
||||
private void basicChecks() throws Exception {
|
||||
Element e = doc.getDocumentElement();
|
||||
rule(e.getNamespaceURI().equals("urn:hl7-org:v3"), "CDA namespace must be ");
|
||||
rule(e.getNodeName().equals("ClinicalDocument"), "CDA root name must be ClinicalDocument");
|
||||
|
||||
}
|
||||
|
||||
private void rule(boolean test, String message) throws Exception {
|
||||
if (!test)
|
||||
throw new Exception(message);
|
||||
|
||||
}
|
||||
|
||||
public Element getElement() {
|
||||
return doc.getDocumentElement();
|
||||
}
|
||||
|
||||
public void checkTemplateId(Element e, String templateId) throws Exception {
|
||||
rule(hasTemplateId(e, templateId), "Template Id '"+templateId+"' not found");
|
||||
|
||||
}
|
||||
|
||||
public Element getChild(Element e, String[] names) throws Exception {
|
||||
for (String n : names) {
|
||||
if (e == null)
|
||||
return null;
|
||||
e = getChild(e, n);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
public Element getChild(Element element, String name) throws Exception {
|
||||
if (element == null)
|
||||
return null;
|
||||
|
||||
Element e = null;
|
||||
Node n = element.getFirstChild();
|
||||
while (n != null) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(name)) {
|
||||
if (e == null) {
|
||||
e = (Element) n;
|
||||
} else {
|
||||
throw new Exception("multiple matches found for "+name);
|
||||
}
|
||||
}
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
public Element getChildByAttribute(Element element, String name, String attrname, String value) throws Exception {
|
||||
if (element == null)
|
||||
return null;
|
||||
|
||||
Element e = null;
|
||||
Node n = element.getFirstChild();
|
||||
while (n != null) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(name) && value.equals(((Element) n).getAttribute(attrname))) {
|
||||
if (e == null) {
|
||||
e = (Element) n;
|
||||
} else {
|
||||
throw new Exception("multiple matches found for "+name);
|
||||
}
|
||||
}
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
public List<Element> getChildren(Element element, String name) {
|
||||
List<Element> l = new ArrayList<Element>();
|
||||
if (element != null) {
|
||||
Node n = element.getFirstChild();
|
||||
while (n != null) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(name)) {
|
||||
l.add((Element) n);
|
||||
}
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
public Element getDescendent(Element element, String path) throws Exception {
|
||||
String[] p = path.split("\\/");
|
||||
return getDescendent(element, p);
|
||||
}
|
||||
|
||||
public Element getDescendent(Element e, String[] path) throws Exception {
|
||||
for (String n : path) {
|
||||
if (e == null)
|
||||
return e;
|
||||
e = getChild(e, n);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
public boolean hasTemplateId(Element e, String tid) {
|
||||
if (e == null)
|
||||
return false;
|
||||
boolean found = false;
|
||||
Node n = e.getFirstChild();
|
||||
while (n != null && !found) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals("templateId") && tid.equals(((Element) n).getAttribute("root")))
|
||||
found = true;
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
public String getStatus(Element act) throws Exception {
|
||||
if (act == null)
|
||||
return null;
|
||||
Element sc = getChild(act, "statusCode");
|
||||
if (sc == null)
|
||||
return null;
|
||||
else
|
||||
return sc.getAttribute("code");
|
||||
}
|
||||
|
||||
public String getSeverity(Element observation) throws Exception {
|
||||
for (Element e : getChildren(observation, "entryRelationship")) {
|
||||
Element child = getChild(e, "observation");
|
||||
if (hasTemplateId(child, "2.16.840.1.113883.10.20.22.4.8"))
|
||||
return getChild(child, "value").getAttribute("code");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String showTemplateIds(Element element) {
|
||||
List<Element> list = getChildren(element, "templateId");
|
||||
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
|
||||
for (Element e : list) {
|
||||
if (e.hasAttribute("extension"))
|
||||
b.append(e.getAttribute("root")+"::"+e.getAttribute("extension"));
|
||||
else
|
||||
b.append(e.getAttribute("root"));
|
||||
}
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
public Element getlastChild(Element e) {
|
||||
Node n = e.getLastChild();
|
||||
while (n != null && n.getNodeType() != Node.ELEMENT_NODE)
|
||||
n = n.getPreviousSibling();
|
||||
return n == null ? null : (Element) n;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method looks up an object by it's id, and only returns it if has a child by the given name
|
||||
* (resolving identifier based cross references)
|
||||
*
|
||||
* @param id
|
||||
* @param childName
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Element getById(Element id, String childName) throws Exception {
|
||||
return getById(doc.getDocumentElement(), id, childName);
|
||||
}
|
||||
|
||||
private Element getById(Element e, Element id, String childName) throws Exception {
|
||||
Element c = XMLUtil.getFirstChild(e);
|
||||
while (c != null) {
|
||||
Element i = getChild(c, "id");
|
||||
if (i != null && matchesAsId(i, id) && getChild(c, childName) != null)
|
||||
return c;
|
||||
Element m = getById(c, id, childName);
|
||||
if (m != null)
|
||||
return m;
|
||||
c = XMLUtil.getNextSibling(c);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean matchesAsId(Element i1, Element i2) {
|
||||
String r1 = i1.getAttribute("root");
|
||||
String r2 = i2.getAttribute("root");
|
||||
String e1 = i1.getAttribute("extension");
|
||||
String e2 = i2.getAttribute("extension");
|
||||
return (r1 != null && r1.equals(r2)) && ((e1 == null && e2 == null) || (e1 != null && e1.equals(e2)));
|
||||
}
|
||||
|
||||
public Element getByXmlId(String id) {
|
||||
return getByXmlId(doc.getDocumentElement(), id);
|
||||
}
|
||||
|
||||
private Element getByXmlId(Element e, String value) {
|
||||
Element c = XMLUtil.getFirstChild(e);
|
||||
while (c != null) {
|
||||
String id = c.getAttribute("ID");
|
||||
if (id != null && id.equals(value))
|
||||
return c;
|
||||
Element m = getByXmlId(c, value);
|
||||
if (m != null)
|
||||
return m;
|
||||
c = XMLUtil.getNextSibling(c);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
package org.hl7.fhir.convertors;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Converter
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of HL7 nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
public class CDAUtilities {
|
||||
|
||||
private Document doc;
|
||||
|
||||
public CDAUtilities(InputStream stream) throws Exception {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setNamespaceAware(true);
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
|
||||
doc = builder.parse(stream);
|
||||
basicChecks();
|
||||
}
|
||||
|
||||
private void basicChecks() throws Exception {
|
||||
Element e = doc.getDocumentElement();
|
||||
rule(e.getNamespaceURI().equals("urn:hl7-org:v3"), "CDA namespace must be ");
|
||||
rule(e.getNodeName().equals("ClinicalDocument"), "CDA root name must be ClinicalDocument");
|
||||
|
||||
}
|
||||
|
||||
private void rule(boolean test, String message) throws Exception {
|
||||
if (!test)
|
||||
throw new Exception(message);
|
||||
|
||||
}
|
||||
|
||||
public Element getElement() {
|
||||
return doc.getDocumentElement();
|
||||
}
|
||||
|
||||
public void checkTemplateId(Element e, String templateId) throws Exception {
|
||||
rule(hasTemplateId(e, templateId), "Template Id '"+templateId+"' not found");
|
||||
|
||||
}
|
||||
|
||||
public Element getChild(Element e, String[] names) throws Exception {
|
||||
for (String n : names) {
|
||||
if (e == null)
|
||||
return null;
|
||||
e = getChild(e, n);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
public Element getChild(Element element, String name) throws Exception {
|
||||
if (element == null)
|
||||
return null;
|
||||
|
||||
Element e = null;
|
||||
Node n = element.getFirstChild();
|
||||
while (n != null) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(name)) {
|
||||
if (e == null) {
|
||||
e = (Element) n;
|
||||
} else {
|
||||
throw new Exception("multiple matches found for "+name);
|
||||
}
|
||||
}
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
public Element getChildByAttribute(Element element, String name, String attrname, String value) throws Exception {
|
||||
if (element == null)
|
||||
return null;
|
||||
|
||||
Element e = null;
|
||||
Node n = element.getFirstChild();
|
||||
while (n != null) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(name) && value.equals(((Element) n).getAttribute(attrname))) {
|
||||
if (e == null) {
|
||||
e = (Element) n;
|
||||
} else {
|
||||
throw new Exception("multiple matches found for "+name);
|
||||
}
|
||||
}
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
public List<Element> getChildren(Element element, String name) {
|
||||
List<Element> l = new ArrayList<Element>();
|
||||
if (element != null) {
|
||||
Node n = element.getFirstChild();
|
||||
while (n != null) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals(name)) {
|
||||
l.add((Element) n);
|
||||
}
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
public Element getDescendent(Element element, String path) throws Exception {
|
||||
String[] p = path.split("\\/");
|
||||
return getDescendent(element, p);
|
||||
}
|
||||
|
||||
public Element getDescendent(Element e, String[] path) throws Exception {
|
||||
for (String n : path) {
|
||||
if (e == null)
|
||||
return e;
|
||||
e = getChild(e, n);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
public boolean hasTemplateId(Element e, String tid) {
|
||||
if (e == null)
|
||||
return false;
|
||||
boolean found = false;
|
||||
Node n = e.getFirstChild();
|
||||
while (n != null && !found) {
|
||||
if (n.getNodeType() == Node.ELEMENT_NODE && n.getNodeName().equals("templateId") && tid.equals(((Element) n).getAttribute("root")))
|
||||
found = true;
|
||||
n = n.getNextSibling();
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
public String getStatus(Element act) throws Exception {
|
||||
if (act == null)
|
||||
return null;
|
||||
Element sc = getChild(act, "statusCode");
|
||||
if (sc == null)
|
||||
return null;
|
||||
else
|
||||
return sc.getAttribute("code");
|
||||
}
|
||||
|
||||
public String getSeverity(Element observation) throws Exception {
|
||||
for (Element e : getChildren(observation, "entryRelationship")) {
|
||||
Element child = getChild(e, "observation");
|
||||
if (hasTemplateId(child, "2.16.840.1.113883.10.20.22.4.8"))
|
||||
return getChild(child, "value").getAttribute("code");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String showTemplateIds(Element element) {
|
||||
List<Element> list = getChildren(element, "templateId");
|
||||
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
|
||||
for (Element e : list) {
|
||||
if (e.hasAttribute("extension"))
|
||||
b.append(e.getAttribute("root")+"::"+e.getAttribute("extension"));
|
||||
else
|
||||
b.append(e.getAttribute("root"));
|
||||
}
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
public Element getlastChild(Element e) {
|
||||
Node n = e.getLastChild();
|
||||
while (n != null && n.getNodeType() != Node.ELEMENT_NODE)
|
||||
n = n.getPreviousSibling();
|
||||
return n == null ? null : (Element) n;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method looks up an object by it's id, and only returns it if has a child by the given name
|
||||
* (resolving identifier based cross references)
|
||||
*
|
||||
* @param id
|
||||
* @param childName
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Element getById(Element id, String childName) throws Exception {
|
||||
return getById(doc.getDocumentElement(), id, childName);
|
||||
}
|
||||
|
||||
private Element getById(Element e, Element id, String childName) throws Exception {
|
||||
Element c = XMLUtil.getFirstChild(e);
|
||||
while (c != null) {
|
||||
Element i = getChild(c, "id");
|
||||
if (i != null && matchesAsId(i, id) && getChild(c, childName) != null)
|
||||
return c;
|
||||
Element m = getById(c, id, childName);
|
||||
if (m != null)
|
||||
return m;
|
||||
c = XMLUtil.getNextSibling(c);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean matchesAsId(Element i1, Element i2) {
|
||||
String r1 = i1.getAttribute("root");
|
||||
String r2 = i2.getAttribute("root");
|
||||
String e1 = i1.getAttribute("extension");
|
||||
String e2 = i2.getAttribute("extension");
|
||||
return (r1 != null && r1.equals(r2)) && ((e1 == null && e2 == null) || (e1 != null && e1.equals(e2)));
|
||||
}
|
||||
|
||||
public Element getByXmlId(String id) {
|
||||
return getByXmlId(doc.getDocumentElement(), id);
|
||||
}
|
||||
|
||||
private Element getByXmlId(Element e, String value) {
|
||||
Element c = XMLUtil.getFirstChild(e);
|
||||
while (c != null) {
|
||||
String id = c.getAttribute("ID");
|
||||
if (id != null && id.equals(value))
|
||||
return c;
|
||||
Element m = getByXmlId(c, value);
|
||||
if (m != null)
|
||||
return m;
|
||||
c = XMLUtil.getNextSibling(c);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,34 @@
|
|||
package org.hl7.fhir.convertors;
|
||||
|
||||
public class CcdaExtensions {
|
||||
public final static String DAF_NAME_RACE = "http://hl7.org/fhir/StructureDefinition/us-core-race";
|
||||
public final static String DAF_NAME_ETHNICITY = "http://hl7.org/fhir/StructureDefinition/us-core-ethnicity";
|
||||
|
||||
public final static String BASE = "http://hl7.org/ccda";
|
||||
public final static String NAME_RELIGION = BASE+"/religious-affiliation";
|
||||
public final static String NAME_BIRTHPLACE = BASE+"birthplace";
|
||||
public final static String NAME_LANG_PROF = BASE+"proficiency-level";
|
||||
|
||||
|
||||
}
|
||||
package org.hl7.fhir.convertors;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Converter
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
public class CcdaExtensions {
|
||||
public final static String DAF_NAME_RACE = "http://hl7.org/fhir/StructureDefinition/us-core-race";
|
||||
public final static String DAF_NAME_ETHNICITY = "http://hl7.org/fhir/StructureDefinition/us-core-ethnicity";
|
||||
|
||||
public final static String BASE = "http://hl7.org/ccda";
|
||||
public final static String NAME_RELIGION = BASE+"/religious-affiliation";
|
||||
public final static String NAME_BIRTHPLACE = BASE+"birthplace";
|
||||
public final static String NAME_LANG_PROF = BASE+"proficiency-level";
|
||||
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,26 @@
|
|||
package org.hl7.fhir.convertors;
|
||||
|
||||
public class ConverterBase {
|
||||
|
||||
}
|
||||
package org.hl7.fhir.convertors;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Converter
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
public class ConverterBase {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,188 +1,209 @@
|
|||
package org.hl7.fhir.convertors;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.dstu3.formats.XmlParser;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
|
||||
import org.hl7.fhir.dstu3.model.Coding;
|
||||
import org.hl7.fhir.dstu3.model.DateTimeType;
|
||||
import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.dstu3.model.Identifier;
|
||||
import org.hl7.fhir.dstu3.model.ValueSet;
|
||||
import org.hl7.fhir.dstu3.terminologies.CodeSystemUtilities;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
|
||||
/**
|
||||
* This is defined as a prototype ClaML importer
|
||||
*
|
||||
* @author Grahame
|
||||
*
|
||||
*/
|
||||
|
||||
public class ICPC2Importer {
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
ICPC2Importer r = new ICPC2Importer();
|
||||
r.setSourceFileName("c:\\temp\\ICPC-2e-v5.0.xml");
|
||||
r.setTargetFileNameCS("C:\\temp\\icpc2.xml");
|
||||
r.setTargetFileNameVS("C:\\temp\\icpc2-vs.xml");
|
||||
r.go();
|
||||
System.out.println("Completed OK");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private String sourceFileName; // the ICPC2 ClaML file
|
||||
private String targetFileNameVS; // the value set to produce
|
||||
private String targetFileNameCS; // the value set to produce
|
||||
|
||||
public ICPC2Importer() {
|
||||
super();
|
||||
}
|
||||
public ICPC2Importer(String sourceFileName, String targetFileNameCS, String targetFileNameVS) {
|
||||
super();
|
||||
this.sourceFileName = sourceFileName;
|
||||
this.targetFileNameCS = targetFileNameCS;
|
||||
this.targetFileNameVS = targetFileNameVS;
|
||||
}
|
||||
public String getSourceFileName() {
|
||||
return sourceFileName;
|
||||
}
|
||||
public void setSourceFileName(String sourceFileName) {
|
||||
this.sourceFileName = sourceFileName;
|
||||
}
|
||||
public String getTargetFileNameCS() {
|
||||
return targetFileNameCS;
|
||||
}
|
||||
public void setTargetFileNameCS(String targetFileName) {
|
||||
this.targetFileNameCS = targetFileName;
|
||||
}
|
||||
|
||||
public String getTargetFileNameVS() {
|
||||
return targetFileNameVS;
|
||||
}
|
||||
public void setTargetFileNameVS(String targetFileName) {
|
||||
this.targetFileNameVS = targetFileName;
|
||||
}
|
||||
|
||||
public void go() throws Exception {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setNamespaceAware(false);
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
Document doc = builder.parse(new FileInputStream(sourceFileName));
|
||||
|
||||
ValueSet vs = new ValueSet();
|
||||
vs.setUrl("http://hl7.org/fhir/sid/icpc2/vs");
|
||||
Element title = XMLUtil.getNamedChild(doc.getDocumentElement(), "Title");
|
||||
vs.setVersion(title.getAttribute("version"));
|
||||
vs.setName(title.getAttribute("name"));
|
||||
vs.setImmutable(true);
|
||||
Element identifier = XMLUtil.getNamedChild(doc.getDocumentElement(), "Identifier");
|
||||
vs.setPublisher(identifier.getAttribute("authority"));
|
||||
vs.addIdentifier(new Identifier().setValue(identifier.getAttribute("uid")));
|
||||
List<Element> authors = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(XMLUtil.getNamedChild(doc.getDocumentElement(), "Authors"), "Author", authors);
|
||||
for (Element a : authors)
|
||||
if (!a.getAttribute("name").contains("+"))
|
||||
vs.addContact().setName(a.getTextContent());
|
||||
vs.setCopyright("The copyright of ICPC, both in hard copy and in electronic form, is owned by Wonca. See http://www.kith.no/templates/kith_WebPage____1110.aspx");
|
||||
vs.setStatus(PublicationStatus.ACTIVE);
|
||||
vs.setDateElement(new DateTimeType(title.getAttribute("date")));
|
||||
|
||||
vs.getCompose().addInclude().setSystem("http://hl7.org/fhir/sid/icpc2");
|
||||
CodeSystem cs = new CodeSystem();
|
||||
cs.setUrl("http://hl7.org/fhir/sid/icpc2");
|
||||
cs.setVersion(title.getAttribute("version"));
|
||||
cs.setName(title.getAttribute("name"));
|
||||
identifier = XMLUtil.getNamedChild(doc.getDocumentElement(), "Identifier");
|
||||
cs.setPublisher(identifier.getAttribute("authority"));
|
||||
cs.setIdentifier(new Identifier().setValue(identifier.getAttribute("uid")));
|
||||
cs.setHierarchyMeaning(CodeSystemHierarchyMeaning.CLASSIFIEDWITH);
|
||||
authors = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(XMLUtil.getNamedChild(doc.getDocumentElement(), "Authors"), "Author", authors);
|
||||
for (Element a : authors)
|
||||
if (!a.getAttribute("name").contains("+"))
|
||||
cs.addContact().setName(a.getTextContent());
|
||||
cs.setCopyright("The copyright of ICPC, both in hard copy and in electronic form, is owned by Wonca. See http://www.kith.no/templates/kith_WebPage____1110.aspx");
|
||||
cs.setStatus(PublicationStatus.ACTIVE);
|
||||
cs.setDateElement(new DateTimeType(title.getAttribute("date")));
|
||||
cs.setValueSet(vs.getUrl());
|
||||
|
||||
Map<String, ConceptDefinitionComponent> concepts = new HashMap<String, ConceptDefinitionComponent>();
|
||||
List<Element> classes = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(doc.getDocumentElement(), "Class", classes);
|
||||
for (Element cls : classes) {
|
||||
processClass(cls, concepts, cs);
|
||||
}
|
||||
|
||||
XmlParser xml = new XmlParser();
|
||||
xml.setOutputStyle(OutputStyle.PRETTY);
|
||||
xml.compose(new FileOutputStream(targetFileNameVS), vs);
|
||||
xml.compose(new FileOutputStream(targetFileNameCS), cs);
|
||||
}
|
||||
|
||||
private void processClass(Element cls, Map<String, ConceptDefinitionComponent> concepts, CodeSystem define) {
|
||||
ConceptDefinitionComponent concept = new ConceptDefinitionComponent();
|
||||
concept.setCode(cls.getAttribute("code"));
|
||||
concept.setDefinition(getRubric(cls, "preferred"));
|
||||
String s = getRubric(cls, "shortTitle");
|
||||
if (s != null && !s.equals(concept.getDefinition()))
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("shortTitle")).setValue(s);
|
||||
s = getRubric(cls, "inclusion");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("inclusion")).setValue(s);
|
||||
s = getRubric(cls, "exclusion");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("exclusion")).setValue(s);
|
||||
s = getRubric(cls, "criteria");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("criteria")).setValue(s);
|
||||
s = getRubric(cls, "consider");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("consider")).setValue(s);
|
||||
s = getRubric(cls, "note");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("note")).setValue(s);
|
||||
|
||||
concepts.put(concept.getCode(), concept);
|
||||
List<Element> children = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(cls, "SubClass", children);
|
||||
if (children.size() > 0)
|
||||
CodeSystemUtilities.setNotSelectable(define, concept);
|
||||
|
||||
Element parent = XMLUtil.getNamedChild(cls, "SuperClass");
|
||||
if (parent == null) {
|
||||
define.addConcept(concept);
|
||||
} else {
|
||||
ConceptDefinitionComponent p = concepts.get(parent.getAttribute("code"));
|
||||
p.getConcept().add(concept);
|
||||
}
|
||||
}
|
||||
|
||||
private String getRubric(Element cls, String kind) {
|
||||
List<Element> rubrics = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(cls, "Rubric", rubrics);
|
||||
for (Element r : rubrics) {
|
||||
if (r.getAttribute("kind").equals(kind))
|
||||
return XMLUtil.getNamedChild(r, "Label").getTextContent();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
package org.hl7.fhir.convertors;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Converter
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.hl7.fhir.dstu3.formats.IParser.OutputStyle;
|
||||
import org.hl7.fhir.dstu3.formats.XmlParser;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem.CodeSystemHierarchyMeaning;
|
||||
import org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent;
|
||||
import org.hl7.fhir.dstu3.model.Coding;
|
||||
import org.hl7.fhir.dstu3.model.DateTimeType;
|
||||
import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
|
||||
import org.hl7.fhir.dstu3.model.Identifier;
|
||||
import org.hl7.fhir.dstu3.model.ValueSet;
|
||||
import org.hl7.fhir.dstu3.terminologies.CodeSystemUtilities;
|
||||
import org.hl7.fhir.utilities.xml.XMLUtil;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
|
||||
/**
|
||||
* This is defined as a prototype ClaML importer
|
||||
*
|
||||
* @author Grahame
|
||||
*
|
||||
*/
|
||||
|
||||
public class ICPC2Importer {
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
ICPC2Importer r = new ICPC2Importer();
|
||||
r.setSourceFileName("c:\\temp\\ICPC-2e-v5.0.xml");
|
||||
r.setTargetFileNameCS("C:\\temp\\icpc2.xml");
|
||||
r.setTargetFileNameVS("C:\\temp\\icpc2-vs.xml");
|
||||
r.go();
|
||||
System.out.println("Completed OK");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private String sourceFileName; // the ICPC2 ClaML file
|
||||
private String targetFileNameVS; // the value set to produce
|
||||
private String targetFileNameCS; // the value set to produce
|
||||
|
||||
public ICPC2Importer() {
|
||||
super();
|
||||
}
|
||||
public ICPC2Importer(String sourceFileName, String targetFileNameCS, String targetFileNameVS) {
|
||||
super();
|
||||
this.sourceFileName = sourceFileName;
|
||||
this.targetFileNameCS = targetFileNameCS;
|
||||
this.targetFileNameVS = targetFileNameVS;
|
||||
}
|
||||
public String getSourceFileName() {
|
||||
return sourceFileName;
|
||||
}
|
||||
public void setSourceFileName(String sourceFileName) {
|
||||
this.sourceFileName = sourceFileName;
|
||||
}
|
||||
public String getTargetFileNameCS() {
|
||||
return targetFileNameCS;
|
||||
}
|
||||
public void setTargetFileNameCS(String targetFileName) {
|
||||
this.targetFileNameCS = targetFileName;
|
||||
}
|
||||
|
||||
public String getTargetFileNameVS() {
|
||||
return targetFileNameVS;
|
||||
}
|
||||
public void setTargetFileNameVS(String targetFileName) {
|
||||
this.targetFileNameVS = targetFileName;
|
||||
}
|
||||
|
||||
public void go() throws Exception {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setNamespaceAware(false);
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
Document doc = builder.parse(new FileInputStream(sourceFileName));
|
||||
|
||||
ValueSet vs = new ValueSet();
|
||||
vs.setUrl("http://hl7.org/fhir/sid/icpc2/vs");
|
||||
Element title = XMLUtil.getNamedChild(doc.getDocumentElement(), "Title");
|
||||
vs.setVersion(title.getAttribute("version"));
|
||||
vs.setName(title.getAttribute("name"));
|
||||
vs.setImmutable(true);
|
||||
Element identifier = XMLUtil.getNamedChild(doc.getDocumentElement(), "Identifier");
|
||||
vs.setPublisher(identifier.getAttribute("authority"));
|
||||
vs.addIdentifier(new Identifier().setValue(identifier.getAttribute("uid")));
|
||||
List<Element> authors = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(XMLUtil.getNamedChild(doc.getDocumentElement(), "Authors"), "Author", authors);
|
||||
for (Element a : authors)
|
||||
if (!a.getAttribute("name").contains("+"))
|
||||
vs.addContact().setName(a.getTextContent());
|
||||
vs.setCopyright("The copyright of ICPC, both in hard copy and in electronic form, is owned by Wonca. See http://www.kith.no/templates/kith_WebPage____1110.aspx");
|
||||
vs.setStatus(PublicationStatus.ACTIVE);
|
||||
vs.setDateElement(new DateTimeType(title.getAttribute("date")));
|
||||
|
||||
vs.getCompose().addInclude().setSystem("http://hl7.org/fhir/sid/icpc2");
|
||||
CodeSystem cs = new CodeSystem();
|
||||
cs.setUrl("http://hl7.org/fhir/sid/icpc2");
|
||||
cs.setVersion(title.getAttribute("version"));
|
||||
cs.setName(title.getAttribute("name"));
|
||||
identifier = XMLUtil.getNamedChild(doc.getDocumentElement(), "Identifier");
|
||||
cs.setPublisher(identifier.getAttribute("authority"));
|
||||
cs.setIdentifier(new Identifier().setValue(identifier.getAttribute("uid")));
|
||||
cs.setHierarchyMeaning(CodeSystemHierarchyMeaning.CLASSIFIEDWITH);
|
||||
authors = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(XMLUtil.getNamedChild(doc.getDocumentElement(), "Authors"), "Author", authors);
|
||||
for (Element a : authors)
|
||||
if (!a.getAttribute("name").contains("+"))
|
||||
cs.addContact().setName(a.getTextContent());
|
||||
cs.setCopyright("The copyright of ICPC, both in hard copy and in electronic form, is owned by Wonca. See http://www.kith.no/templates/kith_WebPage____1110.aspx");
|
||||
cs.setStatus(PublicationStatus.ACTIVE);
|
||||
cs.setDateElement(new DateTimeType(title.getAttribute("date")));
|
||||
cs.setValueSet(vs.getUrl());
|
||||
|
||||
Map<String, ConceptDefinitionComponent> concepts = new HashMap<String, ConceptDefinitionComponent>();
|
||||
List<Element> classes = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(doc.getDocumentElement(), "Class", classes);
|
||||
for (Element cls : classes) {
|
||||
processClass(cls, concepts, cs);
|
||||
}
|
||||
|
||||
XmlParser xml = new XmlParser();
|
||||
xml.setOutputStyle(OutputStyle.PRETTY);
|
||||
xml.compose(new FileOutputStream(targetFileNameVS), vs);
|
||||
xml.compose(new FileOutputStream(targetFileNameCS), cs);
|
||||
}
|
||||
|
||||
private void processClass(Element cls, Map<String, ConceptDefinitionComponent> concepts, CodeSystem define) {
|
||||
ConceptDefinitionComponent concept = new ConceptDefinitionComponent();
|
||||
concept.setCode(cls.getAttribute("code"));
|
||||
concept.setDefinition(getRubric(cls, "preferred"));
|
||||
String s = getRubric(cls, "shortTitle");
|
||||
if (s != null && !s.equals(concept.getDefinition()))
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("shortTitle")).setValue(s);
|
||||
s = getRubric(cls, "inclusion");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("inclusion")).setValue(s);
|
||||
s = getRubric(cls, "exclusion");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("exclusion")).setValue(s);
|
||||
s = getRubric(cls, "criteria");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("criteria")).setValue(s);
|
||||
s = getRubric(cls, "consider");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("consider")).setValue(s);
|
||||
s = getRubric(cls, "note");
|
||||
if (s != null)
|
||||
concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("note")).setValue(s);
|
||||
|
||||
concepts.put(concept.getCode(), concept);
|
||||
List<Element> children = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(cls, "SubClass", children);
|
||||
if (children.size() > 0)
|
||||
CodeSystemUtilities.setNotSelectable(define, concept);
|
||||
|
||||
Element parent = XMLUtil.getNamedChild(cls, "SuperClass");
|
||||
if (parent == null) {
|
||||
define.addConcept(concept);
|
||||
} else {
|
||||
ConceptDefinitionComponent p = concepts.get(parent.getAttribute("code"));
|
||||
p.getConcept().add(concept);
|
||||
}
|
||||
}
|
||||
|
||||
private String getRubric(Element cls, String kind) {
|
||||
List<Element> rubrics = new ArrayList<Element>();
|
||||
XMLUtil.getNamedChildren(cls, "Rubric", rubrics);
|
||||
for (Element r : rubrics) {
|
||||
if (r.getAttribute("kind").equals(kind))
|
||||
return XMLUtil.getNamedChild(r, "Label").getTextContent();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,36 @@
|
|||
package org.hl7.fhir.convertors;
|
||||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public interface VersionConvertorAdvisor30 {
|
||||
boolean ignoreEntry(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src);
|
||||
|
||||
// called ?
|
||||
org.hl7.fhir.instance.model.Resource convert(org.hl7.fhir.dstu3.model.Resource resource) throws FHIRException;
|
||||
|
||||
// called when an r2 value set has a codeSystem in it
|
||||
void handleCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem tgtcs, org.hl7.fhir.dstu3.model.ValueSet source);
|
||||
|
||||
org.hl7.fhir.dstu3.model.CodeSystem getCodeSystem(org.hl7.fhir.dstu3.model.ValueSet src);
|
||||
}
|
||||
package org.hl7.fhir.convertors;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Converter
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public interface VersionConvertorAdvisor30 {
|
||||
boolean ignoreEntry(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src);
|
||||
|
||||
// called ?
|
||||
org.hl7.fhir.instance.model.Resource convert(org.hl7.fhir.dstu3.model.Resource resource) throws FHIRException;
|
||||
|
||||
// called when an r2 value set has a codeSystem in it
|
||||
void handleCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem tgtcs, org.hl7.fhir.dstu3.model.ValueSet source);
|
||||
|
||||
org.hl7.fhir.dstu3.model.CodeSystem getCodeSystem(org.hl7.fhir.dstu3.model.ValueSet src);
|
||||
}
|
||||
|
|
|
@ -1,16 +1,37 @@
|
|||
package org.hl7.fhir.convertors;
|
||||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public interface VersionConvertorAdvisor40 {
|
||||
boolean ignoreEntry(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent src);
|
||||
|
||||
// called ?
|
||||
org.hl7.fhir.instance.model.Resource convertR2(org.hl7.fhir.r4.model.Resource resource) throws FHIRException;
|
||||
org.hl7.fhir.dstu3.model.Resource convertR3(org.hl7.fhir.r4.model.Resource resource) throws FHIRException;
|
||||
|
||||
// called when an r2 value set has a codeSystem in it
|
||||
void handleCodeSystem(org.hl7.fhir.r4.model.CodeSystem tgtcs, org.hl7.fhir.r4.model.ValueSet source);
|
||||
|
||||
org.hl7.fhir.r4.model.CodeSystem getCodeSystem(org.hl7.fhir.r4.model.ValueSet src);
|
||||
}
|
||||
package org.hl7.fhir.convertors;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Converter
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
|
||||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
|
||||
public interface VersionConvertorAdvisor40 {
|
||||
boolean ignoreEntry(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent src);
|
||||
|
||||
// called ?
|
||||
org.hl7.fhir.instance.model.Resource convertR2(org.hl7.fhir.r4.model.Resource resource) throws FHIRException;
|
||||
org.hl7.fhir.dstu3.model.Resource convertR3(org.hl7.fhir.r4.model.Resource resource) throws FHIRException;
|
||||
|
||||
// called when an r2 value set has a codeSystem in it
|
||||
void handleCodeSystem(org.hl7.fhir.r4.model.CodeSystem tgtcs, org.hl7.fhir.r4.model.ValueSet source);
|
||||
|
||||
org.hl7.fhir.r4.model.CodeSystem getCodeSystem(org.hl7.fhir.r4.model.ValueSet src);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -53,26 +53,6 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>sources</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>javadoc</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||
|
@ -152,7 +132,27 @@
|
|||
<classifier>javadoc</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>sources</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>javadoc</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
|
@ -168,7 +168,12 @@
|
|||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-cli-app</artifactId>
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.jpa.dao;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR JPA Server
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IAnyResource;
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
|
@ -31,4 +51,4 @@ final class MetadataKeyResourcePid extends ResourceMetadataKeySupportingAnyResou
|
|||
public void put(IResource theResource, Long theObject) {
|
||||
theResource.getResourceMetadata().put(IDao.RESOURCE_PID, theObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.jpa.term;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR JPA Server
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import org.hl7.fhir.r4.hapi.ctx.IValidationSupport;
|
||||
|
||||
public interface IHapiTerminologySvcR4 extends IHapiTerminologySvc, IValidationSupport {
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.jpa.util;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR JPA Server
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
|
||||
import ca.uhn.fhir.util.CoverageIgnore;
|
||||
|
@ -22,4 +42,4 @@ final class AllowStatusChangeMetadata extends ResourceMetadataKeyEnum<Object> {
|
|||
public void put(IResource theResource, Object theObject) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.jpa.util;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR JPA Server
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public abstract class BaseIterator<T> implements Iterator<T> {
|
||||
|
|
|
@ -23,7 +23,17 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu</artifactId>
|
||||
<artifactId>hapi-fhir-utilities</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -41,6 +51,11 @@
|
|||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
|
@ -84,6 +99,25 @@
|
|||
<version>${slf4j_target_version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
Optional dependencies from RI codebase
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>es.nitaur.markdown</groupId>
|
||||
<artifactId>txtmark</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>ST4</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xpp3</groupId>
|
||||
<artifactId>xpp3</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -115,12 +149,11 @@
|
|||
<fileset dir="../hapi-fhir-base/src/main/java">
|
||||
<exclude name="**/TestUtil.java"/>
|
||||
</fileset>
|
||||
<fileset dir="../hapi-fhir-structures-dstu/src/main/java" />
|
||||
<fileset dir="../hapi-fhir-structures-dstu/target/generated-sources/tinder" />
|
||||
<fileset dir="../hapi-fhir-structures-dstu2/src/main/java" />
|
||||
<fileset dir="../hapi-fhir-structures-dstu2/target/generated-sources/tinder" />
|
||||
<fileset dir="../hapi-fhir-structures-hl7org-dstu2/src/main/java" />
|
||||
<fileset dir="../hapi-fhir-structures-dstu3/src/main/java" />
|
||||
<fileset dir="../hapi-fhir-structures-r4/src/main/java" />
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.Date;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Server Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
package ca.uhn.fhir.rest.api.server;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Server Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
import ca.uhn.fhir.model.api.IFhirVersion;
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.api.server;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Server Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.rest.api.server;
|
|||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR - Core Library
|
||||
* HAPI FHIR - Server Framework
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2017 University Health Network
|
||||
* %%
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue